//---------------------------------------------------------------------------
#ifndef mainframeUnitH
#define mainframeUnitH
//---------------------------------------------------------------------------
#include <vcl\graphics.hpp>
#include <vcl\Classes.hpp>
#include <vcl\Controls.hpp>
#include <vcl\StdCtrls.hpp>
#include <vcl\Forms.hpp>
#include <vcl\Menus.hpp>
#include <vcl\ExtCtrls.hpp>
#include <vcl\Buttons.hpp>
#include <vcl\Dialogs.hpp>
#include <vcl\MPlayer.hpp>
#include "Edderkop.h"
#include <vcl\ComCtrls.hpp>
//---------------------------------------------------------------------------
class TMainFrame : public TForm
{
__published:	// IDE-managed Components
	TMainMenu *MFMainMenu1;
		TMenuItem *Filer1;
		TMenuItem *Hjlp1;
		TMenuItem *About1;
		TMenuItem *NytSkemaprojekt1;
		TMenuItem *N1;
		TMenuItem *Exit1;
		TMenuItem *Printskema1;
		TMenuItem *N2;
	TMenuItem *Generer1;
	TMenuItem *Beregnskemaer1;
   TMenuItem *Opsaetning;
   TMenuItem *Cascade1;
   TMenuItem *Tile1;
	TMenuItem *About2;
	TMenuItem *N3;
	TMenuItem *Skema1;
	TMenuItem *Nytskema1;
	TPanel *ToolbarPanel;
		TPanel *MFPanel2;
		TPanel *MFPanel4;
		TPanel *MFPanel5;
		TPanel *MFPanel6;
		TPanel *MFPanel7;
		TPanel *MFPanel1;
		TPanel *MFPanel8;
		TPanel *MFPanel9;
	TStatusBar *StatusBar;
	TPanel *MFPanel10;
	TPanel *MFPanel11;
	TMenuItem *N4;
	TMenuItem *Nytholdskema1;
	TMenuItem *Nytlrerskema1;
	TMenuItem *Nytlokaleskema1;
	TPanel *MFPanel12;
	TImage *Image1;
	TImage *Image4;
	TImage *Image3;
	TImage *Image2;
	TImage *Image5;
	TImage *Image6;
	TImage *Image7;
	TImage *Image8;
	TImage *Image9;
	TImage *Image11;
	TImage *Image12;
	TMenuItem *Hentprojekt1;
	TMenuItem *Gemprojekt1;
    TMenuItem *ExportProject;
	TMenuItem *AutoGenerer;
	TMenuItem *CommBox;
    TMenuItem *SkrivebeskytDB;
    TMenuItem *Specifikationer;
	TPanel *Panel1;
	TImage *Image10;
	TImage *Image13;
	void __fastcall Exit1Click(TObject *Sender);
	void __fastcall Gemprojekt1Click(TObject *Sender);
   void __fastcall Cascade1Click(TObject *Sender);
   void __fastcall Tile1Click(TObject *Sender);
	void __fastcall MFPanel1MouseMove(TObject *Sender, TShiftState Shift, int X,	int Y);
	void __fastcall MFPanel2MouseMove(TObject *Sender, TShiftState Shift, int X,	int Y);
	void __fastcall ToolbarPanelMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
	void __fastcall MFPanel4MouseMove(TObject *Sender, TShiftState Shift, int X,	int Y);
	void __fastcall MFPanel5MouseMove(TObject *Sender, TShiftState Shift, int X,	int Y);
	void __fastcall MFPanel6MouseMove(TObject *Sender, TShiftState Shift, int X,	int Y);
	void __fastcall MFPanel7MouseMove(TObject *Sender, TShiftState Shift, int X,	int Y);
	void __fastcall MFPanel8MouseMove(TObject *Sender, TShiftState Shift, int X,	int Y);
	void __fastcall MFPanel9MouseMove(TObject *Sender, TShiftState Shift, int X,	int Y);
	void __fastcall MFPanel8Click(TObject *Sender);
	void __fastcall MFPanel7Click(TObject *Sender);
	void __fastcall MFPanel6Click(TObject *Sender);
	
	void __fastcall MFPanel2Click(TObject *Sender);
	void __fastcall MFPanel9Click(TObject *Sender);
	void __fastcall Printskema1Click(TObject *Sender);
	void __fastcall NytSkemaprojekt1Click(TObject *Sender);
	void __fastcall MFPanel10MouseMove(TObject *Sender, TShiftState Shift, int X,int Y);
	void __fastcall MFPanel11MouseMove(TObject *Sender, TShiftState Shift, int X,int Y);
	void __fastcall MFPanel12MouseMove(TObject *Sender, TShiftState Shift, int X,int Y);
	void __fastcall Beregnskemaer1Click(TObject *Sender);
	void __fastcall MFPanel10Click(TObject *Sender);
	void __fastcall MFPanel11Click(TObject *Sender);
	void __fastcall MFPanel12Click(TObject *Sender);
	void __fastcall FormMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
	void __fastcall Hentprojekt1Click(TObject *Sender);
    void __fastcall ExportProjectClick(TObject *Sender);
	void __fastcall AutoGenererClick(TObject *Sender);
	void __fastcall CommBoxClick(TObject *Sender);
    void __fastcall SkrivebeskytDBClick(TObject *Sender);
    void __fastcall SpecifikationerClick(TObject *Sender);
	void __fastcall Panel1MouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
	void __fastcall About2Click(TObject *Sender);
private:	// User declarations

public:		// User declarations
  //Funktioner.
	void SletEdderkop();
	void NyEdderkop();
	void UpdateStatusBar();
	void NulstilStatusBar();
    void luk(int type);

	 __fastcall TMainFrame(TComponent* Owner);
    //Betnyttes til at viderestille hints til statusbaren.
    void __fastcall VisHint(TObject* Sender);

  //div. lister.
    AnsiString dage[6];
    AnsiString tider[9];
    string HoldListe[200];
    string LaererListe[200];
    string LokaleListe[200];
    string PlanListeArray[100];
    int AntalHold;
    int AntalLaerer;
    int AntalLokaler;

  //objekter.
    Edderkop* e;
    comm comm;

  //sandhedsværdier omhandlende programmets tilstand.
    bool PlanListeHentet;     //Er planlisten fra DB allerede hentet.
    bool Genereret;           //Er projektet tidligere genereret.
    bool Skrivebeskyttet;     //Må man skrive til Databasen.
    bool TidsSpecifikationer; //Skal tidsspecifikations kassen vises.
};
//---------------------------------------------------------------------------
extern TMainFrame *MainFrame;
//---------------------------------------------------------------------------
#endif
