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

View File

@ -53,7 +53,7 @@ begin
// Read original ORDER clause from registry // Read original ORDER clause from registry
reg_name := REGPREFIX_ORDERCLAUSE + Mainform.Childwin.ActiveDatabase + '.' + Mainform.Childwin.SelectedTable; 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; OrderColumns := Mainform.Childwin.HandleOrderColumns;
@ -298,7 +298,7 @@ var
reg : TRegistry; reg : TRegistry;
begin begin
reg := TRegistry.Create(); 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.WriteString( reg_name, Mainform.Childwin.ComposeOrderClause(OrderColumns) );
reg.CloseKey; reg.CloseKey;
FreeAndNil(reg); FreeAndNil(reg);

View File

@ -182,7 +182,7 @@ begin
// read dbs and Tables from treeview // read dbs and Tables from treeview
comboSelectDatabase.Items.Clear; 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 for i:=0 to Mainform.ChildWin.DBTree.Items.Count-1 do
begin begin
tn := Mainform.ChildWin.DBTree.Items[i]; tn := Mainform.ChildWin.DBTree.Items[i];

View File

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

View File

@ -96,7 +96,7 @@ var
i : Integer; i : Integer;
begin begin
ComboBoxDBs.Items.Clear; 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 for i:=0 to Mainform.ChildWin.DBTree.Items.Count-1 do
begin begin
tn := Mainform.ChildWin.DBTree.Items[i]; tn := Mainform.ChildWin.DBTree.Items[i];

View File

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