Properties.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. //----------------------------------------------------------------------------
  19. class TTerminal;
  20. //----------------------------------------------------------------------------
  21. class TPropertiesDialog : public TForm
  22. {
  23. __published:
  24. TButton *OkButton;
  25. TButton *CancelButton;
  26. TPageControl *PageControl;
  27. TTabSheet *CommonSheet;
  28. TImage *FilesIconImage;
  29. TBevel *Bevel1;
  30. TLabel *FileLabel;
  31. TLabel *Label1;
  32. TPathLabel *LocationLabel;
  33. TLabel *Label2;
  34. TLabel *SizeLabel;
  35. TLabel *LinksToLabelLabel;
  36. TPathLabel *LinksToLabel;
  37. TBevel *Bevel2;
  38. TRightsFrame *RightsFrame;
  39. TLabel *Label3;
  40. TBevel *Bevel3;
  41. TLabel *Label4;
  42. TComboBox *GroupComboBox;
  43. TLabel *Label5;
  44. TComboBox *OwnerComboBox;
  45. TImage *FileIconImage;
  46. TBevel *RecursiveBevel;
  47. TCheckBox *RecursiveCheck;
  48. TButton *CalculateSizeButton;
  49. void __fastcall ControlChange(TObject *Sender);
  50. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  51. void __fastcall CalculateSizeButtonClick(TObject *Sender);
  52. private:
  53. int FAllowedChanges;
  54. TStrings * FFileList;
  55. TRemoteProperties FOrigProperties;
  56. bool FGroupsSet;
  57. TImageList * FShellImageList;
  58. bool FAllowCalculateSize;
  59. bool FSizeNotCalculated;
  60. TTerminal * FTerminal;
  61. TNotifyEvent FPrevTerminalClose;
  62. void __fastcall SetDirectory(const AnsiString value);
  63. AnsiString __fastcall GetDirectory();
  64. TRemoteProperties __fastcall GetFileProperties();
  65. TStrings * __fastcall GetGroupList();
  66. bool __fastcall GetMultiple();
  67. void __fastcall SetAllowedChanges(int value);
  68. void __fastcall SetFileList(TStrings * value);
  69. void __fastcall SetFileProperties(TRemoteProperties value);
  70. void __fastcall SetGroupList(TStrings * value);
  71. void __fastcall TerminalClose(TObject * /*Sender*/);
  72. protected:
  73. void __fastcall LoadInfo();
  74. void __fastcall UpdateControls();
  75. void __fastcall LoadSize(__int64 FilesSize);
  76. __property bool Multiple = { read = GetMultiple };
  77. public:
  78. virtual __fastcall ~TPropertiesDialog();
  79. bool __fastcall Execute();
  80. virtual __fastcall TPropertiesDialog(TComponent * AOwner);
  81. __property int AllowedChanges = { read = FAllowedChanges, write = SetAllowedChanges };
  82. __property AnsiString Directory = { read = GetDirectory, write = SetDirectory };
  83. __property TStrings * FileList = { read = FFileList, write = SetFileList };
  84. __property TRemoteProperties FileProperties = { read = GetFileProperties, write = SetFileProperties };
  85. __property TStrings * GroupList = { read = GetGroupList, write = SetGroupList };
  86. __property TTerminal * Terminal = { read = FTerminal, write = FTerminal };
  87. };
  88. //----------------------------------------------------------------------------
  89. #endif