LogSettings.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //---------------------------------------------------------------------------
  2. #ifndef LogSettingsH
  3. #define LogSettingsH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <ExtCtrls.hpp>
  10. #include <Mask.hpp>
  11. #include <ComboEdit.hpp>
  12. #include <UpDownEdit.hpp>
  13. #include <XPGroupBox.hpp>
  14. #include <WinInterface.h>
  15. //---------------------------------------------------------------------------
  16. class TLoggingFrame : public TFrame
  17. {
  18. __published:
  19. TCheckBox *LoggingCheck;
  20. TXPGroupBox *LoggingGroup;
  21. TLabel *LogWindowLinesText;
  22. TCheckBox *LogToFileCheck;
  23. TFilenameEdit *LogFileNameEdit;
  24. TCheckBox *LogShowWindowCheck;
  25. TRadioButton *LogWindowCompleteButton;
  26. TRadioButton *LogWindowLinesButton;
  27. TUpDownEdit *LogWindowLinesEdit;
  28. TPanel *LogFilePanel;
  29. TRadioButton *LogFileAppendButton;
  30. TRadioButton *LogFileOverwriteButton;
  31. void __fastcall LogToFileCheckChange(TObject *Sender);
  32. void __fastcall DataChange(TObject *Sender);
  33. private:
  34. TGetDefaultLogFileName FOnGetDefaultLogFileName;
  35. bool FEnableLogWindow;
  36. AnsiString __fastcall GetDefaultLogFileName();
  37. void __fastcall SetEnableLogWindow(bool value);
  38. public:
  39. void __fastcall LoadConfiguration();
  40. void __fastcall SaveConfiguration();
  41. __fastcall TLoggingFrame(TComponent* Owner);
  42. __property AnsiString DefaultLogFileName = { read = GetDefaultLogFileName };
  43. __property TGetDefaultLogFileName OnGetDefaultLogFileName = { read = FOnGetDefaultLogFileName, write = FOnGetDefaultLogFileName };
  44. __property bool EnableLogWindow = { read = FEnableLogWindow, write = SetEnableLogWindow };
  45. protected:
  46. void __fastcall UpdateControls();
  47. };
  48. //---------------------------------------------------------------------------
  49. extern PACKAGE TLoggingFrame *LoggingFrame;
  50. //---------------------------------------------------------------------------
  51. #endif