Skip to content

Commit

Permalink
Remember previous position of session manager dialog on screen. See h…
Browse files Browse the repository at this point in the history
  • Loading branch information
ansgarbecker committed Dec 26, 2017
1 parent dac303d commit ac1a3cb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 0 additions & 1 deletion source/connections.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ object connform: Tconnform
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
ShowHint = True
OnClose = FormClose
OnCloseQuery = FormCloseQuery
Expand Down
4 changes: 4 additions & 0 deletions source/connections.pas
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ procedure Tconnform.FormCreate(Sender: TObject);
InheritFont(Font);
Width := AppSettings.ReadInt(asSessionManagerWindowWidth);
Height := AppSettings.ReadInt(asSessionManagerWindowHeight);
Left := AppSettings.ReadInt(asSessionManagerWindowLeft, '', Left);
Top := AppSettings.ReadInt(asSessionManagerWindowTop, '', Top);
ListSessions.Width := AppSettings.ReadInt(asSessionManagerListWidth);
splitterMain.OnMoved(Sender);
FixVT(ListSessions);
Expand Down Expand Up @@ -290,6 +292,8 @@ procedure Tconnform.FormDestroy(Sender: TObject);
AppSettings.WriteInt(asSessionManagerListWidth, ListSessions.Width);
AppSettings.WriteInt(asSessionManagerWindowWidth, Width);
AppSettings.WriteInt(asSessionManagerWindowHeight, Height);
AppSettings.WriteInt(asSessionManagerWindowLeft, Left);
AppSettings.WriteInt(asSessionManagerWindowTop, Top);
MainForm.SaveListSetup(ListSessions);
end;

Expand Down
5 changes: 4 additions & 1 deletion source/helpers.pas
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ TQueryThread = class(TThread)
asUpdatecheckInterval, asUpdatecheckLastrun, asTableToolsWindowWidth, asTableToolsWindowHeight, asTableToolsTreeWidth,
asTableToolsFindText, asTableToolsDatatype, asTableToolsFindCaseSensitive, asTableToolsFindMatchType, asFileImportWindowWidth, asFileImportWindowHeight,
asEditVarWindowWidth, asEditVarWindowHeight, asUsermanagerWindowWidth, asUsermanagerWindowHeight, asUsermanagerListWidth,
asSelectDBOWindowWidth, asSelectDBOWindowHeight, asSessionManagerListWidth, asSessionManagerWindowWidth, asSessionManagerWindowHeight,
asSelectDBOWindowWidth, asSelectDBOWindowHeight,
asSessionManagerListWidth, asSessionManagerWindowWidth, asSessionManagerWindowHeight, asSessionManagerWindowLeft, asSessionManagerWindowTop,
asCopyTableWindowHeight, asCopyTableWindowWidth, asCopyTableColumns, asCopyTableKeys, asCopyTableForeignKeys,
asCopyTableData, asCopyTableRecentFilter, asServerVersion, asServerVersionFull, asLastConnect,
asConnectCount, asRefusedCount, asSessionCreated, asDoUsageStatistics,
Expand Down Expand Up @@ -3371,6 +3372,8 @@ constructor TAppSettings.Create;
InitSetting(asSessionManagerListWidth, 'SessionManager_ListWidth', 220);
InitSetting(asSessionManagerWindowWidth, 'SessionManager_WindowWidth', 700);
InitSetting(asSessionManagerWindowHeight, 'SessionManager_WindowHeight', 420);
InitSetting(asSessionManagerWindowLeft, 'SessionManager_WindowLeft', 50);
InitSetting(asSessionManagerWindowTop, 'SessionManager_WindowTop', 50);
InitSetting(asCopyTableWindowHeight, 'CopyTable_WindowHeight', 340);
InitSetting(asCopyTableWindowWidth, 'CopyTable_WindowWidth', 380);
InitSetting(asCopyTableColumns, 'CopyTable_Columns', 0, True);
Expand Down

0 comments on commit ac1a3cb

Please sign in to comment.