//--------------------------------------------------------------------------- #include #pragma hdrstop #include "DevOfTheDay.h" #include "mainfrm.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TDevOfTheDay2 *DevOfTheDay2; //--------------------------------------------------------------------------- __fastcall TDevOfTheDay2::TDevOfTheDay2(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TDevOfTheDay2::btnOKClick(TObject *Sender) { DevOfTheDay2->Hide(); ConfigEntMap emap; SWConfig * optionsconf; optionsconf = dynamic_cast(Application->MainForm)->optionsconf; if(optionsconf) { emap = optionsconf->Sections["General"]; emap.erase("TipOfTheDay"); emap.insert(ConfigEntMap::value_type("TipOfTheDay", (DevOfTheDay2->ckShowTip->Checked) ? "Devotional" : "")); optionsconf->Sections["General"] = emap; optionsconf->Save(); } } //---------------------------------------------------------------------------