CustomWinConfiguration.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //---------------------------------------------------------------------------
  2. #ifndef CustomWinConfigurationH
  3. #define CustomWinConfigurationH
  4. //---------------------------------------------------------------------------
  5. #include "GUIConfiguration.h"
  6. //---------------------------------------------------------------------------
  7. #define WM_LOCALE_CHANGE (WM_USER + 1)
  8. //---------------------------------------------------------------------------
  9. class TCustomWinConfiguration : public TGUIConfiguration
  10. {
  11. static const int MaxHistoryCount = 50;
  12. private:
  13. TLogView FLogView;
  14. TInterface FInterface;
  15. bool FShowAdvancedLoginOptions;
  16. TStringList * FHistory;
  17. TStrings * FEmptyHistory;
  18. void __fastcall SetInterface(TInterface value);
  19. void __fastcall SetLogView(TLogView value);
  20. void __fastcall SetShowAdvancedLoginOptions(bool value);
  21. void __fastcall SetHistory(const AnsiString Index, TStrings * value);
  22. TStrings * __fastcall GetHistory(const AnsiString Index);
  23. protected:
  24. virtual void __fastcall SaveSpecial(THierarchicalStorage * Storage);
  25. virtual void __fastcall LoadSpecial(THierarchicalStorage * Storage);
  26. virtual void __fastcall ModifyAll();
  27. void __fastcall ClearHistory();
  28. public:
  29. __fastcall TCustomWinConfiguration();
  30. __fastcall ~TCustomWinConfiguration();
  31. virtual void __fastcall Default();
  32. __property TLogView LogView = { read = FLogView, write = SetLogView };
  33. __property TInterface Interface = { read = FInterface, write = SetInterface };
  34. __property bool ShowAdvancedLoginOptions = { read = FShowAdvancedLoginOptions, write = SetShowAdvancedLoginOptions};
  35. __property TStrings * History[AnsiString Name] = { read = GetHistory, write = SetHistory };
  36. };
  37. //---------------------------------------------------------------------------
  38. #define CustomWinConfiguration \
  39. (dynamic_cast<TCustomWinConfiguration *>(Configuration))
  40. //---------------------------------------------------------------------------
  41. #endif