mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Remember window dimensions of session manager for the next call.
This commit is contained in:
@ -167,6 +167,8 @@ const
|
||||
REGNAME_USERMNGR_WINHEIGHT = 'Usermanager_WindowHeight';
|
||||
REGNAME_SELECTDBO_WINWIDTH = 'SelectDBO_WindowWidth';
|
||||
REGNAME_SELECTDBO_WINHEIGHT = 'SelectDBO_WindowHeight';
|
||||
REGNAME_SESSMNGR_WINWIDTH = 'SessionManager_WindowWidth';
|
||||
REGNAME_SESSMNGR_WINHEIGHT = 'SessionManager_WindowHeight';
|
||||
REGNAME_COPYTABLE_STRUCDATA = 'CopyTable_Option_StructureData';
|
||||
REGVAL_COPYTABLE_STRUCTURE = 0;
|
||||
REGVAL_COPYTABLE_STRUCTURE_AND_DATA = 1;
|
||||
|
@ -19,6 +19,7 @@ object connform: Tconnform
|
||||
ShowHint = True
|
||||
OnCloseQuery = FormCloseQuery
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
DesignSize = (
|
||||
494
|
||||
|
@ -69,6 +69,7 @@ type
|
||||
NewNode: PVirtualNode; OldColumn, NewColumn: TColumnIndex;
|
||||
var Allowed: Boolean);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
FLoaded: Boolean;
|
||||
@ -110,6 +111,8 @@ begin
|
||||
// Fix GUI stuff
|
||||
InheritFont(Font);
|
||||
SetWindowSizeGrip(Handle, True);
|
||||
Width := GetRegValue(REGNAME_SESSMNGR_WINWIDTH, Width);
|
||||
Height := GetRegValue(REGNAME_SESSMNGR_WINHEIGHT, Height);
|
||||
FixVT(ListSessions);
|
||||
ListSessions.OnGetHint := Mainform.vstGetHint;
|
||||
FLoaded := False;
|
||||
@ -123,6 +126,15 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure Tconnform.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
// Save GUI stuff
|
||||
OpenRegistry;
|
||||
MainReg.WriteInteger(REGNAME_SESSMNGR_WINWIDTH, Width);
|
||||
MainReg.WriteInteger(REGNAME_SESSMNGR_WINHEIGHT, Height);
|
||||
end;
|
||||
|
||||
|
||||
procedure Tconnform.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
begin
|
||||
// Modifications? Ask if they should be saved.
|
||||
|
Reference in New Issue
Block a user