Properties.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. //----------------------------------------------------------------------------
  2. #ifndef PropertiesH
  3. #define PropertiesH
  4. //----------------------------------------------------------------------------
  5. #include <vcl\System.hpp>
  6. #include <vcl\Windows.hpp>
  7. #include <vcl\SysUtils.hpp>
  8. #include <vcl\Classes.hpp>
  9. #include <vcl\Graphics.hpp>
  10. #include <vcl\StdCtrls.hpp>
  11. #include <vcl\Forms.hpp>
  12. #include <vcl\Controls.hpp>
  13. #include <vcl\Buttons.hpp>
  14. #include <vcl\ExtCtrls.hpp>
  15. #include <ComCtrls.hpp>
  16. #include <PathLabel.hpp>
  17. #include "Rights.h"
  18. #include "RightsExt.h"
  19. //----------------------------------------------------------------------------
  20. class TTerminal;
  21. struct TCalculateSizeStats;
  22. //----------------------------------------------------------------------------
  23. class TPropertiesDialog : public TForm
  24. {
  25. __published:
  26. TButton *OkButton;
  27. TButton *CancelButton;
  28. TPageControl *PageControl;
  29. TTabSheet *CommonSheet;
  30. TImage *FilesIconImage;
  31. TBevel *Bevel1;
  32. TLabel *FileLabel;
  33. TLabel *Label1;
  34. TPathLabel *LocationLabel;
  35. TLabel *Label2;
  36. TLabel *SizeLabel;
  37. TLabel *LinksToLabelLabel;
  38. TPathLabel *LinksToLabel;
  39. TBevel *Bevel2;
  40. TLabel *Label3;
  41. TBevel *Bevel3;
  42. TLabel *Label4;
  43. TComboBox *GroupComboBox;
  44. TLabel *Label5;
  45. TComboBox *OwnerComboBox;
  46. TImage *FileIconImage;
  47. TBevel *RecursiveBevel;
  48. TCheckBox *RecursiveCheck;
  49. TButton *CalculateSizeButton;
  50. TRightsExtFrame *RightsFrame;
  51. TButton *HelpButton;
  52. void __fastcall ControlChange(TObject *Sender);
  53. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  54. void __fastcall CalculateSizeButtonClick(TObject *Sender);
  55. void __fastcall HelpButtonClick(TObject *Sender);
  56. private:
  57. int FAllowedChanges;
  58. TStrings * FFileList;
  59. TRemoteProperties FOrigProperties;
  60. bool FGroupsSet;
  61. bool FUsersSet;
  62. TImageList * FShellImageList;
  63. bool FAllowCalculateStats;
  64. bool FStatsNotCalculated;
  65. TTerminal * FTerminal;
  66. TNotifyEvent FPrevTerminalClose;
  67. void __fastcall SetDirectory(const AnsiString value);
  68. AnsiString __fastcall GetDirectory();
  69. TRemoteProperties __fastcall GetFileProperties();
  70. TStrings * __fastcall GetGroupList();
  71. TStrings * __fastcall GetUserList();
  72. bool __fastcall GetMultiple();
  73. void __fastcall SetAllowedChanges(int value);
  74. void __fastcall SetFileList(TStrings * value);
  75. void __fastcall SetFileProperties(TRemoteProperties value);
  76. void __fastcall SetGroupList(TStrings * value);
  77. void __fastcall SetUserList(TStrings * value);
  78. void __fastcall TerminalClose(TObject * /*Sender*/);
  79. protected:
  80. void __fastcall LoadInfo();
  81. void __fastcall UpdateControls();
  82. void __fastcall LoadStats(__int64 FilesSize, const TCalculateSizeStats & Stats);
  83. __property bool Multiple = { read = GetMultiple };
  84. public:
  85. virtual __fastcall ~TPropertiesDialog();
  86. bool __fastcall Execute();
  87. virtual __fastcall TPropertiesDialog(TComponent * AOwner);
  88. __property int AllowedChanges = { read = FAllowedChanges, write = SetAllowedChanges };
  89. __property AnsiString Directory = { read = GetDirectory, write = SetDirectory };
  90. __property TStrings * FileList = { read = FFileList, write = SetFileList };
  91. __property TRemoteProperties FileProperties = { read = GetFileProperties, write = SetFileProperties };
  92. __property TStrings * GroupList = { read = GetGroupList, write = SetGroupList };
  93. __property TStrings * UserList = { read = GetUserList, write = SetUserList };
  94. __property TTerminal * Terminal = { read = FTerminal, write = FTerminal };
  95. };
  96. //----------------------------------------------------------------------------
  97. #endif