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_USERMNGR_WINHEIGHT = 'Usermanager_WindowHeight';
|
||||||
REGNAME_SELECTDBO_WINWIDTH = 'SelectDBO_WindowWidth';
|
REGNAME_SELECTDBO_WINWIDTH = 'SelectDBO_WindowWidth';
|
||||||
REGNAME_SELECTDBO_WINHEIGHT = 'SelectDBO_WindowHeight';
|
REGNAME_SELECTDBO_WINHEIGHT = 'SelectDBO_WindowHeight';
|
||||||
|
REGNAME_SESSMNGR_WINWIDTH = 'SessionManager_WindowWidth';
|
||||||
|
REGNAME_SESSMNGR_WINHEIGHT = 'SessionManager_WindowHeight';
|
||||||
REGNAME_COPYTABLE_STRUCDATA = 'CopyTable_Option_StructureData';
|
REGNAME_COPYTABLE_STRUCDATA = 'CopyTable_Option_StructureData';
|
||||||
REGVAL_COPYTABLE_STRUCTURE = 0;
|
REGVAL_COPYTABLE_STRUCTURE = 0;
|
||||||
REGVAL_COPYTABLE_STRUCTURE_AND_DATA = 1;
|
REGVAL_COPYTABLE_STRUCTURE_AND_DATA = 1;
|
||||||
|
@ -19,6 +19,7 @@ object connform: Tconnform
|
|||||||
ShowHint = True
|
ShowHint = True
|
||||||
OnCloseQuery = FormCloseQuery
|
OnCloseQuery = FormCloseQuery
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
494
|
494
|
||||||
|
@ -69,6 +69,7 @@ type
|
|||||||
NewNode: PVirtualNode; OldColumn, NewColumn: TColumnIndex;
|
NewNode: PVirtualNode; OldColumn, NewColumn: TColumnIndex;
|
||||||
var Allowed: Boolean);
|
var Allowed: Boolean);
|
||||||
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
FLoaded: Boolean;
|
FLoaded: Boolean;
|
||||||
@ -110,6 +111,8 @@ begin
|
|||||||
// Fix GUI stuff
|
// Fix GUI stuff
|
||||||
InheritFont(Font);
|
InheritFont(Font);
|
||||||
SetWindowSizeGrip(Handle, True);
|
SetWindowSizeGrip(Handle, True);
|
||||||
|
Width := GetRegValue(REGNAME_SESSMNGR_WINWIDTH, Width);
|
||||||
|
Height := GetRegValue(REGNAME_SESSMNGR_WINHEIGHT, Height);
|
||||||
FixVT(ListSessions);
|
FixVT(ListSessions);
|
||||||
ListSessions.OnGetHint := Mainform.vstGetHint;
|
ListSessions.OnGetHint := Mainform.vstGetHint;
|
||||||
FLoaded := False;
|
FLoaded := False;
|
||||||
@ -123,6 +126,15 @@ begin
|
|||||||
end;
|
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);
|
procedure Tconnform.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||||
begin
|
begin
|
||||||
// Modifications? Ask if they should be saved.
|
// Modifications? Ask if they should be saved.
|
||||||
|
Reference in New Issue
Block a user