//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <ImgList.hpp>
#include <ExtCtrls.hpp>
#include <ActnList.hpp>
#include <Menus.hpp>
#include <Dialogs.hpp>
#include <ExtDlgs.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TTreeView *TreeView;
        TLabel *Label1;
        TEdit *EditFilename;
        TLabel *Label2;
        TEdit *EditCreationTime;
        TLabel *Label3;
        TEdit *EditLastAccessTime;
        TLabel *Label4;
        TEdit *EditLastWriteTime;
        TLabel *Label5;
        TEdit *EditFileSize;
        TLabel *Label6;
        TEdit *EditAlternativeFilename;
        TImageList *ImageList1;
        TPopupMenu *PopupMenu1;
        TMenuItem *Open1;
        TMenuItem *Rename1;
        TMenuItem *Properties1;
        TMenuItem *Edit1;
        TMainMenu *MainMenu1;
        TMenuItem *File1;
        TMenuItem *About1;
        TMenuItem *About2;
        TMenuItem *Tools1;
        TMenuItem *AllowDelete1;
        TMenuItem *AllowRename1;
        TMenuItem *View1;
        TMenuItem *Statusbar1;
        TMenuItem *Refresh1;
        TMenuItem *N1;
        TMenuItem *Copy1;
        TMenuItem *Move1;
        TMenuItem *Rename2;
        TMenuItem *Properties2;
        TMenuItem *N2;
        TMenuItem *Exit1;
        TMenuItem *N3;
        TStatusBar *StatusBar;
        TMenuItem *Delete2;
        TMenuItem *Delete1;
	TProgressBar *ProgressBar1;
	TSaveDialog *SaveDialog1;
	TActionList *ActionList1;
	TAction *Refresh;
	TAction *Action1;
	TTimer *Timer1;
	TAction *ChooseFlags;
	TGroupBox *GroupBox1;
	TCheckBox *CheckBox1;
	TCheckBox *CheckBox2;
	TCheckBox *CheckBox3;
	TCheckBox *CheckBox4;
	TCheckBox *CheckBox5;
	TCheckBox *CheckBox6;
	TCheckBox *CheckBox7;
	TCheckBox *CheckBox8;
	TCheckBox *CheckBox9;
	TCheckBox *CheckBox10;
	TCheckBox *CheckBox11;
	TCheckBox *CheckBox12;
	TCheckBox *CheckBox13;
	TCheckBox *CheckBox14;
	TLabel *Label7;
	TLabel *Label8;
	TLabel *Label9;
	TEdit *Edit2;
	TEdit *Edit3;
	TEdit *Edit4;
	TMenuItem *N4;
	TMenuItem *Golevelup1;
	TMenuItem *Refresh2;
        void __fastcall TreeViewChange(TObject *Sender, TTreeNode *Node);
        void __fastcall TreeViewCompare(TObject *Sender, TTreeNode *Node1,
          TTreeNode *Node2, int Data, int &Compare);
        void __fastcall PopupMenu1Popup(TObject *Sender);
        void __fastcall Rename1Click(TObject *Sender);
        void __fastcall TreeViewEdited(TObject *Sender, TTreeNode *Node,
          AnsiString &S);
        void __fastcall TreeViewEditing(TObject *Sender, TTreeNode *Node,
          bool &AllowEdit);
        void __fastcall Delete1Click(TObject *Sender);
        void __fastcall Properties1Click(TObject *Sender);
        void __fastcall Open1Click(TObject *Sender);
        void __fastcall Edit1Click(TObject *Sender);
        void __fastcall Exit1Click(TObject *Sender);
        void __fastcall Statusbar1Click(TObject *Sender);
        void __fastcall AllowDelete1Click(TObject *Sender);
        void __fastcall AllowRename1Click(TObject *Sender);
        void __fastcall Properties2Click(TObject *Sender);
        void __fastcall Rename2Click(TObject *Sender);
        void __fastcall Delete2Click(TObject *Sender);
        void __fastcall Copy1Click(TObject *Sender);
        void __fastcall Move1Click(TObject *Sender);
        void __fastcall About2Click(TObject *Sender);
	void __fastcall File1Click(TObject *Sender);
	void __fastcall RefreshExecute(TObject *Sender);
	void __fastcall Refresh1Click(TObject *Sender);
	void __fastcall Timer1Timer(TObject *Sender);
	void __fastcall Action1Execute(TObject *Sender);
	void __fastcall ChooseFlagsExecute(TObject *Sender);
	void __fastcall Golevelup1Click(TObject *Sender);
	void __fastcall Refresh2Click(TObject *Sender);
        void __fastcall TreeViewExpanding(TObject *Sender, TTreeNode *Node,
          bool &AllowExpansion);
private:	// User declarations
public:		// User declarations
        __fastcall TForm1(TComponent* Owner);
			 HANDLE Thread;
       DWORD ThreadID;
       HANDLE Thread2;
       DWORD ThreadID2;
       void Watek_ON();
       void Watek_ON2(void*);
       static DWORD WINAPI WatekProc(void*);
       static DWORD WINAPI WatekProc2(void*);
       void WINAPI Watek();
       DWORD WINAPI Watek2();
        //__fastcall String getAttributes(unsigned long flags);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;

class __declspec(dllimport) IconsStuff
{
	public:
		bool GetSystemImageList();
		void AddIcons(TImageList*);
		std::vector<int> GetTransparent() {return this->transparent;}
		void EraseFromTransparent(int);
		IconsStuff();
	private:
		HMODULE hShell32;
		HIMAGELIST hLarge;
		std::vector<int> transparent;
		HIMAGELIST hSmall;
};

class __declspec(dllimport) VolumeManagement
{
  public:
    std::vector<string> GetLogicalDrives_();
    string GetDriveType_(std::vector<string>);
    string GetDriveType_(string);
    vector<string> GetLogicalDriveStrings_();
    string GetVolumeInformation_(const char*);
    bool SetVolumeMointPoint_(const char*, const char*);
    bool DeleteVolumeMountPoint_(const char*);
    string GetVolumePathName_(const char*);
    string GetVolumeNameForVolumeMountPoint_(const char*);
    string FindFirstVolume_();
    string FindNextVolume_();
    string QueryDosDevice_(const char*);
    string GetVolumePathNamesForVolumeName_(const char*);
    string FormatFileSystemFlags(DWORD, LPCTSTR);
  private:
    bool FolderExists(char*);
    HANDLE drivehandle;
};
//---------------------------------------------------------------------------
#endif
