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

#ifndef MainUnitH
#define MainUnitH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Buttons.hpp>
#include <ComCtrls.hpp>
#include "ZipBuilder.h"
#include "ZipBuilderSFX.h"
#include <Dialogs.hpp>
#include <ImgList.hpp>
#include <FileCtrl.hpp>

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

const char RS_FilenameIsNow[] = "Filename is now: ";
const char RS_ErrorDOccuredInConvertingFile[] = "Error %d occured in converting file";


class TMakeSFX : public TForm
{
__published:	// IDE-managed Components
  TPanel *Panel1;
  TLabel *Label3;
  TCheckBox *CmdLineCB;
  TCheckBox *FileListCB;
  TCheckBox *HideOverWriteCB;
  TRadioGroup *DfltOverWriteGrp;
  TButton *ExecBut;
  TButton *CloseBut;
  TCheckBox *AutoRunCB;
  TCheckBox *NoMsgShowCB;
  TEdit *FileEdit;
  TBitBtn *BitBtn3;
  TPanel *Panel2;
  TPageControl *SFXPage;
  TTabSheet *TabSheet1;
  TLabel *Label1;
  TLabel *L_CharsCountSFXMessage;
  TMemo *M_SFXMessage;
  TRadioGroup *GroupBox1;
  TTabSheet *TabSheet2;
  TLabel *Label2;
  TEdit *CaptionEdit;
  TTabSheet *TabSheet3;
  TImage *Image1;
  TLabel *Label4;
  TLabel *IconIndexLabel;
  TMemo *Memo4;
  TEdit *IconEdit;
  TGroupBox *GroupBox2;
  TLabel *Label5;
  TRadioButton *DefIconRB;
  TBitBtn *BitBtn2;
  TRadioButton *OrigIconRB;
  TEdit *IconIndexEdit;
  TUpDown *IconIndexUD;
  TTabSheet *TabSheet4;
  TMemo *Memo1;
  TEdit *CommandEdit;
  TTabSheet *TabSheet5;
  TBitBtn *BitBtn1;
  TMemo *Memo2;
  TComboBox *DirectoryEdit;
  TOpenDialog *OpenDialog1;
  TImageList *ImageList1;
  TOpenDialog *OpenDialog2;
  TZipBuilder *ZipBuilder1;
  TZipBuilderSFX *ZipBuilderSFX1;
  void __fastcall ExecButClick(TObject *Sender);
  void __fastcall CloseButClick(TObject *Sender);
  void __fastcall BitBtn3Click(TObject *Sender);
  void __fastcall FileEditChange(TObject *Sender);
  void __fastcall BitBtn1Click(TObject *Sender);
  void __fastcall FormShow(TObject *Sender);
  void __fastcall BitBtn2Click(TObject *Sender);
  void __fastcall DefIconRBClick(TObject *Sender);
  void __fastcall IconIndexUDClick(TObject *Sender, TUDBtnType Button);
  void __fastcall IconEditKeyPress(TObject *Sender, char &Key);
  void __fastcall ZipBuilder1DirUpdate(TObject *Sender);
  void __fastcall M_SFXMessageChange(TObject *Sender);

private:	// User declarations
  bool FCanUpdate;  // do not allow update before conversion
  void LoadCustomIcon(AnsiString IconPath,int IconIndex);// replace ZipBuilder1's sfx icon by a custom one
  void UpdateControlsFromZipBuilder(void); // set the form's controls according to ZipBuilder1's properties
  void UpdateZipBuilderFromControls(void); // set ZipBuilder1's properties from form controls

public:		// User declarations
  __fastcall TMakeSFX(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TMakeSFX *MakeSFX;
//---------------------------------------------------------------------------
#endif
