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

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include "Placemnt.hpp"
#include <ExtCtrls.hpp>
#include <ComCtrls.hpp>
#include <Menus.hpp>
#include <OleCtnrs.hpp>
#include "RXSplit.hpp"
#include <Dialogs.hpp>
#include "slave.h"

//---------------------------------------------------------------------------
class TMainForm : public TForm
{
__published:	// IDE-managed Components
        TEdit *IpEdit;
        TEdit *IdEdit;
        TLabel *Label1;
        TLabel *Label2;
        TLabel *Label3;
        TButton *ConnectButton;
        TComboBox *ComboBoxMsg1;
        TComboBox *ComboBoxMsg2;
        TButton *SendButton1;
        TButton *SendButton2;
        TListBox *ListBox;
        TSpeedButton *SpeedButton1;
        TSpeedButton *SpeedButton2;
        TButton *Button4;
        TEdit *PeriodEdit;
        TLabel *Label6;
        TEdit *CountEdit;
        TLabel *Label7;
        TCheckBox *CheckBox1;
        TComboBox *PortEdit;
        TFormStorage *FormStorage;
        TTimer *Timer;
        TLabel *LabelInfo;
        TStatusBar *StatusBar;
        TMainMenu *MainMenu1;
        TMenuItem *Options;
        TMenuItem *Inc1;
        TMenuItem *Maxrandomnumber1;
        TBevel *Bevel1;
        TMenuItem *Help1;
        TMenuItem *Minrandomnumber1;
        TMenuItem *N1;
        TMenuItem *Incrementendnumber1;
        TButton *ResetButton;
        TMenuItem *N2;
        TSpeedButton *SpeedButton3;
        TSpeedButton *SpeedButton4;
        TPopupMenu *ListPopupMenu;
        TMenuItem *Copy1;
        TMenuItem *Paste1;
        TMenuItem *Clearall1;
        TMenuItem *Random1;
        TPanel *AllPanel;
        TMemo *Memo1;
        TRxSplitter *RxSplitter1;
        TMenuItem *Count;
        TMenuItem *N3;
        TMenuItem *Autoreset1;
        TPanel *Panel1;
        TMemo *Memo2;
        TEdit *FilterEdit;
        TMenuItem *View1;
        TMenuItem *Clearlogs1;
        TComboBox *ComboBox1;
        TComboBox *ComboBox2;
        TSpeedButton *IPButton;
        TSpeedButton *SpeedButton5;
        TMenuItem *N4;
        TMenuItem *Savecallbacklog1;
        TSaveDialog *SaveDialog;
        TMenuItem *Savesendlog1;
        TMenuItem *Viewlogs1;
        TMenuItem *Autostopafterend1;
        TMenuItem *N5;
        TMenuItem *Clearrecievelogbeforesend1;
        void __fastcall SpeedButton1Click(TObject *Sender);
        void __fastcall SpeedButton2Click(TObject *Sender);
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall ConnectButtonClick(TObject *Sender);
        void __fastcall SendButton1Click(TObject *Sender);
        void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
        void __fastcall SendButton2Click(TObject *Sender);
        void __fastcall ListBoxKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall TimerTimer(TObject *Sender);
        void __fastcall Button4Click(TObject *Sender);
        void __fastcall CheckBox1Click(TObject *Sender);
        void __fastcall FormStorageRestorePlacement(TObject *Sender);
        void __fastcall PortEditChange(TObject *Sender);
        void __fastcall ListBoxDblClick(TObject *Sender);
        void __fastcall Inc1Click(TObject *Sender);
        void __fastcall Maxrandomnumber1Click(TObject *Sender);
        void __fastcall Help1Click(TObject *Sender);
        void __fastcall Minrandomnumber1Click(TObject *Sender);
        void __fastcall Incrementendnumber1Click(TObject *Sender);
        void __fastcall FormStorage1StoredValues0Save(TStoredValue *Sender,
          Variant &Value);
        void __fastcall FormStorage1StoredValues0Restore(
          TStoredValue *Sender, Variant &Value);
        void __fastcall FormStorage1StoredValues1Restore(
          TStoredValue *Sender, Variant &Value);
        void __fastcall FormStorage1StoredValues1Save(TStoredValue *Sender,
          Variant &Value);
        void __fastcall FormStorage1StoredValues2Restore(
          TStoredValue *Sender, Variant &Value);
        void __fastcall FormStorage1StoredValues2Save(TStoredValue *Sender,
          Variant &Value);
        void __fastcall FormStorage1StoredValues3Save(TStoredValue *Sender,
          Variant &Value);
        void __fastcall FormStorage1StoredValues3Restore(
          TStoredValue *Sender, Variant &Value);
        void __fastcall ResetButtonClick(TObject *Sender);
        void __fastcall ComboBoxMsg1KeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall ComboBoxMsg2KeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall SpeedButton4Click(TObject *Sender);
        void __fastcall SpeedButton3Click(TObject *Sender);
        void __fastcall Copy1Click(TObject *Sender);
        void __fastcall Paste1Click(TObject *Sender);
        void __fastcall Clearall1Click(TObject *Sender);
        void __fastcall Random1Click(TObject *Sender);
        void __fastcall FormMouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
        void __fastcall ListPopupMenuPopup(TObject *Sender);
        void __fastcall Autoreset1Click(TObject *Sender);
        void __fastcall IpEditKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall Clearlogs1Click(TObject *Sender);
        void __fastcall FormStorageStoredValues5Save(TStoredValue *Sender,
          Variant &Value);
        void __fastcall FormStorageStoredValues5Restore(
          TStoredValue *Sender, Variant &Value);
        void __fastcall FormStorageStoredValues6Restore(
          TStoredValue *Sender, Variant &Value);
        void __fastcall FormStorageStoredValues6Save(TStoredValue *Sender,
          Variant &Value);
        void __fastcall IPButtonClick(TObject *Sender);
        void __fastcall SpeedButton5Click(TObject *Sender);
        void __fastcall Savecallbacklog1Click(TObject *Sender);
        void __fastcall Savesendlog1Click(TObject *Sender);
        void __fastcall Viewlogs1Click(TObject *Sender);
private:
        bool is_connect;
        void __fastcall SetIsConnect(bool value);
        bool __fastcall GetIsConnect();
        AnsiString __fastcall GetComputerName();	// User declarations
public:		// User declarations
        __fastcall TMainForm(TComponent* Owner);
        Slave slave;
        AnsiString __fastcall ParseMsg(AnsiString msg);
        void SetTransparent(HWND hWnd, byte val);
        __property bool IsConnect  = { read=GetIsConnect, write=SetIsConnect };
        __property AnsiString ComputerName  = { read=GetComputerName };

protected:
       void __fastcall OnMyMessage(TMessage &Message);
BEGIN_MESSAGE_MAP
  MESSAGE_HANDLER(WM_FROM_CORE_MESSAGE, TMessage, OnMyMessage)
END_MESSAGE_MAP(TForm)


};
//---------------------------------------------------------------------------
extern PACKAGE TMainForm *MainForm;
//---------------------------------------------------------------------------
#endif
