Skip to content
Snippets Groups Projects
Commit 95a2bcb6 authored by rswindell's avatar rswindell
Browse files

Spy Form's Font, Width, and Height are now saved and restored from the Registry.

parent 54cb1ea4
No related branches found
No related tags found
No related merge requests found
......@@ -524,6 +524,13 @@ __fastcall TMainForm::TMainForm(TComponent* Owner)
ftp_startup.socket_open=socket_open;
ftp_startup.options=FTP_OPT_INDEX_FILE;
strcpy(ftp_startup.index_file_name,"00index");
/* Default local "Spy Terminal" settings */
SpyTerminalFont=new TFont;
SpyTerminalFont->Name="Terminal";
SpyTerminalFont->Size=9;
SpyTerminalWidth=434;
SpyTerminalHeight=364;
}
//---------------------------------------------------------------------------
void __fastcall TMainForm::FileExitMenuItemClick(TObject *Sender)
......@@ -560,6 +567,15 @@ void __fastcall TMainForm::FormCreate(TObject *Sender)
else
WindowState=wsMaximized; // Default to fullscreen
if(Registry->ValueExists("SpyTerminalWidth"))
SpyTerminalWidth=Registry->ReadInteger("SpyTerminalWidth");
if(Registry->ValueExists("SpyTerminalHeight"))
SpyTerminalHeight=Registry->ReadInteger("SpyTerminalHeight");
if(Registry->ValueExists("SpyTerminalFontName"))
SpyTerminalFont->Name=Registry->ReadString("SpyTerminalFontName");
if(Registry->ValueExists("SpyTerminalFontSize"))
SpyTerminalFont->Size=Registry->ReadInteger("SpyTerminalFontSize");
Registry->CloseKey();
delete Registry;
}
......@@ -717,6 +733,11 @@ void __fastcall TMainForm::SaveSettings(void)
,AnsiString(ftp_startup.index_file_name));
Registry->WriteInteger("FtpOptions",ftp_startup.options);
Registry->WriteInteger("SpyTerminalWidth",SpyTerminalWidth);
Registry->WriteInteger("SpyTerminalHeight",SpyTerminalHeight);
Registry->WriteString("SpyTerminalFontName",SpyTerminalFont->Name);
Registry->WriteInteger("SpyTerminalFontSize",SpyTerminalFont->Size);
Registry->CloseKey();
delete Registry;
......
......@@ -236,6 +236,9 @@ public: // User declarations
bbs_startup_t bbs_startup;
mail_startup_t mail_startup;
ftp_startup_t ftp_startup;
int SpyTerminalWidth;
int SpyTerminalHeight;
TFont* SpyTerminalFont;
TPageControl* __fastcall PageControl(int num);
int __fastcall PageNum(TPageControl* obj);
void __fastcall SaveSettings(void);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment