LogSettings.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. TGroupBox *LoggingGroup;
  19. TLabel *LogWindowLinesText;
  20. TCheckBox *LogToFileCheck;
  21. TFilenameEdit *LogFileNameEdit3;
  22. TCheckBox *LogShowWindowCheck;
  23. TRadioButton *LogWindowCompleteButton;
  24. TRadioButton *LogWindowLinesButton;
  25. TUpDownEdit *LogWindowLinesEdit;
  26. TPanel *LogFilePanel;
  27. TRadioButton *LogFileAppendButton;
  28. TRadioButton *LogFileOverwriteButton;
  29. TComboBox *LogProtocolCombo;
  30. TStaticText *LogFileNameHintText;
  31. TGroupBox *ActionsLoggingGroup;
  32. TFilenameEdit *ActionsLogFileNameEdit;
  33. TStaticText *ActionsLogFileNameHintText;
  34. TCheckBox *EnableActionsLoggingCheck;
  35. TCheckBox *EnableLoggingCheck;
  36. void __fastcall DataChange(TObject *Sender);
  37. void __fastcall LogFileNameEditBeforeDialog(TObject *Sender,
  38. UnicodeString &Name, bool &Action);
  39. void __fastcall LogFileNameEditAfterDialog(TObject *Sender,
  40. UnicodeString &Name, bool &Action);
  41. void __fastcall LogFileNameEditCreateEditDialog(TObject *Sender,
  42. TFileDialogKind DialogKind, TOpenDialog *&Dialog);
  43. private:
  44. bool FEnableLogWindow;
  45. UnicodeString FBeforeDialogPath;
  46. void __fastcall SetEnableLogWindow(bool value);
  47. public:
  48. __fastcall TLoggingFrame(TComponent* Owner);
  49. void __fastcall LoadConfiguration();
  50. void __fastcall SaveConfiguration();
  51. void __fastcall Init();
  52. __property bool EnableLogWindow = { read = FEnableLogWindow, write = SetEnableLogWindow };
  53. protected:
  54. void __fastcall UpdateControls();
  55. };
  56. //---------------------------------------------------------------------------
  57. extern PACKAGE TLoggingFrame *LoggingFrame;
  58. //---------------------------------------------------------------------------
  59. #endif