//---------------------------------------------------------------------------
#pragma hdrstop
#include "comm.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
void comm::NulstilSpecifikation(char* Navn)
{
    string temp = "Tids Specifikation - ";
    temp += Navn;
	GenSpe->Caption = temp.c_str();
    GenSpe->Slet();
}
void comm::IndsaetISpecifikation(double t, char* Tekst, int nr)
{
   GenSpe->TidGrid->Cells[0][nr] = Tekst;
    GenSpe->TidGrid->Cells[1][nr] = FloatToStrF(t, ffNumber, 6, 6);
}
void comm::OptaelLagteLektioner(int LL)
{
}
void comm::MeddelelseBox(char* tekst)
{
   Application->MessageBox(tekst, "Meddelelse", MB_OK);
}
void comm::FejlBox(char* meddelelse, char* Overskrift)
{
    Application->MessageBox(meddelelse, Overskrift, MB_OK);
}
bool comm::AcceptBox(char* str, char* Overskrift)
{
  int button = Application->MessageBox(str, Overskrift, MB_OKCANCEL);

    if(button == IDOK)
      return true;
    else if(button == IDCANCEL)
      return false;
}
void operator <<(const comm& obj, string str)
{
    Out->Memo1->Lines->Add(str.c_str());
}
void operator <<(const comm& obj, int tal)
{
   char temp[10];
    itoa(tal, temp, 10);
    Out->Memo1->Lines->Add(temp);
}
//----------------------------------------------------------------------------//

