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

#ifndef MainH
#define MainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <CheckLst.hpp>
#include <ComCtrls.hpp>
#include <Grids.hpp>
#include <Buttons.hpp>
#include <Dialogs.hpp>
#include <DBGrids.hpp>
#include <DBCGrids.hpp>
#include <DBCtrls.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TPageControl *PageControl1;
        TTabSheet *TabSheet1;
        TTabSheet *TabSheet2;
        TTabSheet *TabSheet3;
        TStringGrid *CFun;
        TStringGrid *LFun;
        TEdit *Var;
        TEdit *Lim;
        TLabel *Label1;
        TLabel *Label2;
        TCheckListBox *CheckVar;
        TLabel *Label3;
        TBitBtn *go;
        TBitBtn *open;
        TBitBtn *save;
        TButton *mmax;
        TLabel *Label4;
        TLabel *Label5;
        TComboBox *Metod;
        TLabel *Label6;
        TOpenDialog *OpenDialog;
        TSaveDialog *SaveDialog;
        TLabel *Label7;
        TMemo *Res;
        TMemo *Er;
        TMemo *DLVar;
        TCheckBox *CIter;
        TLabel *Label8;
        TCheckBox *Out;
        TLabel *Label9;
        TMemo *Memo1;
        void __fastcall VarChange(TObject *Sender);
        void __fastcall LimChange(TObject *Sender);
        void __fastcall mmaxClick(TObject *Sender);
        void __fastcall openClick(TObject *Sender);
        void __fastcall saveClick(TObject *Sender);
        void __fastcall MetodChange(TObject *Sender);
        void __fastcall goClick(TObject *Sender);
        void __fastcall CFunSetEditText(TObject *Sender, int ACol,
          int ARow, const AnsiString Value);
        void __fastcall LFunSetEditText(TObject *Sender, int ACol,
          int ARow, const AnsiString Value);
        
private:	// User declarations
void Gomory1();
bool LNorm();
void UpdateTables(int n1,int m1);
void PrintTable();
void PrintTableB();
void PrintTableToFile();
void Lmetod();
void LGiskl(int k1,int k2);
void PrintOtsech();
void PrintOtsechToFile();
bool Cel();
void Otsechenie();
void Normal();
bool Dop();
void Otsechenie3();
public:		// User declarations
        __fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
 
#endif
