Rename childwin's "Description" property to "SessionName" which says more exactly what it really is.

This commit is contained in:
Ansgar Becker
2008-03-05 12:21:25 +00:00
parent 1ccb907501
commit 815eea1481
6 changed files with 17 additions and 17 deletions

View File

@ -604,7 +604,7 @@ type
editing : Boolean;
mysql_version : Integer;
tnodehost : TTreeNode;
Description : String;
SessionName : String;
delimiter : String;
DBRightClickSelectedItem : TTreeNode; // TreeNode for dropping with right-click
VTRowDataListVariables,
@ -853,8 +853,8 @@ begin
Exit;
end;
Description := FMysqlConn.Description;;
Caption := Description;
SessionName := FMysqlConn.SessionName;
Caption := SessionName;
OnlyDBs := explode( ';', FConn.DatabaseList );
if ( FConn.DatabaseListSort ) then
begin
@ -876,8 +876,8 @@ begin
// Define window properties
SetWindowConnected( true );
i := SetWindowName( Description );
winName := Description;
i := SetWindowName( SessionName );
winName := SessionName;
if ( i <> 0 ) then
begin
winName := winName + Format( ' (%d)', [i] );
@ -1381,7 +1381,7 @@ begin
tabTable.TabVisible := false;
tabData.TabVisible := false;
Caption := Description;
Caption := SessionName;
pcChange( Self );
end;
@ -1399,7 +1399,7 @@ begin
tabData.TabVisible := false;
pnlTableTop.Caption := 'Table-Properties';
Caption := Description + ' - /' + db;
Caption := SessionName + ' - /' + db;
try
ShowDBProperties( db );
except
@ -1424,7 +1424,7 @@ begin
if tab = nil then tab := tabTable; // Alternative default: tabData
if tab = tabTable then ShowTableProperties( table );
if tab = tabData then ShowTableData( table );
Caption := Description + ' - /' + ActiveDatabase + '/' + SelectedTable;
Caption := SessionName + ' - /' + ActiveDatabase + '/' + SelectedTable;
end;
@ -1599,7 +1599,7 @@ begin
MainForm.ShowStatus( 'Retrieving data...', 2 );
// Read columns to display from registry
reg_value := Mainform.GetRegValue(REGNAME_DISPLAYEDCOLUMNS + '_' + ActiveDatabase + '.' + SelectedTable, '', Description);
reg_value := Mainform.GetRegValue(REGNAME_DISPLAYEDCOLUMNS + '_' + ActiveDatabase + '.' + SelectedTable, '', SessionName);
DisplayedColumnsList := explode( '`', reg_value);
// Prepare SELECT statement

View File

@ -53,7 +53,7 @@ begin
// Read original ORDER clause from registry
reg_name := REGPREFIX_ORDERCLAUSE + Mainform.Childwin.ActiveDatabase + '.' + Mainform.Childwin.SelectedTable;
OldOrderClause := Mainform.GetRegValue(reg_name, '', Mainform.Childwin.Description);
OldOrderClause := Mainform.GetRegValue(reg_name, '', Mainform.Childwin.SessionName);
OrderColumns := Mainform.Childwin.HandleOrderColumns;
@ -298,7 +298,7 @@ var
reg : TRegistry;
begin
reg := TRegistry.Create();
reg.OpenKey( REGPATH + REGKEY_SESSIONS + Mainform.Childwin.Description, true );
reg.OpenKey( REGPATH + REGKEY_SESSIONS + Mainform.Childwin.SessionName, true );
reg.WriteString( reg_name, Mainform.Childwin.ComposeOrderClause(OrderColumns) );
reg.CloseKey;
FreeAndNil(reg);

View File

@ -182,7 +182,7 @@ begin
// read dbs and Tables from treeview
comboSelectDatabase.Items.Clear;
Caption := Mainform.ChildWin.MysqlConn.Description + ' - Export Tables...';
Caption := Mainform.ChildWin.MysqlConn.SessionName + ' - Export Tables...';
for i:=0 to Mainform.ChildWin.DBTree.Items.Count-1 do
begin
tn := Mainform.ChildWin.DBTree.Items[i];

View File

@ -994,7 +994,7 @@ begin
end;
end;
Caption := Mainform.ChildWin.Description + ' - ' + ButtonOK.Caption;
Caption := Mainform.ChildWin.SessionName + ' - ' + ButtonOK.Caption;
end;

View File

@ -96,7 +96,7 @@ var
i : Integer;
begin
ComboBoxDBs.Items.Clear;
Caption := Mainform.ChildWin.MysqlConn.Description + ' - Insert files into table ...';
Caption := Mainform.ChildWin.MysqlConn.SessionName + ' - Insert files into table ...';
for i:=0 to Mainform.ChildWin.DBTree.Items.Count-1 do
begin
tn := Mainform.ChildWin.DBTree.Items[i];

View File

@ -17,7 +17,7 @@ type
FConn : TZConnection;
FOpenConn : TOpenConnProf;
FLastError : String;
function GetDescription: String;
function GetSessionName: String;
function GetIsAlive: Boolean;
function GetIsConnected: Boolean;
//FTimer : TTimer;
@ -30,7 +30,7 @@ type
property IsAlive : Boolean read GetIsAlive;
property Connection : TZConnection read FConn;
property LastError : String read FLastError;
property Description : String read GetDescription;
property SessionName : String read GetSessionName;
end;
implementation
@ -96,7 +96,7 @@ begin
inherited;
end;
function TMysqlConn.GetDescription: String;
function TMysqlConn.GetSessionName: String;
begin
result := FOpenConn.Description;
end;