LogSettings.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 <WinInterface.h>
  14. //---------------------------------------------------------------------------
  15. class TLoggingFrame : public TFrame
  16. {
  17. __published:
  18. TCheckBox *LoggingCheck;
  19. TGroupBox *LoggingGroup;
  20. TLabel *LogWindowLinesText;
  21. TCheckBox *LogToFileCheck;
  22. TFilenameEdit *LogFileNameEdit;
  23. TCheckBox *LogShowWindowCheck;
  24. TRadioButton *LogWindowCompleteButton;
  25. TRadioButton *LogWindowLinesButton;
  26. TUpDownEdit *LogWindowLinesEdit;
  27. TPanel *LogFilePanel;
  28. TRadioButton *LogFileAppendButton;
  29. TRadioButton *LogFileOverwriteButton;
  30. TLabel *LogProtocolLabel;
  31. TComboBox *LogProtocolCombo;
  32. TStaticText *LogFileNameHintText;
  33. void __fastcall LogToFileCheckChange(TObject *Sender);
  34. void __fastcall DataChange(TObject *Sender);
  35. void __fastcall LogFileNameEditBeforeDialog(TObject *Sender,
  36. AnsiString &Name, bool &Action);
  37. void __fastcall LogFileNameEditAfterDialog(TObject *Sender,
  38. AnsiString &Name, bool &Action);
  39. private:
  40. bool FEnableLogWindow;
  41. AnsiString FBeforeDialogPath;
  42. AnsiString __fastcall GetDefaultLogFileName();
  43. void __fastcall SetEnableLogWindow(bool value);
  44. public:
  45. __fastcall TLoggingFrame(TComponent* Owner);
  46. void __fastcall LoadConfiguration();
  47. void __fastcall SaveConfiguration();
  48. void __fastcall Init();
  49. __property AnsiString DefaultLogFileName = { read = GetDefaultLogFileName };
  50. __property bool EnableLogWindow = { read = FEnableLogWindow, write = SetEnableLogWindow };
  51. protected:
  52. void __fastcall UpdateControls();
  53. };
  54. //---------------------------------------------------------------------------
  55. extern PACKAGE TLoggingFrame *LoggingFrame;
  56. //---------------------------------------------------------------------------
  57. #endif