diff options
author | danglassey <danglassey> | 2002-08-14 09:57:17 +0000 |
---|---|---|
committer | danglassey <danglassey> | 2002-08-14 09:57:17 +0000 |
commit | c9458897ebbb739d8db83c80e06512d8a612f743 (patch) | |
tree | f8c5381045887e34388cc6b26cfccc254bf766dc /apps/windoze/CBuilder5/InstallMgr/cipherfrm.cpp | |
download | sword-sf-cvs-c9458897ebbb739d8db83c80e06512d8a612f743.tar.gz |
*** empty log message ***
Diffstat (limited to 'apps/windoze/CBuilder5/InstallMgr/cipherfrm.cpp')
-rw-r--r-- | apps/windoze/CBuilder5/InstallMgr/cipherfrm.cpp | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/apps/windoze/CBuilder5/InstallMgr/cipherfrm.cpp b/apps/windoze/CBuilder5/InstallMgr/cipherfrm.cpp new file mode 100644 index 0000000..5b77797 --- /dev/null +++ b/apps/windoze/CBuilder5/InstallMgr/cipherfrm.cpp @@ -0,0 +1,67 @@ +//--------------------------------------------------------------------------- +#include <vcl.h> +#pragma hdrstop + +#include "cipherfrm.h" +#include <swmgr.h> +#include <swconfig.h> +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TCipherForm *CipherForm; +//--------------------------------------------------------------------------- +__fastcall TCipherForm::TCipherForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TCipherForm::Button2Click(TObject *Sender) +{ + SectionMap::iterator section; + ConfigEntMap::iterator entry; + SWConfig *modconf = new SWConfig(confFile.c_str()); + string tmpBuf; + + section = modconf->Sections.find(modName); + if (section != modconf->Sections.end()) { + entry = section->second.find("CipherKey"); + if (entry != section->second.end()) { + entry->second = CipherForm->cipherEdit->Text.c_str(); + modconf->Save(); + delete modconf; // close file + modconf = 0; + SWMgr *mgr = new SWMgr(); + SWModule *mod = mgr->Modules[modName]; + mod->SetKey("Ipet 2:12"); + tmpBuf = mod->StripText(); + mod->SetKey("gen 1:10"); + tmpBuf += "\r\n\r\n"; + tmpBuf += mod->StripText(); + Memo1->Text = tmpBuf.c_str(); + delete mgr; + } + } + if (modconf) + delete modconf; + +} +//--------------------------------------------------------------------------- + +void __fastcall TCipherForm::FormShow(TObject *Sender) +{ + string tmpCaption; + tmpCaption = "Cipher Key: ["; + tmpCaption += modName; + tmpCaption += "]"; + Caption = tmpCaption.c_str(); +} +//--------------------------------------------------------------------------- + + +void __fastcall TCipherForm::FormClose(TObject *Sender, + TCloseAction &Action) +{ + Memo1->Text = ""; +} +//--------------------------------------------------------------------------- + |