//---------------------------------------------------------------------------
void __fastcall TPictureViewer::FullViewBClick(TObject *Sender)
{
  TForm* ImageFullView = new TForm(this);
  ImageFullView->Color = FBackGroundColor;
  TImage* FullImage = new TImage(ImageFullView);
  FullImage->Transparent = Image->Transparent;
  try {
    ImageFullView->BorderStyle = bsToolWindow;
    ImageFullView->FormStyle   = fsStayOnTop;
    ImageFullView->Position    = poScreenCenter;
    ImageFullView->Caption     = GetString(sPicturePreview);
    FullImage->Left = 0;
    FullImage->Top  = 0;
    FullImage->AutoSize = true;
    FullImage->Picture = Image->Picture;
    ImageFullView->ClientWidth  = FullImage->Width;
    ImageFullView->ClientHeight = FullImage->Height;
    FullImage->Parent = ImageFullView;
    FullViewB->Enabled = false;
    ImageFullView->ShowModal();
    FullViewB->Enabled = true;
    delete FullImage;     FullImage = NULL;
    delete ImageFullView; ImageFullView = NULL;
    Image->Update();
  } catch (Exception &e) {
    if (FullImage)     delete FullImage;
    if (ImageFullView) delete ImageFullView;
    FullViewB->Enabled = true;
  }
}
Example #2
0
void __fastcall TGLForm2D::FormMouseDown(TObject *Sender,
      TMouseButton Button, TShiftState Shift, int X, int Y)
{
        GLdouble relacionAncho = (xRight-xLeft)/ClientWidth;
        GLdouble relacionAlto = (yTop-yBot)/ClientHeight;
        GLdouble cx = xLeft + (GLfloat)X*relacionAncho;
        GLdouble cy = yTop - (GLfloat)Y*relacionAlto;
        if(Button == mbLeft){
                if(!seleccionar){
                        int tam;
                        if(sc->getArbol()->empty()){
                                TForm* x = new TFormS(this,tam);
                                x->Caption = "Introduce Tamaño";
                                x->ShowModal();
                        }
                        sc->getArbol()->anidar(cx,cy,aleatorio,tam);
                }
                else if(!sc->getArbol()->empty()){
                        PVD2* p = new PVD2(cx,cy);
                        if(sc->getArbol()->selCuadrado(p))
                                seleccionar = false;
                        delete p; p = NULL;
                }else{
                        seleccionar = false;
                        ShowMessage("No hay nada que seleccionar!");
                }
                GLScene();
        }
        else{
                sc->getArbol()->desanidar();
                GLScene();
        }
}
Example #3
0
//---------------------------------------------------------------------------
void SetNewPageFromDLL(AnsiString DLLName)
{
 if (!FileExists(DLLName)) return;

 TPageControl *myPages=FormSelected->PageControlSelected;

 if (!Pages) CountPagesBefore=myPages->PageCount;

 TForm *Form;
 dllInstance = LoadLibrary(DLLName.c_str());

 if (!Pages) Pages = new TList();
 if (!dllInstances) dllInstances=new TList();
 dllInstances->Add(dllInstance);

 CreatePage = NULL;
 CreatePage = (TCreate *)GetProcAddress(dllInstance, "_CreatePage");
 GetTitlePage = (TGetTitle *)GetProcAddress(dllInstance, "_GetTitlePage");
 if (CreatePage)
 {
  Form = CreatePage(myPages->PageCount,FormSelected);
  Pages->Add(Form);
  Form->ManualDock(myPages, NULL, alClient);
  Form->Visible = true;
//  myPages->ActivePageIndex = myPages->PageCount - 1;
 }
 if (GetTitlePage)
   myPages->Pages[myPages->PageCount-1]->Caption=AnsiString(GetTitlePage());
}
Example #4
0
void __fastcall TGLForm2D::ZoomOutClick(TObject *Sender)
{
        int factor;
        TForm* x = new TFormS(this,factor);
        x->Caption = "Introduce Factor";
        x->ShowModal();
        int pasos;
        TForm* y = new TFormS(this,pasos);
        y->Caption = "Introduce nº de pasos";
        y->ShowModal();
        GLdouble fIncr= (factor-1)/(GLdouble)pasos;
        GLdouble ancho = (xRight-xLeft); GLdouble alto =(yTop-yBot);
        for(int i=0;i<=pasos;i++){
                GLdouble fAux= 1 + fIncr*i;
                GLdouble anchoNew= ancho*fAux; GLdouble altoNew= alto*fAux;
                glMatrixMode(GL_PROJECTION);
                glLoadIdentity();
                gluOrtho2D(centroX-anchoNew/2.0, centroX+anchoNew/2.0,
                centroY-altoNew/2.0, centroY+altoNew/2.0);
                GLScene();
                Sleep(50);
        }
        nuevoAncho = (xRight-xLeft)*factor;
        nuevoAlto = (yTop-yBot)*factor;
        yBot = centroY-(nuevoAlto/2.0);
        yTop = centroY+(nuevoAlto/2.0);
        xRight = centroX+(nuevoAncho/2.0);
        xLeft = centroX-(nuevoAncho/2.0);
        GLScene();
        sc->set(xLeft,xRight,yTop,yBot);
}
Example #5
0
TForm *TSpecDefinition::initForm()
{
	TForm *f = new TForm();
	TPage *p;

	TMeasurements m = TMeasurements();

	/* Contructing Page 1... */
	p = new TPage( "Kostenstelle" );
	m.reset();

	p->insert( new TSpecCardTextField( m, "Nummer", 3 ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 12, 0 );
	p->lastInserted->enableCardLabel( 0, 1 );
	p->lastInserted->setInfoLevel( ilNormal );

	p->insert( new TSpecCardTextField( m, "Bezeichnung", 29, moVert ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCardLabel( 0, 0 );
	p->lastInserted->setInfoLevel( ilNormal );

	p->insert( new THiddenConstField( m, "KOSTENSTELLE", 12 ) );
	p->lastInserted->enableCard( 0, 0 );

	p->insert( new THiddenConstField( m, "KOSTENSTELLE", 12 ) );
	p->lastInserted->enableCard( 0, 1 );

	p->insert( new THiddenConstField( m, "KOSTENSTELLE", 12 ) );
	p->lastInserted->enableCard( 0, 2 );

	f->insert( p );
	return f;
}
Example #6
0
//---------------------------------------------------------------------------
void __fastcall TRouteSheet::AddButtonClick(TObject *Sender) //Добавление контрагента
{
//CounterpartyRouteSheet->Show();
  TForm *myCounterpartyRouteSheet = new TCounterpartyRouteSheet(this);
  myCounterpartyRouteSheet->ShowModal();
  delete myCounterpartyRouteSheet;
}
void __fastcall TFormClasificacion::ButtonAnyadirPartidoClick(
      TObject *Sender)
{
TForm *x = new TFormAnyadirPartido(this,t);
x->ShowModal();
delete x;
MostrarClasificacion();
}
void __fastcall TFormClasificacion::ButtonListadoPartidosClick(
      TObject *Sender)
{
TForm *x = new TFormListadoPartidos(this,t);
x->ShowModal();
delete x;
MostrarClasificacion();
}
void __fastcall TFormClasificacion::ButtonBorrarEquipoClick(
      TObject *Sender)
{
TForm *x = new TFormBorrarEquipo(this,t);
x->ShowModal();
delete x;
MostrarClasificacion();
}
Example #10
0
TForm *TSpecDefinition::initForm()
{
	TForm *f = new TForm();
	TPage *p;

	TMeasurements m = TMeasurements();

	/* Contructing Page 1... */
	p = new TPage( "Mitarbeiter" );
	m.reset();

	p->insert( new TTextField( m, "Titel", 10 ) );

	p->insert( new TNameField( m, "Name   ", 30 ) );

	p->insert( new TNameField( m, "Vorname", 15, moNoSpace ) );

	p->insert( new TDateField( m, "Geburtsdatum", 10, "TT.MM.JJJJ", moHor ) );
	p->lastInserted->setInfoLevel( ilNormal );

/*	p->insert( new TRadioField( m, "Geschlecht",
								2,
								new TSItem( "M�nnlich",
								new TSItem( "Weiblich",
								new TSItem( "S�ugling m�nnlich",
								new TSItem( "S�ugling weiblich",
								0 )))),
								new TSItem( "M",
								new TSItem( "W",
								new TSItem( "SM",
								new TSItem( "SW",
								0 )))),
								moDown ) ); */

	p->insert( new TTextField( m, "Abteilung/Kostenstelle", 30, moVert ) );
	p->insert( new TTextField( m, "Funktion", 30, moVert ) );
	p->insert( new TTextField( m, "Zuordnung   ", 5, moHor ) );
	p->insert( new TTextField( m, "Berechtigung", 2, moHor | moDown | moNoSpace ) );

	m.control.a.y += 3;
	m.control.b.y += 3;

	f->insert( p );

	/* Contructing Page 2... */
	p = new TPage( "Passwort" );
	m.reset();
//	m.control.a.y -= 2;
//	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Passwort", 8 ) );
	p->insert( new THiddenConstField( m, "", 288 ) );
	p->insert( new THiddenConstField( m, "#S#", 3 ) );

	f->insert( p );

	return f;
}
Example #11
0
//---------------------------------------------------------------------------
void __fastcall TfrmMain::New1Click(TObject *Sender)
{
	TForm* p = new TfrmView(this);
    p->Caption = "Untitled";
    p->FreeOnRelease();
    p->Show();

    this->Tile();
}
Example #12
0
//---------------------------------------------------------------------------
void __fastcall TFrm1010::ShowAppForms()
{
   SfgForm *AppForm;
   TForm *form = new TForm(Application);
   TStringAlignGrid *grdAppForms = new TStringAlignGrid(form);
   form->ClientHeight = 154;
   form->ClientWidth = 402;
   form->BorderStyle = bsDialog;
   form->BorderIcons = TBorderIcons() << biSystemMenu;
   form->Caption = "Escolher Programa";
   form->Position = poDesktopCenter;
   grdAppForms->Parent = form;
   grdAppForms->ColCount = 4;
   grdAppForms->DefaultRowHeight = 18;
   grdAppForms->AlignCol[1] = alCenter;
   grdAppForms->AlignCell[1][0] = alCenter;
   grdAppForms->AlignCell[2][0] = alCenter;
   grdAppForms->Cells[1][0] = "Programa";
   grdAppForms->Cells[2][0] = "Título";
   grdAppForms->Cells[3][0] = "Módulo";
   grdAppForms->ColWidths[0] = 14;
   grdAppForms->ColWidths[1] = 74;
   grdAppForms->ColWidths[2] = 190;
   grdAppForms->ColWidths[3] = 100;
   grdAppForms->Align = alClient;
   grdAppForms->OnDblClick = &grdAppFormsDblClick;
   grdAppForms->Options = grdAppForms->Options << goColSizing << goRowSelect;
   grdAppForms->RowCount = 2;

   for (int i=0; i<AppForms->Count;i++) {
      AppForm = (SfgForm*)AppForms->Items[i];
      if (i > 0)
        grdAppForms->RowCount++;
      grdAppForms->Cells[1][i+1] = AppForm->FormClass;
      grdAppForms->Cells[2][i+1] = AppForm->FormTitle;
      switch(AppForm->FormModule) {
         case APP_MODULO_ESTOQUE:
            grdAppForms->Cells[3][i+1] = "Estoque";
            break;
         case APP_MODULO_COMPRAS:
            grdAppForms->Cells[3][i+1] = "Compras";
            break;
         case APP_MODULO_VENDAS:
            grdAppForms->Cells[3][i+1] = "Vendas";
            break;
         case APP_MODULO_FINANCAS:
            grdAppForms->Cells[3][i+1] = "Finanças";
            break;
         default:
            grdAppForms->Cells[3][i+1] = "Padrão";
      }
   }
   grdAppForms->SortColumn(1,true);
   grdAppForms->Row = 1;
   form->ShowModal();
   delete form;
}
Example #13
0
//---------------------------------------------------------------------------
void __fastcall TfrmMain::CreateExample1Click(TObject *Sender)
{
	g_painterType = GDI1->Checked ? PAINTER_GDI : PAINTER_OPENGL;

	g_viewType = VIEW_EXAMPLE;
	TForm* p = new TfrmView(this);
	p->Caption = "Example Window";
	p->FreeOnRelease();
	p->Show();

	fLayers->Caption 			= "Example Window";
	fPropertiesMain->Caption	= "Example Window";
	this->Tile();
}
Example #14
0
void __fastcall TfrmMain::LayerExample1Click(TObject *Sender)
{
	this->Properties1->Enabled = true;
	g_painterType = GDI1->Checked ? PAINTER_GDI : PAINTER_OPENGL;

	g_viewType = VIEW_LAYEREX;
	TForm* p = new TfrmView(this);
	p->Caption = "Layer Example";
	p->FreeOnRelease();
	p->Show();

	fLayers->Caption 			= "Layer Example";
	fPropertiesMain->Caption 	= "Layer Example";
	this->Tile();
}
Example #15
0
//---------------------------------------------------------------------------
//メッセージダイアログの表示(スレッドオブジェクトから呼ばれる)
//---------------------------------------------------------------------------
int __fastcall TForm1::ShowConfirmMassageForm
	(String MsgText, TMsgDlgType MsgType, TMsgDlgButtons MsgButtons, TMsgDlgBtn MsgDefaultButton)
{

TForm *dlg = CreateMessageDialog(MsgText, MsgType, MsgButtons, MsgDefaultButton);
dlg->ParentWindow = Form1->Handle;

if ( MsgType == mtError) {
	dlg->Caption = LoadResourceString(&Msgexeout::_MSG_CAPTION_ERROR);
}
else {
	dlg->Caption = LoadResourceString(&Msgexeout::_MSG_CAPTION_CONFIRMATION);
}

//メッセージダイアログの表示
int ret = dlg->ShowModal();
delete dlg;
return(ret);

}
Example #16
0
int main(void)
{
    TSortedCollection *collection;
    int i;
    TForm *f;
    void *p;
    fpstream *s;
    TResourceFile* r;

    cout <<"Creating  " << rezFileName << "\n";

    // Construct stream and resource
    s = new fpstream (rezFileName, ios::out|ios::binary);
    r = new TResourceFile(s);

    // Form
    f = makeForm();
    r->put(f, "FormDialog");

    // Data
    collection = new TDataCollection((dataCount + 10), 5, sizeof(TDataRec),
                                     dataKeyType);
    collection->duplicates = allowDuplicates;
    for(i = 0; i < dataCount; ++i)
    {
        p = new TDataRec;
        f->setData((void *)&data[i]);      // move into object
        f->getData(p);                     // move onto heap
        collection->insert(p);             // insert in sorted order
    }
    r->put(collection, "FormData");

    // Done
    TObject::destroy(f);
    TObject::destroy((TCollection *)collection);
    TObject::destroy(r);
    return 0;
}
Example #17
0
//---------------------------------------------------------------------------
//上書き確認メッセージダイアログの表示(復号スレッドオブジェクトから呼ばれる)
//---------------------------------------------------------------------------
int __fastcall TForm1::ShowConfirmOverwriteMassageForm(String MsgText, String &Path)
{

//ボタンをカスタマイズするので上記関数と分けて作成

TButton *btn;
TMsgDlgButtons MsgButtons = (TMsgDlgButtons() << mbYesToAll << mbYes << mbNo << mbCancel);
TForm *dlg = CreateMessageDialog(MsgText, mtConfirmation, MsgButtons, mbCancel);

//ボタン名をそれぞれ書き換える
btn = (TButton *)dlg->FindComponent("YesToAll");   //'全て上書き(&W)'
btn->Caption = LoadResourceString(&Msgexeout::_DIALOG_BUTTON_NAME_OVERWITE_YES_TO_ALL);
btn = (TButton *)dlg->FindComponent("Yes");        //'上書き(&O)'
btn->Caption = LoadResourceString(&Msgexeout::_DIALOG_BUTTON_NAME_OVERWITE_YES);
btn = (TButton *)dlg->FindComponent("No");         //'別名保存(&A)'
btn->Caption = LoadResourceString(&Msgexeout::_DIALOG_BUTTON_NAME_OVERWITE_NO);
btn = (TButton *)dlg->FindComponent("Cancel");     //'キャンセル(&C)'
btn->Caption = LoadResourceString(&Msgexeout::_DIALOG_BUTTON_NAME_OVERWITE_CANCEL);

dlg->Caption = LoadResourceString(&Msgexeout::_MSG_CAPTION_CONFIRMATION);
dlg->ParentWindow = Form1->Handle;

//メッセージダイアログの表示
int ret = dlg->ShowModal();

if (ret == mrNo) { //別名で保存する(いいえ)

	TSaveDialog *dlgsave = new TSaveDialog(dlg);
	//'復号ファイルの保存'
	dlgsave->Title = LoadResourceString(&Msgexeout::_DIALOG_SAVE_AS_FILE_CAPTION);
	dlgsave->InitialDir = ExtractFileDir(ExcludeTrailingPathDelimiter(Path));
	dlgsave->FileName = ExtractFileName(ExcludeTrailingPathDelimiter(Path));
	//'ファイルフォルダー|*'
	dlgsave->Filter = LoadResourceString(&Msgexeout::_DIALOG_SAVE_AS_FILTER);
	//別名保存ダイアログ
	if ( dlgsave->Execute() == true ){
		Path = dlgsave->FileName;
	}
	else{
		//キャンセル
		ret = mrCancel;
	}
	delete dlgsave;
}

delete dlg;
return(ret);

}
Example #18
0
TForm *TSpecDefinition::initForm()
{
	TForm *f = new TForm();
	TPage *p;

	TMeasurements m = TMeasurements();

	/* Contructing Page 1... */
	p = new TPage( "Personalien I" );
	m.reset();

	p->insert( new TNumericField( m, "Patientennr.", 10, "." ) );
	p->lastInserted->makeNecessary();
//	p->lastInserted->enableCard( 0, 1 );
	p->lastInserted->enableCard( 29, 1 );
	p->lastInserted->enableCardLabel( 18, 4 );

	p->insert( new TNameField( m, "Name   ", 26 ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 0, 0 );
	p->lastInserted->enableCardLabel( 1, 0 );

	p->insert( new TNameField( m, "Vorname", 12, moNoSpace ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 26, 0 );
	p->lastInserted->enableCardLabel( 1, 1 );

	p->insert( new TTextField( m, "Strasse, Nr.", 26 ) );
	p->lastInserted->enableCard( 64, 0 );

	p->insert( new TTextField( m, "PLZ, Ort    ", 26, moNoSpace ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 38, 0 );
	p->lastInserted->enableCardLabel( 1, 2 );

	p->insert( new TNumericField( m, "Steuer-Code", 3, " ", moVert ) );

	p->insert( new TTextField( m, "Heimatort/Nat.", 18, moVert | moRight ) );

	p->insert( new TDateField( m, "Geburtsdatum", 10, "TT.MM.JJJJ", moHor ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 9, 1 );
	p->lastInserted->enableCardLabel( 1, 3 );
	p->lastInserted->setInfoLevel( ilNormal );

	p->insert( new TRadioField( m, "Geschlecht",
								2,
								new TSItem( "M�nnlich",
								new TSItem( "Weiblich",
								new TSItem( "S�ugling m�nnlich",
								new TSItem( "S�ugling weiblich",
								0 )))),
								new TSItem( "M",
								new TSItem( "W",
								new TSItem( "SM",
								new TSItem( "SW",
								0 )))),
								moDown ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 19, 1 );
	p->lastInserted->enableCardLabel( 13, 3 );

	m.control.a.y += 3;
	m.control.b.y += 3;

	f->insert( p );

	/* Contructing Page 2... */
	p = new TPage( "Personalien II" );
	m.reset();
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TRadioField( m, "Zivilstand",
								5,
								new TSItem( "ledig",
								new TSItem( "verheiratet",
								new TSItem( "geschieden",
								new TSItem( "getrennt",
								new TSItem( "verwitwet", 0 ))))),
								new TSItem( "LEDIG",
								new TSItem( "VERH.",
								new TSItem( "GESCH",
								new TSItem( "GETR.",
								new TSItem( "VERW.", 0 ))))),
								moDown ) );

	m.control.a.y += 4;
	m.control.b.y += 4;

	p->insert( new TRadioField( m, "Konfession",
								5,
								new TSItem( "reformiert",
								new TSItem( "r�misch-katholisch",
								new TSItem( "christlich-katholisch",
								new TSItem( "neuapostolisch",
								new TSItem( "freikirchlich",
								new TSItem( "j�disch",
								new TSItem( "islamisch",
								new TSItem( "budhistisch",
								new TSItem( "andere",
								new TSItem( "keine", 0 )))))))))),
								new TSItem( "REF",
								new TSItem( "RK",
								new TSItem( "CHK",
								new TSItem( "NAP",
								new TSItem( "FK",
								new TSItem( "J�D",
								new TSItem( "ISLAM",
								new TSItem( "BUDHA",
								new TSItem( "AND",
								new TSItem( "KEINE", 0 )))))))))),
								moDown ) );

	f->insert( p );

	/* Contructing Page 3... */
	p = new TPage( "Personalien III" );
	m.reset();

	p->insert( new TNumericField( m, "Telefon Privat", 13, " -/" ) );
	p->insert( new TTextField( m, "Ehepartner", 26 ) );

	p->insert( new TTextField( m, "Beruf", 18 ) );
	p->insert( new TTextField( m, "Arbeitgeber ", 34 ) );
	p->insert( new TNumericField( m, "Telefon Arb.", 13, " -/", moNoSpace ) );

	p->insert( new TTextField( m, "Angeh�rige 1", 34 ) );
	p->insert( new TNumericField( m, "Telefon Ang.", 13, " -/", moNoSpace ) );

	p->insert( new TTextField( m, "Angeh�rige 2", 34 ) );
	p->insert( new TNumericField( m, "Telefon Ang.", 13, " -/", moNoSpace ) );

	p->insert( new TTextField( m, "Angeh�rige 3", 34 ) );
	p->insert( new TNumericField( m, "Telefon Ang.", 13, " -/", moNoSpace ) );


	f->insert( p );

	/* Contructing Page 4... */
	p = new TPage( "Eintritt" );
	m.reset();

	p->insert( new TTextField( m, "Klasse ", 1 ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 94, 0 );
	p->lastInserted->enableCardLabel( 13, 4 );

	p->insert( new TTextField( m, "Abteilung ", 4 ) );
	p->lastInserted->enableCard( 90, 0 );
	p->lastInserted->enableCardLabel( 1, 4 );

	p->insert( new TTextField( m, "Station", 1 ) );
	p->insert( new TTextField( m, "Zimmer-Nr.", 3 ) );

	p->insert( new TTextField( m, "Eintritts-Code", 1 ) );

	p->insert( new TDateField( m, "Eintr.Datum", 8, "TT.MM.JJ" ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 21, 1 );
	p->lastInserted->enableCardLabel( 20, 3 );

	p->insert( new TNumericField( m, "Zeit", 5, ".", moRight ) );
	p->insert( new TTextField( m, "Eintr.Grund", 15 ) );

	p->insert( new TNumericField( m, "Fr�h.Aufenthalt", 7, " ,/-" ) );

	p->insert( new TTextField( m, "Taxkat.", 2 ) );

	p->insert( new TTextField( m,    "Garant 1", 34 ) );
	p->insert( new TTextField( m, "Mitglied-Nr.", 15, moNoSpace ) );

	p->insert( new TTextField( m,    "Garant 2", 34 ) );
	p->insert( new TTextField( m, "Mitglied-Nr.", 15, moNoSpace ) );

	f->insert( p );

	/* Contructing Page 5... */
	p = new TPage( "�rzte" );
	m.reset();

	m.control.a.y++;
	m.control.b.y++;

	p->insert( new TTextField( m, "Zustelladresse", 34, moVert ) );
	p->insert( new TTextField( m, 0, 34, moNoSpace ) );
	p->insert( new TTextField( m, 0, 34, moNoSpace ) );

	p->insert( new TTextField( m, "Einweisender Arzt", 34, moVert ) );
	p->insert( new TTextField( m, "Hausarzt ", 34, moVert ) );
	p->insert( new TTextField( m, "Behandelnder Arzt", 15 ) );

	m.control.a.y++;
	m.control.b.y++;

	p->insert( new TTextField( m, "Aufgenommen durch", 5, moHor ) );
	f->insert( p );

	return f;
}
Example #19
0
TForm *TSpecDefinition::initForm()
{
	TForm *f = new TForm();
	TPage *p;

	TMeasurements m = TMeasurements();

	/* Contructing Page 1... */
	p = new TPage( "Personalien I" );
	m.reset();

	p->insert( new TNumericField( m, "Patientennr.", 8, "." ) );
	p->lastInserted->enableCard( 0, 1 );
	p->lastInserted->enableCardLabel( 20, 4 );

	p->insert( new TNameField( m, "Name, Vorname", 30, moVert ) );
	p->lastInserted->enableCard( 0, 0 );
	p->lastInserted->enableCardLabel( 0, 1, 28 );

	p->insert( new TTextField( m, "Strasse, Nr.", 30, moVert ) );
	p->lastInserted->enableCard( 30, 0 );
	p->lastInserted->enableCardLabel( 0, 2, 28 );

	p->insert( new TTextField( m, "PLZ, Wohnort", 30, moVert ) );
	p->lastInserted->enableCard( 60, 0 );
	p->lastInserted->enableCardLabel( 0, 3, 28 );

	p->insert( new TDateField( m, "Geburtsdatum", 10, "TT.MM.JJJJ", moDown ) );
	p->lastInserted->enableCard( 105, 0 );
	p->lastInserted->enableCardLabel( 0, 4 );

	p->insert( new TTextField( m, "Geschlecht", 1, moHor ) );
	p->lastInserted->enableCard( 115, 0 );
	p->lastInserted->enableCardLabel( 11, 4 );

	p->insert( new TDateField( m, "Eintrittsdatum", 10, "TT.MM.JJJJ",
							   moDown ) );
	p->lastInserted->enableCard( 98, 1 );

	m.control.a.y += 3;
	m.control.b.y += 3;

	f->insert( p );

	/* Contructing Page 2... */
	p = new TPage( "Personalien II" );
	m.reset();
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TRadioField( m, "Zivilstand",
								5,
								new TSItem( "ledig",
								new TSItem( "verheiratet",
								new TSItem( "geschieden",
								new TSItem( "getrennt",
								new TSItem( "verwitwet", 0 ))))),
								new TSItem( "ledig       ",
								new TSItem( "verheiratet ",
								new TSItem( "geschieden  ",
								new TSItem( "getrennt    ",
								new TSItem( "verwitwet   ", 0 ))))),
								moDown ) );

	p->lastInserted->enableCard( 0, 2 );

	m.control.a.y += 4;
	m.control.b.y += 4;

	p->insert( new TRadioField( m, "Klasse    ",
								5,
								new TSItem( "PRIV.",
								new TSItem( "PRIV. AKUT",
								new TSItem( "PRIV. E",
								new TSItem( "HALBPRIV.",
								new TSItem( "HP AKUT",
								new TSItem( "HP E+B4",
								new TSItem( "ALLG.",
								new TSItem( "ALLG. AKUT",
								new TSItem( "BLI",
								new TSItem( "UNBEK.", 0 )))))))))),
								new TSItem( "PRIVAT      ",
								new TSItem( "PRIVAT AKUT ",
								new TSItem( "PRIVAT E    ",
								new TSItem( "HALBPRIVAT  ",
								new TSItem( "HP AKUT     ",
								new TSItem( "HP E+E4     ",
								new TSItem( "ALLGEMEIN   ",
								new TSItem( "ALLG. AKUT  ",
								new TSItem( "BLI         ",
								new TSItem( "UNBEKANNT   ", 0 )))))))))),
								moDown ) );
	p->lastInserted->enableCard( 108, 1);

	f->insert( p );

	return f;
}
Example #20
0
TForm *TSpecDefinition::initForm()
{
	TForm *f = new TForm();
	TPage *p;

	TMeasurements m = TMeasurements();

	/* Contructing Page 1... */
	p = new TPage( "Patientendaten I" );
	m.reset();

	p->insert( new TTextField( m, "Aufnahmenummer",  8 ) );
	p->insert( new TNameField( m, "Name", 32, moVert ) );
	p->insert( new TTextField( m, "Geburtsname", 20, moHor ) );
	p->insert( new TTextField( m, "Geburtsdatum", 8 ) );
	p->insert( new TTextField( m, "PLZ", 5, moDown ) );
	p->insert( new TTextField( m, "Wohnort", 23 ) );
	p->insert( new TTextField( m, "Strasse", 29 ) );
	p->insert( new TTextField( m, "Familienstand", 1 ) );
	p->insert( new TTextField( m, "Geschlecht", 1, moRight ) );

	f->insert( p );

	/* Contructing Page 2... */
	p = new TPage( "Patientendaten II" );
	m.reset();

	p->insert( new TTextField( m, "Herkunftsschl�ssel", 2 ) );
	p->insert( new TTextField( m, "Staatsangeh�rigkeit", 2, moDown ) );
	p->insert( new TTextField( m, "Religion", 1, moDown ) );
	p->insert( new TTextField( m, "Einweisungsart", 2, moDown ) );
	p->insert( new TTextField( m, "Aufnahmedatum", 6, moDown ) );
	p->insert( new TTextField( m, "Aufnahmeuhrzeit", 4, moDown ) );
	p->insert( new TTextField( m, "Klinik/Station", 4, moDown ) );
	p->insert( new TTextField( m, "Pflegesatzschl�ssel", 2, moDown ) );
	p->insert( new TTextField( m, "Zimmerzuschlagkennz.", 2, moDown ) );

	f->insert( p );

	/* Contructing Page 3... */
	p = new TPage( "Entlass./Kostentr." );
	m.reset();

	p->insert( new TTextField( m, "Liquidationskennz.", 2 ) );
	p->insert( new TTextField( m, "Entlassungsdatum", 4 ) );
	p->insert( new TTextField( m, "Entlassungsuhrzeit", 4 ) );
	p->insert( new TTextField( m, "Entlassungsart", 1 ) );
	p->insert( new TTextField( m, "Externes Krankenhaus", 1 ) );
	p->insert( new TTextField( m, "Kostentr�gerschl�ssel", 4 ) );
	p->insert( new TTextField( m, "Kostentr�gername", 29, moVert ) );
	p->insert( new TTextField( m, "PLZ", 5, moVert ) );
	p->insert( new TTextField( m, "Ort", 11 ) );

	f->insert( p );

	/* Contructing Page 4... */
	p = new TPage( "Stammversicherter" );
	m.reset();
	m.control.a.y++; m.control.b.y++;

	p->insert( new TTextField( m, "Aktenzeichen Kostentr�ger", 30, moVert ) );
	p->insert( new TTextField( m, "Mitgliedsart", 1, moHor ) );
	p->insert( new TTextField( m, "Name Stammversicherter", 26, moVert ) );
	p->insert( new TTextField( m, "Geburtsdatum Stammvers.", 8, moHor ) );
	p->insert( new TTextField( m, "Beruf Stammvers.", 20, moVert ) );
	p->insert( new TTextField( m, "Arbeitgeber Stammvers.", 25, moVert ) );

	f->insert( p );

	/* Contructing Page 5... */
	p = new TPage( "Angeh�rige/Arzt" );
	m.reset();
	m.control.a.y++; m.control.b.y++;

	p->insert( new TTextField( m, "Name n�chster Angeh�riger", 32, moVert ) );
	p->insert( new TTextField( m, "PLZ", 5, moVert ) );
	p->insert( new TTextField( m, "Wohnort", 23 ) );
	p->insert( new TTextField( m, "Strasse", 30 ) );
	p->insert( new TTextField( m, "Telefon Angeh.", 12, moHor ) );
	p->insert( new TTextField( m, "Schl�ssel einweisender Arzt", 4 ) );
	p->insert( new TTextField( m, "Name einweisender Arzt", 28, moVert ) );

	f->insert( p );



	return f;
}
Example #21
0
void __fastcall TGLForm2D::FormKeyDown(TObject *Sender, WORD &Key,
      TShiftState Shift)
{

switch(Key){
        case(TECLA_E):
                cols = 0;
                while(!embaldosa && cols <= 0){
                        TForm* x = new TFormS(this,cols);
                        x->Caption = "Introduce Columnas";
                        x->ShowModal();
                }
                embaldosa = !embaldosa;
                if(!embaldosa)
                        glViewport(0,0,ClientWidth,ClientHeight);
                break;
        case(KEY_LEFT):
                xLeft += 5;
                xRight += 5;
                centroX += 5;
                sc->set(xLeft,xRight,yTop,yBot);
                break;
        case(KEY_RIGHT):
                xLeft -= 5;
                xRight -= 5;
                centroX -= 5;
                sc->set(xLeft,xRight,yTop,yBot);
                break;
        case(KEY_UP):
                yTop -= 5;
                yBot -= 5;
                centroY -= 5;
                sc->set(xLeft,xRight,yTop,yBot);
                break;
        case(KEY_DOWN):
                yTop += 5;
                yBot += 5;
                centroY += 5;
                sc->set(xLeft,xRight,yTop,yBot);
                break;
        case(ZOOM_IN):
                nuevoAncho = (xRight-xLeft)/1.1;
                nuevoAlto = (yTop-yBot)/1.1;
                yBot = centroY-(nuevoAlto/2.0);
                yTop = centroY+(nuevoAlto/2.0);
                xRight = centroX+(nuevoAncho/2.0);
                xLeft = centroX-(nuevoAncho/2.0);
                sc->set(xLeft,xRight,yTop,yBot);
                break;
        case(ZOOM_OUT):
                nuevoAncho = (xRight-xLeft)*1.1;
                nuevoAlto = (yTop-yBot)*1.1;
                yBot = centroY-(nuevoAlto/2.0);
                yTop = centroY+(nuevoAlto/2.0);
                xRight = centroX+(nuevoAncho/2.0);
                xLeft = centroX-(nuevoAncho/2.0);
                sc->set(xLeft,xRight,yTop,yBot);
                break;
}
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(xLeft,xRight, yBot,yTop);

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
GLScene();
}
Example #22
0
TForm *TSpecDefinition::initForm()
{
	TForm *f = new TForm();
	TPage *p;

	TMeasurements m = TMeasurements();

	/* Contructing Page 1... */
	p = new TPage( "Personalien I" );
	m.reset();

	p->insert( new TNameField( m, "Name", 28 ) );
//	p->lastInserted->enableCard( 0, 0 );
//	p->lastInserted->enableCardLabel( 0, 0, 27 );

	p->insert( new TTextField( m, "Geb./Ledigername", 20 ) );
//	p->lastInserted->enableCard( 30, 0 );
//	p->lastInserted->enableCardLabel( 0, 1 );

	p->insert( new THiddenConstField( m, "", 8 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TNameField( m, "Vorname", 18 ) );

	p->insert( new THiddenConstField( m, "", 10 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Anrede", 20 ) );
	p->insert( new TTextField( m, "Pflegeklasse", 10 ) );

	p->insert( new THiddenConstField( m, "", 10 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TDateField( m, "Geb.Datum", 10, "TT.MM.JJJJ" ) );
	p->insert( new TDateField( m, "E-Datum", 10, "TT.MM.JJJJ", moVert | moDown ) );
	p->insert( new TTextField( m, "Fallnummer", 8, moVert ) );
	p->insert( new TTextField( m, "PLZ, Ort", 30, moHor ) );
	p->insert( new TTextField( m, "Strasse ", 24, moNoSpace ) );

	p->insert( new THiddenConstField( m, "", 6 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	f->insert( p );

	/* Contructing Page 2... */
	p = new TPage( "Personalien II" );
	m.reset();

	p->insert( new TTextField( m, "Geschlecht", 1 ) );
//	p->insert( new TRadioField( m, "Geschlecht",
//								1,
//								new TSItem( "M�nnlich",
//								new TSItem( "Weiblich", 0 )),
//								new TSItem( "M",
//								new TSItem( "W", 0 )),
//								moDown ) );

	p->insert( new THiddenConstField( m, "", 9 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Behand.Bereich-Text", 10 ) );

	p->insert( new THiddenConstField( m, "", 96 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Einweisender Arzt", 28 ) );
	p->insert( new TTextField( m, "Hausarzt", 28 ) );

	p->insert( new THiddenConstField( m, "", 20 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Konfession", 10 ) );

	p->insert( new THiddenConstField( m, "", 10 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Beruf", 20 ) );

	p->insert( new THiddenConstField( m, "", 8 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Telefon priv.", 15 ) );

	p->insert( new THiddenConstField( m, "", 113 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	f->insert( p );

	/* Contructing Page 3... */
	p = new TPage( "Personalien III" );
	m.reset();

	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Arbeitgeber", 28 ) );
	p->insert( new TTextField( m, "Angeh�riger", 28 ) );

	p->insert( new TTextField( m, "PLZ, Ort Angeh�riger", 20 ) );
	p->insert( new TTextField( m, "Telefon Angeh�riger", 15 ) );

	p->insert( new THiddenConstField( m, "", 73 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Garant 1", 28 ) );

	p->insert( new THiddenConstField( m, "", 4 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Behandelte Abteilung", 8 ) );

	p->insert( new THiddenConstField( m, "", 1258 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new THiddenConstField( m, "$BC", 3 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	f->insert( p );

	return f;
}
Example #23
0
//---------------------------------------------------------------------------
void __fastcall TMainForm::btnApplyClick(TObject *Sender)
{
    TForm* processForm 	= new TForm(this);
    TLabel* lb 			= new TLabel(this);
    lb->Parent 			= processForm;
    lb->ParentFont 		= FALSE;
    lb->ParentColor 	= FALSE;
    lb->Color 			= clBlack;
    lb->Caption 		= "IP 변경 중 입니다...";
    lb->Font->Name 		= "나눔고딕";
    lb->Font->Size 		= 14;
    lb->Top = (processForm->Height / 2) - (lb->Height / 2);
    lb->Left = (processForm->Width / 2) - (lb->Width / 2);

    processForm->BorderStyle 		= bsNone;
    processForm->Position 			= poScreenCenter;
    processForm->Show();
    processForm->AlphaBlend 		= TRUE;
    processForm->AlphaBlendValue 	= 0;

    for(int i=0; i<255; i++)
    {
        for(int x=0; x<50000; x++){}
    	processForm->AlphaBlendValue = i;
    }

    //Delay(1000);

    //cmd 이용하기 위한 선언
    STARTUPINFO si;
    PROCESS_INFORMATION pi;

    ZeroMemory(&si, sizeof(si));
    si.cb = sizeof(si);
    ZeroMemory(&pi, sizeof(pi));

    // 도스창이 안보이게
    si.dwFlags         = STARTF_USESHOWWINDOW|STARTF_USESTDHANDLES;
    si.wShowWindow     = SW_HIDE;


    TCHAR* cmd 		= new TCHAR[MAX_PATH];
    TCHAR* buf 		= NULL;
    INT cmdSize 	= 0;

    TCHAR* networkName = new TCHAR[36];
    RegSearchNetworkName(g_selectNetworkCardID_Key, networkName);

    DWORD* result = new DWORD; //프로세스 실행 후 결과값 받아오기 위한 변수.

	if(SelectDHCP->Buttons[1]->Checked == TRUE)
    {
    	_stprintf(cmd, _T("netsh interface ipv4 set address name=\"%s\" source=dhcp"), networkName);;
        cmdSize = _tcslen(cmd);
        buf		= new TCHAR[cmdSize];
        _tcscpy(buf, cmd);

        //cmd 실행.
        if(!CreateProcess(NULL, buf, NULL, NULL, FALSE, CREATE_NEW_PROCESS_GROUP, NULL, NULL, &si, &pi))
        {
        	ShowMessage("DHCP CreateProcess Error");
            delete buf;
            Abort();
        }

        WaitForSingleObject(pi.hProcess, INFINITE); //프로세스 종료 시까지 기다림.
        GetExitCodeProcess(pi.hProcess, result);    //프로세스 결과 값 리턴. 정상 : 0, 비정상 : 1

        if(*result != 0)
        {
            ShowMessage("변경하지 못하였습니다.\n"
            			"다음과 같은 문제일 수 있습니다.\n"
                        "1.사용자 계정 컨트롤 사용중\n"
                        "2.이미 DHCP 사용중");

            for(int i=255; i>0; i--)
            {
                processForm->AlphaBlendValue = i;
                for(int x=0; x<50000; x++){}
            }

            processForm->Hide();
            delete result;
            delete lb;
            delete buf;
            Abort();
        }
        delete buf;
    }
    else
    {

    	_stprintf(cmd, _T("netsh interface ipv4 set address name=\"%s\" source=static %s %s %s"), networkName, SelectIP->Text.w_str(), SelectSM->Text.w_str(), SelectDG->Text.w_str());
        cmdSize = _tcslen(cmd);
        buf		= new TCHAR[cmdSize];
        _tcscpy(buf, cmd);
        if(!CreateProcess(NULL, buf, NULL, NULL, FALSE, CREATE_NEW_PROCESS_GROUP, NULL, NULL, &si, &pi))
        {
        	ShowMessage("CreateProcess : 고정 IP 적용 실패");
            delete buf;
            Abort();
        }

        WaitForSingleObject(pi.hProcess, INFINITE);
        GetExitCodeProcess(pi.hProcess, result);
        int t = GetLastError();

        if(*result != 0)
        {
            ShowMessage("변경하지 못하였습니다.\n"
            			"다음과 같은 문제일 수 있습니다.\n"
                        "1.사용자 계정 컨트롤 사용중\n"
                        "2.서로 다른 네트워크에서 같은 IP / DefaultGateway 사용 시도\n"
                        "3.정확하지 않은 IP 주소 입력");

            for(int i=255; i>0; i--)
            {
                processForm->AlphaBlendValue = i;
                for(int x=0; x<500000; x++){}
            }

            processForm->Hide();
            delete buf;
            Abort();
        }

        _stprintf(cmd, _T("netsh interface ipv4 set dnsserver name=\"%s\" source=static address=%s"), networkName, SelectDNS->Text.w_str());
        cmdSize = _tcslen(cmd);
        buf 	= new TCHAR[cmdSize];
        _tcscpy(buf, cmd);
        if(!CreateProcess(NULL, buf, NULL, NULL, FALSE, CREATE_NEW_PROCESS_GROUP, NULL, NULL, &si, &pi))
        {
        	ShowMessage("CreateProcess : 고정 DNS 적용 실패");
            delete buf;
            Abort();
        }

        WaitForSingleObject(pi.hProcess, INFINITE);
        GetExitCodeProcess(pi.hProcess, result);    //프로세스 결과 값 리턴. 정상 : 0, 비정상 : 1

        if(*result != 0)
        {
            ShowMessage("고정 DNS 적용 실패");

            for(int i=255; i>0; i--)
            {
                processForm->AlphaBlendValue = i;
                for(int x=0; x<500000; x++){}
            }

            processForm->Hide();
            delete buf;
            Abort();
        }

        // Close process and thread handles.
        CloseHandle(pi.hProcess);
        CloseHandle(pi.hThread);

        delete buf;
    }

    lb->Caption 	= "변경 완료!";
    lb->Top 		= (processForm->Height / 2) - (lb->Height / 2);
    lb->Left 		= (processForm->Width / 2) - (lb->Width / 2);

    //Delay(1000);
    this->Init();

    for(int i=255; i>0; i--)
    {
    	processForm->AlphaBlendValue = i;
        for(int x=0; x<500000; x++){}
    }

    processForm->Hide();
    delete result;
    delete lb;

    delete cmd;
}
Example #24
0
AboutBox&
AboutBox::Display() const
{
    VersionInfo info = mVersionInfo;
    string versionNumber = info[ "Version" ];
    info.erase( "Version" );
    string versionDetails;
    for( VersionInfo::reverse_iterator i = info.rbegin(); i != info.rend(); ++i )
        versionDetails += ", " + i->first + ": " + i->second;
    versionDetails.erase( 0, 2 );

#ifdef __BORLANDC__
    TForm* pForm = new TForm( static_cast<TComponent*>( NULL ) );
    pForm->BorderStyle = bsDialog;
    pForm->Position = poScreenCenter;
    pForm->Caption = ( string( "About " ) + mApplicationName + "..." ).c_str();

    TPanel* pPanel = new TPanel( pForm );
    pPanel->Parent = pForm;
    pPanel->BorderStyle = bsNone;
    pPanel->BorderWidth = 0;
    pPanel->BevelOuter = bvLowered;
    pPanel->BevelInner = bvNone;
    pPanel->Color = clWhite;
    pPanel->Left = 10;
    pPanel->Top = 10;
    pPanel->Width = pForm->ClientWidth - 2 * pPanel->Left;

    Graphics::TBitmap* pBitmap = new Graphics::TBitmap;
    int logoWidth = GraphicResource::Width( Resources::BCI2000logo_mini ),
        logoHeight = GraphicResource::Width( Resources::BCI2000logo_mini );
    pBitmap->Width = logoWidth + 1;
    pBitmap->Height = logoHeight + 1;
    pBitmap->Canvas->Brush->Color = pPanel->Color;
    pBitmap->Canvas->FillRect( TRect( 0, 0, pBitmap->Width, pBitmap->Height ) );
    DrawContext dc = { pBitmap->Canvas->Handle, { 0, 0, logoWidth, logoHeight } };
    GraphicResource::Render<RenderingMode::Transparent>( Resources::BCI2000logo_mini, dc );

    TPicture* pPicture = new TPicture;
    pPicture->Graphic = pBitmap;
    TImage* pImage = new TImage( pForm );
    pImage->Parent = pPanel;
    pImage->Left = pPanel->Left;
    pImage->Top = pPanel->Top;
    pImage->Width = pBitmap->Width;
    pImage->Height = pBitmap->Height;
    pImage->Picture = pPicture;

    TLabel* pNameLabel = new TLabel( pForm );
    pNameLabel->Parent = pPanel;
    pNameLabel->Top = pImage->Top;
    pNameLabel->Left = 3 * pImage->Left + pImage->Width;
    pNameLabel->Font->Size *= 2;
    pNameLabel->Font->Style = pNameLabel->Font->Style << fsBold;
    pNameLabel->Caption = mApplicationName.c_str();

    TLabel* pCopyrightLabel = new TLabel( pForm );
    pCopyrightLabel->Parent = pPanel;
    pCopyrightLabel->Alignment = taLeftJustify;
    pCopyrightLabel->Caption = ( versionNumber + "\n\n" + BCI2000_COPYRIGHT ).c_str();
    pCopyrightLabel->Top = pNameLabel->Top + pNameLabel->Height;
    pCopyrightLabel->Left = pNameLabel->Left;

    int textWidth = max( pCopyrightLabel->Width, pNameLabel->Width );
    pPanel->ClientWidth = 4 * pImage->Left + pImage->Width + textWidth;
    pPanel->ClientHeight = pImage->Height + 2 * pImage->Top;
    pForm->ClientWidth = 2 * pPanel->Left + pPanel->Width;

    TLabel* pVersionLabel = new TLabel( pForm );
    pVersionLabel->Parent = pForm;
    pVersionLabel->Alignment = taCenter;
    pVersionLabel->Top = 2 * pPanel->Top + pPanel->Height;
    pVersionLabel->WordWrap = true;
    pVersionLabel->Left = pPanel->Left;
    pVersionLabel->Width = pPanel->Width;
    pVersionLabel->Caption = versionDetails.c_str();
    pVersionLabel->Left = ( pForm->ClientWidth - pVersionLabel->Width ) / 2;

    TButton* pButton = new TButton( pForm );
    pButton->Parent = pForm;
    pButton->ModalResult = mrOk;
    pButton->Caption = "Close";
    pButton->Left = ( pForm->ClientWidth - pButton->Width ) / 2;
    pButton->Top = pVersionLabel->Top + pVersionLabel->Height + pButton->Height / 2;

    pForm->ClientHeight = pButton->Top + ( 3 * pButton->Height ) / 2;

    pForm->ShowModal();
    delete pForm;
#endif // __BORLANDC__
    return *const_cast<AboutBox*>( this );
}
Example #25
0
//---------------------------------------------------------------------------
inline void __fastcall DoFormWindowProc(TCustomForm * Form, TWndMethod WndProc,
  TMessage & Message)
{
  if ((Message.Msg == WM_SYSCOMMAND) &&
      (Message.WParam == SC_CONTEXTHELP))
  {
    InvokeHelp(Form->ActiveControl);
    Message.Result = 1;
  }
  else if (Message.Msg == CM_SHOWINGCHANGED)
  {
    TForm * AForm = dynamic_cast<TForm *>(Form);
    assert(AForm != NULL);
    if ((Application->MainForm == Form) ||
        // this particularly happens if error occurs while main
        // window is being shown (e.g. non existent local directory when opening
        // explorer)
        ((Application->MainForm != NULL) && !Application->MainForm->Visible))
    {
      if (Form->Showing)
      {
        SendMessage(Form->Handle, WM_SETICON, ICON_BIG, reinterpret_cast<long>(Application->Icon->Handle));
      }

      if (!Form->Showing)
      {
        // when closing main form, remember its monitor,
        // so that the next form is shown on the same one
        LastMonitor = Form->Monitor;
      }
      else if ((LastMonitor != NULL) && (LastMonitor != Form->Monitor) &&
                Form->Showing)
      {
        // would actually always be poScreenCenter, see _SafeFormCreate
        if ((AForm->Position == poMainFormCenter) ||
            (AForm->Position == poOwnerFormCenter) ||
            (AForm->Position == poScreenCenter))
        {
          // this would typically be an authentication dialog,
          // but it may as well be an message box

          // taken from TCustomForm::SetWindowToMonitor
          AForm->SetBounds(LastMonitor->Left + ((LastMonitor->Width - AForm->Width) / 2),
            LastMonitor->Top + ((LastMonitor->Height - AForm->Height) / 2),
             AForm->Width, AForm->Height);
          AForm->Position = poDesigned;
        }
        else if ((AForm->Position != poDesigned) &&
                 (AForm->Position != poDefaultPosOnly))
        {
          // we do not expect any other positioning
          assert(false);
        }
      }
      else
      {
        TForm * AForm = dynamic_cast<TForm *>(Form);
        assert(AForm != NULL);
        // otherwise it would not get centered
        if ((AForm->Position == poMainFormCenter) ||
            (AForm->Position == poOwnerFormCenter))
        {
          AForm->Position = poScreenCenter;
        }
      }
    }
    bool WasFormCenter =
      (AForm->Position == poMainFormCenter) ||
      (AForm->Position == poOwnerFormCenter);
    WndProc(Message);
    // Make sure dialogs are shown on-screen even if center of the main window
    // is off-screen. Occurs e.g. if you move the main window so that
    // only window title is visible above taksbar.
    if (Form->Showing && WasFormCenter && (AForm->Position == poDesigned))
    {
      TRect Rect;
      // Reading Form.Left/Form.Top instead here does not work, likely due to some
      // bug, when querying TProgressForm opened from TEditorForm (reloading remote file)
      GetWindowRect(Form->Handle, &Rect);

      int Left = Rect.Left;
      int Top = Rect.Top;
      TRect WorkArea = AForm->Monitor->WorkareaRect;

      if (Left + Rect.Width() > WorkArea.Right)
      {
        Left = WorkArea.Right - Rect.Width();
      }
      if (Left < WorkArea.Left)
      {
        Left = WorkArea.Left;
      }
      if (Top + Rect.Height() > WorkArea.Bottom)
      {
        Top = WorkArea.Bottom - Rect.Height();
      }
      if (Top < WorkArea.Top)
      {
        Top = WorkArea.Top;
      }
      if ((Left != Rect.Left) ||
          (Top != Rect.Top))
      {
        SetWindowPos(Form->Handle, 0, Left, Top, Rect.Width(), Rect.Height(),
          SWP_NOZORDER + SWP_NOACTIVATE);
      }
    }
  }
  else
  {
    WndProc(Message);
  }
}
Example #26
0
//---------------------------------------------------------------------------
bool __fastcall InputDialog(const UnicodeString ACaption,
  const UnicodeString APrompt, UnicodeString & Value, UnicodeString HelpKeyword,
  TStrings * History, bool PathInput, TInputDialogInitialize OnInitialize)
{
  bool Result = False;
  TInputDialogToken Token;
  TForm * Form = new TForm(GetFormOwner(), 0); // bypass the VCL streaming (for Salamander)
  try
  {
    // salam needs to override this in UseSystemSettings
    Form->Position = poOwnerFormCenter;
    SetCorrectFormParent(Form);
    UseSystemSettingsPre(Form);

    // this is what TCustomForm.Loaded does
    // Note that this is not needed as due to use of an alternative constructor above
    // we are already set to default font
    // See TMessageForm::Create for contrary
    Form->Font->Assign(Application->DefaultFont);
    Form->ParentFont = true;

    Token.OnInitialize = OnInitialize;
    Token.PathInput = PathInput;

    TNotifyEvent OnShow;
    ((TMethod *)&OnShow)->Data = &Token;
    ((TMethod *)&OnShow)->Code = InputDialogShow;
    Form->OnShow = OnShow;

    Form->Canvas->Font = Form->Font;
    Form->BorderStyle = bsDialog;
    Form->Caption = ACaption;
    Form->ClientWidth = ScaleByTextHeightRunTime(Form, 275);
    Form->ClientHeight = ScaleByTextHeightRunTime(Form, 102);
    if (!HelpKeyword.IsEmpty())
    {
      Form->HelpKeyword = HelpKeyword;

      Form->BorderIcons = TBorderIcons(Form->BorderIcons) << biHelp;
    }

    TLabel * Prompt = new TLabel(Form);
    Prompt->Parent = Form;
    Prompt->AutoSize = True;
    Prompt->Left = ScaleByTextHeightRunTime(Form, 10);
    Prompt->Top = ScaleByTextHeightRunTime(Form, 13);
    Prompt->Caption = APrompt;

    TEdit * Edit;
    THistoryComboBox * HistoryCombo;
    if (History == NULL)
    {
      Edit = new TEdit(Form);
      Edit->Parent = Form;
      Edit->Text = Value;
      Edit->SelectAll();
      Edit->MaxLength = 255;
      Token.Data.Edit = Edit;
      Token.EditControl = Edit;
    }
    else
    {
      HistoryCombo = new THistoryComboBox(Form);
      HistoryCombo->Parent = Form;
      HistoryCombo->Text = Value;
      HistoryCombo->SelectAll();
      HistoryCombo->Items = History;
      HistoryCombo->MaxLength = 255;
      HistoryCombo->AutoComplete = false;
      Token.EditControl = HistoryCombo;
    }
    Token.EditControl->Left = Prompt->Left;
    Token.EditControl->Top = ScaleByTextHeightRunTime(Form, 30);
    Token.EditControl->Width = ScaleByTextHeightRunTime(Form, 255);

    Prompt->FocusControl = Token.EditControl;

    int ButtonTop = ScaleByTextHeightRunTime(Form, 66);
    int ButtonSpace = ScaleByTextHeightRunTime(Form, 6);

    TButton * Button;
    Button = new TButton(Form);
    Button->Parent = Form;
    Button->Caption = Vcl_Consts_SMsgDlgOK;
    Button->ModalResult = mrOk;
    Button->Default = True;

    int ButtonHeight = ScaleByTextHeightRunTime(Button, Button->Height);
    int ButtonWidth = ScaleByTextHeightRunTime(Button, Button->Width);
    int ButtonsStart;
    if (HelpKeyword.IsEmpty())
    {
      ButtonsStart = (Form->ClientWidth / 2) - ButtonWidth - (ButtonSpace / 2);
    }
    else
    {
      ButtonsStart = (Form->ClientWidth / 2) - (3 * ButtonWidth / 2) - ButtonSpace;
    }

    Button->SetBounds(ButtonsStart, ButtonTop, ButtonWidth, ButtonHeight);

    Button = new TButton(Form);
    Button->Parent = Form;
    Button->Caption = Vcl_Consts_SMsgDlgCancel;
    Button->ModalResult = mrCancel;
    Button->Cancel = True;
    Button->SetBounds(ButtonsStart + ButtonWidth + ButtonSpace, ButtonTop,
      ButtonWidth, ButtonHeight);

    if (!HelpKeyword.IsEmpty())
    {
      Button = new TButton(Form);
      Button->Parent = Form;
      Button->Caption = Vcl_Consts_SMsgDlgHelp;
      Button->ModalResult = mrNone;
      Button->SetBounds(ButtonsStart + 2 * (ButtonWidth + ButtonSpace), ButtonTop,
        ButtonWidth, ButtonHeight);
      TNotifyEvent OnClick;
      ((TMethod*)&OnClick)->Code = InputDialogHelp;
      Button->OnClick = OnClick;
    }

    UseSystemSettingsPost(Form);

    if (Form->ShowModal() == DefaultResult(Form))
    {
      if (History != NULL)
      {
        HistoryCombo->SaveToHistory();
        History->Assign(HistoryCombo->Items);
        Value = HistoryCombo->Text;
      }
      else
      {
        Value = Edit->Text;
      }
      Result = true;
    }
  }
  __finally
  {
    delete Form;
  }
  return Result;
}
Example #27
0
TForm *TSpecDefinition::initForm()
{
	TForm *f = new TForm();
	TPage *p;

	TMeasurements m = TMeasurements();

	/* Contructing Page 1... */
	p = new TPage( "Aufnahme" );
	m.reset();

	p->insert( new TNameField( m, "Name   ", 30 ) );
	p->lastInserted->makeNecessary();

	p->insert( new TNameField( m, "Vorname", 15, moNoSpace ) );
	p->lastInserted->makeNecessary();

	m.control.a.y --; //!!!
	m.control.b.y --; //!!!

	p->insert( new TBirthDateField( m, "Geb.datum", 10, "TT.MM.JJJJ" ) );
	p->lastInserted->setInfoLevel( ilNormal );
	p->lastInserted->makeNecessary();

	p->insert( new TRadioField( m, "Geschlecht",
								1,
								new TSItem( "M�nnlich",
								new TSItem( "Weiblich", 0 )),
								new TSItem( "M",
								new TSItem( "W", 0 )),
								moDown | moNoSpace ) );

	m.control.a.y ++;
	m.control.b.y ++;

	m.control.a.y --; //!!!
	m.control.b.y --; //!!!

	p->insert( new TPNumberField( m, "Aufnahmenr.", 8, "Bereich.Ini",
								  moDown | moVert ) );
	p->lastInserted->setInfoLevel( ilNormal );
	p->lastInserted->makeNecessary();

	p->insert( new TSystemDateField( m, "Datum", 8, "TT.MM.JJ" ) );
	p->lastInserted->makeNecessary();

	p->insert( new TSystemTimeField( m, "Zeit" ) );
	p->lastInserted->makeNecessary();

	p->insert( new TTextField( m, "Strasse", 30, moHor ) );
	p->lastInserted->makeNecessary();

	p->insert( new TTextField( m, "PLZ", 8, moHor | moNoSpace ) );
	p->lastInserted->makeNecessary();

	p->insert( new TTextField( m, "Ort", 20, moHor | moNoSpace | moRight ) );
	p->lastInserted->makeNecessary();

	m.control.a.y --; //!!!
	m.control.b.y --; //!!!

	p->insert( new TTextField( m, "Kassennr.", 7, moVert ) );
	p->insert( new TTextField( m, "Krankenkassenname", 28, moRight ) );

	m.control.a.y --; //!!!
	m.control.b.y --; //!!!

	p->insert( new TTextField( m, "VersNr.", 12, moHor ) );
	p->insert( new TTextField( m, "Status", 7, moRight ) );

	p->insert( new TRadioField( m, "Allgemein/Privat", 10,
								new TSItem( "",
								new TSItem( "Allgemein",
								new TSItem( "Privat", 0 ))),
								new TSItem( "",
								new TSItem( "Akut     2",
								new TSItem( "Akut ML  1", 0 ))),
								moHor ) );
	p->lastInserted->makeNecessary();

	m.control.a.y += 2;
	m.control.b.y += 2;

	f->insert( p );

	/* Contructing Page 3... */
	p = new TPage( "Kostentr�ger" );
	m.reset();

	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TListField( m, "Kostentr�ger", 25,
							   "KOSTENTR.LST", 11, moDown | moVert ) );
	p->lastInserted->makeNecessary();

	m.control.a.y += 10;
	m.control.b.y += 10;

	p->insert( new TTextField( m, "Zusatzinfo (z.B. K�rzel, Adresse)", 38,
							   moVert ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );

	f->insert( p );

	/* Contructing Page 2... */
	p = new TPage( "Station" );
	m.reset();

	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TListField( m, "Befund an/Entlassen auf:", 24,
							   "STATION.LST", 16, moDown | moVert ) );
	p->lastInserted->setInfoLevel( ilNormal );
	p->lastInserted->makeNecessary();

	f->insert( p );

	/* Contructing Page 3... */
	p = new TPage( "Personalien" );
	m.reset();

	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TRadioField( m, "Eingeliefert durch",
								20,
								new TSItem( "Selbst",
								new TSItem( "Rettungswagen",
								new TSItem( "Notarztwagen",
								new TSItem( "Hubschrauber", 0 )))),
								new TSItem( "Selbst",
								new TSItem( "Rettungswagen",
								new TSItem( "Notarztwagen",
								new TSItem( "Hubschrauber", 0 )))),
								moDown | moVert ) );

	m.control.a.y += 3;
	m.control.b.y += 3;

	p->insert( new TTextField( m, "Arbeitgeber Name, Str., PLZ, Ort", 30,
							   moVert ) );
	p->insert( new TTextField( m, 0, 30, moNoSpace ) );
	p->insert( new TTextField( m, 0, 28, moNoSpace ) );

	f->insert( p );

	/* Contructing Page 4... */
	p = new TPage( "Anamnese" );
	m.reset();

//	m.control.a.y ++;
//	m.control.b.y ++;

	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Hauptversicherter", 30, moHor ) );
	p->insert( new TBirthDateField( m, "Geb.datum        ", 10, "TT.MM.JJJJ",
									moHor | moNoSpace ) );

	p->insert( new TRadioField( m, "Status",
								3,
								new TSItem( "HV",
								new TSItem( "FAM",
								new TSItem( "REN", 0 ))),
								new TSItem( "HV",
								new TSItem( "FAM",
								new TSItem( "REN", 0 ))),
								moDown | moHor ) );

	m.control.a.y += 2;
	m.control.b.y += 2;

	p->insert( new THiddenConstField( m, "Anamnese", 8 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Anamnese", 38, moVert ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );

	f->insert( p );

	/* Contructing Page 5... */
	p = new TPage( "Aufnahmebefund" );
	m.reset();

//	m.control.a.y ++;
//	m.control.b.y ++;

	p->insert( new THiddenConstField( m, "Aufnahmebefund", 14 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Aufnahmebefund", 38, moVert ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );

	f->insert( p );

	/* Contructing Page 6... */
	p = new TPage( "Diagnose/Behandlung" );
	m.reset();

//	m.control.a.y ++;
//	m.control.b.y ++;

	p->insert( new THiddenConstField( m, "Diagnose", 8 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Aufnahmediagnose", 38, moVert ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );

	p->insert( new THiddenConstField( m, "Behandlung", 10 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Behandlung", 38, moVert ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );

	f->insert( p );

	/* Contructing Page 7... */
	p = new TPage( "Sonstiges" );
	m.reset();

//	m.control.a.y ++;
//	m.control.b.y ++;
//	m.control.a.y -= 2;
//	m.control.b.y -= 2;

	p->insert( new THiddenConstField( m, "Medikamente + Leistungen", 24 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Medikamente + Leistungen", 38, moVert ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 38, moNoSpace ) );
	p->insert( new TTextField( m, 0, 40, moNoSpace ) );

	p->insert( new THiddenConstField( m, "  ", 2 ) );
	m.control.a.y -= 2;
	m.control.b.y -= 2;

//	p->insert( new TRadioField( m, "D13-Eigenunfall",
//								4,
//								new TSItem( "Nein",
//								new TSItem( "Ja", 0 )),
//								new TSItem( "Nein",
//								new TSItem( "Ja", 0 )),
//								moHor | moDown ) );

//	m.control.a.y ++;
//	m.control.b.y ++;

	p->insert( new TDateField( m, "Nachschau am", 8, "TT.MM.JJ", moHor | moDown ) );
	p->insert( new TNumericField( m, "Uhr", 5, ":" ) );

	p->insert( new TControlField( m, "Ambulant/Station�r",
								  1,
								  new TSItem( "in Behandlung",
								  new TSItem( "entlassen",
								  new TSItem( "station�r",
								  new TSItem( "D13 Eigenunfall entl.",
								  new TSItem( "D13 Eigenunfall stat.",
								  new TSItem( "D13 entlassen",
								  new TSItem( "D13 station�r", 0 ))))))),
								  new TSItem( "1",
								  new TSItem( "2",
								  new TSItem( "3",
								  new TSItem( "4",
								  new TSItem( "5",
								  new TSItem( "6",
								  new TSItem( "7", 0 ))))))),
								  moDown | moVert ) );

	f->insert( p );

	/* Contructing Page 7... */
	p = new TPage( "Konsil�rzte" );
	m.reset();

	m.control.a.y ++;
	m.control.b.y ++;

	p->insert( new TTextField( m, "Arzt Name", 30, moVert ) );
	p->insert( new TTextField( m, "Konsilarzt 1", 30 ) );
	p->insert( new TTextField( m, "Konsilarzt 2", 30 ) );
	p->insert( new TTextField( m, "Konsilarzt 3", 30 ) );
	p->insert( new TTextField( m, "Konsilarzt 4", 30 ) );

	f->insert( p );


	return f;
}
Example #28
0
TForm *TSpecDefinition::initForm()
{
	TForm *f = new TForm();
	TPage *p;

	TMeasurements m = TMeasurements();

	/* Contructing Page 1... */
	p = new TPage( "Personalien I" );
	m.reset();

	p->insert( new TNameField( m, "Name   ", 25 ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 10, 0 );
	p->lastInserted->enableCardLabel( 0, 0 );

	p->insert( new TNameField( m, "Vorname", 18, moNoSpace ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 35, 0 );
	p->lastInserted->enableCardLabel( 0, 1, 15 );

	p->insert( new TRadioField( m, "Geschlecht",
								1,
								new TSItem( "M�nnlich",
								new TSItem( "Weiblich", 0 )),
								new TSItem( "M",
								new TSItem( "W", 0 )),
								moDown ) );
	p->lastInserted->enableCard( 63, 0 );
	p->lastInserted->enableCardLabel( 11, 2 );

	m.control.a.y++;
	m.control.b.y++;

	p->insert( new TDateField( m, "Geburtsdatum", 10, "TT.MM.JJJJ" ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 53, 0 );
	p->lastInserted->enableCardLabel( 0, 2 );
	p->lastInserted->setInfoLevel( ilNormal );

	p->insert( new TRadioField( m, "Religion",
								3,
								new TSItem( "-",
								new TSItem( "r�m.kath.",
								new TSItem( "evangelisch",
								new TSItem( "orthodox",
								new TSItem( "Moslem",
								new TSItem( "andere",
								new TSItem( "konf.-los", 0 ))))))),
								new TSItem( "-",
								new TSItem( "RK",
								new TSItem( "EVA",
								new TSItem( "ORT",
								new TSItem( "MOS",
								new TSItem( "APND",
								new TSItem( "KEI", 0 ))))))),
								moDown ) );
	p->lastInserted->enableCard( 67, 0 );

	m.control.a.y += 5;
	m.control.b.y += 5;

	f->insert( p );

	/* Contructing Page 2... */
	p = new TPage( "Adresse/Eintritt" );
	m.reset();
//	m.control.a.y -= 2;
//	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Strasse", 25 ) );
	p->lastInserted->enableCard( 70, 0 );

	p->insert( new TTextField( m, "PLZ", 5 ) );
	p->lastInserted->enableCard( 95, 0 );

	p->insert( new TTextField( m, "Ort", 20 ) );
	p->lastInserted->enableCard( 100, 0 );

	p->insert( new TRadioField( m, "Eintritts-Typ",
								4,
								new TSItem( "NOTF",
								new TSItem( "ACHI",
								new TSItem( "AMB",
								new TSItem( "APG�",
								new TSItem( "APHO",
								new TSItem( "APLI",
								new TSItem( "APWE",
								new TSItem( "ATAG",
								new TSItem( "SCHR",
								new TSItem( "STAT",
								new TSItem( "VOR", 0 ))))))))))),
								new TSItem( "NOTF",
								new TSItem( "ACHI",
								new TSItem( "AMB",
								new TSItem( "APG�",
								new TSItem( "APHO",
								new TSItem( "APLI",
								new TSItem( "APWE",
								new TSItem( "ATAG",
								new TSItem( "SCHR",
								new TSItem( "STAT",
								new TSItem( "VOR", 0 ))))))))))),
								moDown ) );
	p->lastInserted->enableCard( 125, 1 );

	m.control.a.y += 10;
	m.control.b.y += 10;

	p->insert( new TDateField( m, "Eintrittsdatum", 8, "TT.MM.JJ" ) );
	p->lastInserted->enableCard( 129, 1 );
	p->lastInserted->enableCardLabel( lineLength - 8, 2 );

//	p->insert( new TNumericField( m, "Eintrittszeit", 5, ".:" ) );

	f->insert( p );


	/* Contructing Page 3... */
	p = new TPage( "Eintr.Art/Fall" );
	m.reset();

	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TRadioField( m, "Eintritts-Art    ",
								8,
								new TSItem( "Chroni.",
								new TSItem( "Geb/Saeg",
								new TSItem( "Krankh.",
								new TSItem( "Mutters.",
								new TSItem( "Schwang.",
								new TSItem( "Unfall", 0 )))))),
								new TSItem( "Chroni.",
								new TSItem( "Geb/Saeg",
								new TSItem( "Krankh.",
								new TSItem( "Mutters.",
								new TSItem( "Schwang.",
								new TSItem( "Unfall", 0 )))))),
								moDown ) );
	p->lastInserted->enableCard( 18, 2 );

	m.control.a.y += 2;
	m.control.b.y += 2;

	p->insert( new TRadioField( m, "Fall",
								4,
								new TSItem( "CHI",
								new TSItem( "GER",
								new TSItem( "GYN",
								new TSItem( "MED",
								new TSItem( "OPH",
								new TSItem( "ORL",
								new TSItem( "ORT",
								new TSItem( "PED",
								new TSItem( "SAEZ",
								new TSItem( "URO", 0 )))))))))),
								new TSItem( "CHI",
								new TSItem( "GER",
								new TSItem( "GYN",
								new TSItem( "MED",
								new TSItem( "OPH",
								new TSItem( "ORL",
								new TSItem( "ORT",
								new TSItem( "PED",
								new TSItem( "SAEZ",
								new TSItem( "URO", 0 )))))))))),
								moDown ) );
	p->lastInserted->enableCard( 26, 2 );


	m.control.a.y += 9;
	m.control.b.y += 9;

	p->insert( new THiddenConstField( m, "PR", 2 ) );
	p->lastInserted->enableCard( 140, 2 );
	p->lastInserted->enableCardLabel( lineLength - 4 - 7 - 3, 1 );

	p->insert( new TSchwyzPNumberField( m, "Patientennr.", 7, "Bereich.Ini",
										moDown ) );
	p->lastInserted->enableCard( 0, 0 );
	p->lastInserted->enableCardLabel( lineLength - 4 - 7, 1 );

	p->insert( new THiddenConstField( m, ".", 1 ) );
	p->lastInserted->enableCardLabel( lineLength - 4, 1 );

	p->insert( new THiddenConstField( m, "001", 3 ) );
	p->lastInserted->enableCard( 7, 0 );
	p->lastInserted->enableCardLabel( lineLength - 3, 1 );

	p->insert( new THiddenConstField( m, "/", 1 ) );
	p->lastInserted->enableCardLabel( 10, 2 );

	f->insert( p );

	return f;
}
Example #29
0
void ShowAbout(int iFontSize, Byte bLineBreak, Byte bVersionPos, String sDate,
	TPicture *pPicture, String sAddComp, String sVersion, String sAppName,
	String sCopyright, String sText, HICON hIcon) {
	TForm *Form;

	int I;
	String sCaption;

	TVSFixedFileInfo FileVersionInfo;

	String CompanyName, FileDescription, FileVersion, InternalName,
		LegalCopyright, OriginalFilename, ProductName, ProductVersion;

	TAboutObject *AboutObject;

	ShowWaitCursor();
//	Randomize;

	if (IsShift() & IsCtrl()) {
		sAppName = "Дураев";
		sAppName += sLineBreak;
		sAppName += "Константин Петрович";
		sCopyright = "";
		sCaption   = "Автор";
		sDate      = "29.03.1981";
		sVersion   = "";
		iFontSize  = 16;
		sAddComp   = NULL;
		pPicture   = NULL;
		sText      = "";
		for (int i = 1; i < 280; i++)
			if (i % 40 == 0)
				sText = sText + sLineBreak;
			else
				// TODO: 				sText = sText + String(AnsiChar(Chr(Ord('А') +
				// Random(Ord('Я') - Ord('А')))));
					sText = sText + L"Я";
	}
	else {
		GetFileVerInfo(Application->ExeName, FileVersionInfo, CompanyName,
			FileDescription, FileVersion, InternalName, LegalCopyright,
			OriginalFilename, ProductName, ProductVersion);

		sCaption = LoadStr(IDS_ABOUT_CAPTION);

		if (sDate == NULL)
			sDate = FormatDateTime("yyyy.mm.dd",
			UnixToDateTime(((PIMAGE_NT_HEADERS)((DWORD)((PIMAGE_DOS_HEADER)
			HInstance) + (((PIMAGE_DOS_HEADER) HInstance)->e_lfanew)))
			->FileHeader.TimeDateStamp));

		if (sVersion == NULL) {
			sVersion = FileVersion;
			if (IsValueInWord(FileVersionInfo.dwFileFlags, VS_FF_DEBUG))
				sVersion = sVersion + LoadStr(IDS_ABOUT_DEBUG);
			else if (IsValueInWord(FileVersionInfo.dwFileFlags,
				VS_FF_PRERELEASE))
				sVersion = sVersion + LoadStr(IDS_ABOUT_RC);
		}

		if (sAppName == NULL)
			sAppName = ProductName;

		if (sCopyright == NULL)
			sCopyright = LegalCopyright + "|@[email protected]";

		if (sText == NULL) {
			sText = LoadStr(IDS_ABOUT_EULA1) + sLineBreak +
				LoadStr(IDS_ABOUT_EULA2) + sLineBreak + LoadStr(IDS_ABOUT_EULA3)
				+ sLineBreak + LoadStr(IDS_ABOUT_EULA4);
		}

		if (bLineBreak != MAXBYTE) {
			I        = PosPlace(SPACE, sAppName, bLineBreak);
			sAppName = sAppName.SubString(1, I - 1) + sLineBreak +
				sAppName.SubString(I + 1, MAXINT);
		}
	} // IsShift and IsCtrl

	if (hIcon == NULL)
		hIcon = LoadIcon(HInstance, L"MAINICON");

	AboutObject = new TAboutObject();

	Form               = new TForm(Application); // Owner;
	Form->ShowHint     = true;
	Form->Font->Name   = "Arial";
	Form->Font->Size   = 10;
	Form->BorderStyle  = bsDialog;
	Form->Caption      = sCaption;
	Form->ClientHeight = 165;
	Form->ClientWidth  = 420;

	TBevel *bvlIconFrame = new TBevel(Form);
	bvlIconFrame->Parent = Form;
	bvlIconFrame->SetBounds(8, 14, 52, 52);
	bvlIconFrame->Shape = bsFrame;

	TPanel *pnlIcon = new TPanel(Form);
	pnlIcon->Parent = Form;
	pnlIcon->SetBounds(16, 22, 36, 36);
	pnlIcon->Caption          = "";
	pnlIcon->BevelOuter       = bvNone;
	pnlIcon->BorderStyle      = bsSingle;
	pnlIcon->ParentBackground = false;
	pnlIcon->Color            = (TColor) Random(0xFFFFFF);

	TImage *imgIcon                = new TImage(Form); // Icon
	imgIcon->Parent                = pnlIcon;
	imgIcon->Align                 = alClient;
	imgIcon->Transparent           = true;
	imgIcon->Picture->Icon->Handle = hIcon;

	TLabel *lblCopyright      = new TLabel(Form); // Copyright
	lblCopyright->Tag         = 1;
	lblCopyright->Parent      = Form;
	lblCopyright->Font->Style = TFontStyles() << fsBold;
	lblCopyright->SetBounds(8, 80, 0, 0);

	int PosHint = Pos('|', sCopyright);
	if (PosHint == 0)
		lblCopyright->Caption = sCopyright;
	else {
		lblCopyright->Caption      = sCopyright.SubString(1, PosHint - 1);
		lblCopyright->Hint         = sCopyright.SubString(PosHint + 1, MAXINT);
		lblCopyright->Cursor       = crHandPoint;
		lblCopyright->OnMouseEnter = AboutObject->MouseEnter;
		lblCopyright->OnMouseLeave = AboutObject->MouseLeave;
		if (lblCopyright->Hint[1] == '@') {
			lblCopyright->Hint = lblCopyright->Hint.SubString(2, MAXINT);

			AboutObject->MailAddress = lblCopyright->Hint;
			AboutObject->MailSubject = OriginalFilename + " " + FileVersion;
		}
		lblCopyright->OnClick = AboutObject->Click;
	}

	TLabel *lblText = new TLabel(Form); // Text
	lblText->Parent   = Form;
	lblText->WordWrap = true;
	lblText->SetBounds(8, 100, Form->ClientWidth - 16, 0);
	lblText->Caption = sText;
	// I                  =
	lblText->Top + lblText->Height;
	Form->ClientHeight = Form->ClientHeight + lblText->Height;

	if (sAddComp != NULL) {
		/* with TBevel.Create(Form) do
		 {
		 Parent = Form;
		 SetBounds(7, I + 5, Form.ClientWidth - 15, 5);
		 Shape = bsTopLine;
		 I = Top + Height;
		 };

		 with TLabel.Create(Form) do // Add Components
		 {
		 Parent = Form;
		 SetBounds(8, I, 0, 0);
		 Caption = 'Программное обеспечение использует следующие компоненты:';
		 I = Top + Height;
		 };

		 with TLabel.Create(Form) do // Components
		 {
		 Tag = 2;
		 Parent = Form;
		 Font.Style = [fsBold];
		 SetBounds(8, I, 0, 0);
		 Caption = sAddComp;
		 Form.ClientHeight = Form.ClientHeight + Height + 12;
		 if FileExists(FileInAppDir(rsLicenses)) then
		 {
		 Cursor = crHandPoint;
		 OnClick = ClickObject.Click;
		 OnMouseEnter = ClickObject.MouseEnter;
		 OnMouseLeave = ClickObject.MouseLeave;
		 };
		 } */
	}
	else // sAddComp != NULL
			Form->ClientHeight = Form->ClientHeight - 12;

	TBevel *bvlBottom = new TBevel(Form);
	bvlBottom->Parent = Form;
	bvlBottom->SetBounds(7, Form->ClientHeight - 43, Form->ClientWidth - 15, 5);
	bvlBottom->Shape = bsTopLine;

	lblMemory         = new TLabel(Form); // Физическая ...
	lblMemory->Parent = Form;
	lblMemory->SetBounds(8, Form->ClientHeight - 38, 0, 0);
	lblMemory->Caption = LoadStr(IDS_ABOUT_MEMORY);

	lblMemoryValue              = new TLabel(Form); // TotalPhys
	lblMemoryValue->Parent      = Form;
	lblMemoryValue->Font->Style = TFontStyles() << fsBold;
	lblMemoryValue->SetBounds(lblMemory->Width + 13,
		Form->ClientHeight - 38, 0, 0);

	lblProc         = new TLabel(Form); // Процессор:
	lblProc->Parent = Form;
	lblProc->SetBounds(8, Form->ClientHeight - 22, 0, 0);
	lblProc->Caption = LoadStr(IDS_ABOUT_PROCESSOR);

	lblProcValue              = new TLabel(Form); // CPUSpeed
	lblProcValue->Parent      = Form;
	lblProcValue->Font->Style = TFontStyles() << fsBold;
	lblProcValue->SetBounds(lblMemory->Width + 13,
		Form->ClientHeight - 22, 0, 0);

	TGradientPanel *pnlName = new TGradientPanel(Form);
	pnlName->Parent = Form;
	pnlName->StartUpdate();
	pnlName->SetBounds(68, 8, Form->ClientWidth - 76, 64);
	pnlName->BorderStyle = bsSingle;

	pnlName->BevelOuter       = bvNone;
	pnlName->ParentBackground = false;
	if (pPicture == NULL) pnlName->ColorStart = pnlIcon->Color;
	else pnlName->ColorStart = clBlack;
	pnlName->ColorEnd = clBlack;
	pnlName->EndUpdate();

	if (pPicture == NULL) {
		TLabel *lblAppName = new TLabel(Form); // Application Name (1)
		lblAppName->Parent = pnlName;
		lblAppName->SetBounds(2, 2, Form->ClientWidth - 83, 58);
		lblAppName->Alignment     = taCenter;
		lblAppName->AutoSize      = false;
		lblAppName->Caption       = sAppName;
		lblAppName->ParentColor   = false;
		lblAppName->Color         = clBlack;
		lblAppName->ParentFont    = false;
		lblAppName->Font->Charset = DEFAULT_CHARSET;
		lblAppName->Font->Color   = clBlack;
		lblAppName->Font->Height  = -51;
		lblAppName->Font->Name    = "Courier New";
		lblAppName->Font->Style   = TFontStyles() << fsBold << fsItalic;
		lblAppName->Font->Size    = iFontSize;
		lblAppName->Transparent   = true;
		lblAppName->Layout        = tlCenter;
		lblAppName->WordWrap      = true;

		TLabel *lblAppName2 = new TLabel(Form); // Application Name (2)
		lblAppName2->Parent = pnlName;
		lblAppName2->SetBounds(0, 0, Form->ClientWidth - 83, 58);
		lblAppName2->Alignment     = taCenter;
		lblAppName2->AutoSize      = false;
		lblAppName2->Caption       = sAppName;
		lblAppName2->ParentColor   = false;
		lblAppName2->Color         = clBlack;
		lblAppName2->ParentFont    = false;
		lblAppName2->Font->Charset = DEFAULT_CHARSET;
		lblAppName2->Font->Color   = clWhite;
		lblAppName2->Font->Height  = -51;
		lblAppName2->Font->Name    = "Courier New";
		lblAppName2->Font->Style   = TFontStyles() << fsBold << fsItalic;
		lblAppName2->Font->Size    = iFontSize;
		lblAppName2->Transparent   = true;
		lblAppName2->Layout        = tlCenter;
		lblAppName2->WordWrap      = true;
	} // pPicture == NULL
	else {
		TImage *imgPicture = new TImage(Form);
		imgPicture->Parent = pnlName;
		imgPicture->Align  = alClient;
		imgPicture->Picture->Assign(pPicture);
	}

	TLabel *lblDate = new TLabel(Form); // Date
	lblDate->Parent  = pnlName;
	lblDate->Caption = sDate;
	lblDate->Font->Assign(Form->Font);
	lblDate->Font->Style = TFontStyles() << fsBold;
	lblDate->Font->Color = clWhite;
	lblDate->Font->Size  = 8;
	lblDate->Alignment   = taRightJustify;

	switch (3) {
	case 0:
		lblDate->SetBounds(2, 2, lblDate->Width, lblDate->Height);
		break;
	case 1:
		lblDate->SetBounds(2, pnlName->ClientHeight - lblDate->Height - 2,
			lblDate->Width, lblDate->Height);
		break;
	case 2:
		lblDate->SetBounds(pnlName->ClientWidth - lblDate->Width - 2, 2,
			lblDate->Width, lblDate->Height);
		break;
	default:
		lblDate->SetBounds(pnlName->ClientWidth - lblDate->Width - 2,
			pnlName->ClientHeight - lblDate->Height - 2, lblDate->Width,
			lblDate->Height);
	}
	lblDate->Transparent = true;

	TLabel *lblVerion  = new TLabel(Form); // Version
	lblVerion->Parent  = pnlName;
	lblVerion->Caption = sVersion;
	lblVerion->Font->Assign(Form->Font);
	lblVerion->Font->Style = TFontStyles() << fsBold;
	lblVerion->Font->Color = clWhite;
	lblVerion->Font->Size  = 8;

	switch (2) {
	case 0:
		lblVerion->SetBounds(2, 2, lblVerion->Width, lblVerion->Height);
		break;
	case 1:
		lblVerion->SetBounds(2, pnlName->ClientHeight - lblVerion->Height - 2,
			lblVerion->Width, lblVerion->Height);
		break;
	case 2:
		lblVerion->SetBounds(pnlName->ClientWidth - lblVerion->Width - 2, 2,
			lblVerion->Width, lblVerion->Height);
		break;
	default:
		lblVerion->SetBounds(pnlName->ClientWidth - lblVerion->Width - 2,
			pnlName->ClientHeight - lblVerion->Height - 2, lblVerion->Width,
			lblVerion->Height);
	}
	lblVerion->Transparent = true;

	TButton *btnClose     = new TButton(Form);
	btnClose->Parent      = Form;
	btnClose->Caption     = "OK";
	btnClose->ModalResult = mrCancel;
	btnClose->Cancel      = true;
	btnClose->SetBounds(Form->ClientWidth - 83, Form->ClientHeight - 34,
		75, 26);
	btnClose->TabOrder = 0;

	TTimer *timer   = new TTimer(Form);
	timer->OnTimer  = AboutObject->TimerTimer;
	timer->Interval = 1;
	timer->Enabled  = true;

	RestoreCursor();

	Form->Left = (Screen->Width - Form->Width) / 2;
	Form->Top  = (Screen->Height - Form->Height) / 2;

	SetCurPosToCenter(btnClose);

	Form->ShowModal();

	Form->Free();
	AboutObject->Free();

	lblMemory      = NULL;
	lblProc        = NULL;
	lblMemoryValue = NULL;
	lblProcValue   = NULL;
}
Example #30
0
TForm *TSpecDefinition::initForm()
{
	TForm *f = new TForm();
	TPage *p;

	TMeasurements m = TMeasurements();

	/* Contructing Page 1... */
	p = new TPage( "Personalien I" );
	m.reset();

	p->insert( new TNumericField( m, "Patientennr.  ", 7, "." ) );
	p->lastInserted->enableCard( 0, 1 );
	p->lastInserted->enableCardLabel( 20, 1 );

	p->insert( new TNameField( m, "Name   ", 30 ) );
	p->lastInserted->enableCard( 0, 0 );
	p->lastInserted->enableCardLabel( 0, 0, 27 );

	p->insert( new TNameField( m, "Vorname", 18 ) );
	p->lastInserted->enableCard( 30, 0 );
	p->lastInserted->enableCardLabel( 0, 1 );

	p->insert( new TTextField( m, "Strasse, Nr.", 24 ) );
	p->lastInserted->enableCard( 48, 0 );

	p->insert( new TTextField( m, "PLZ, Ort    ", 24 ) );
	p->lastInserted->enableCard( 72, 0 );

	p->insert( new TRadioField( m, "Geschlecht",
								1,
								new TSItem( "M�nnlich",
								new TSItem( "Weiblich", 0 )),
								new TSItem( "M",
								new TSItem( "W", 0 )),
								moDown ) );
	p->lastInserted->enableCard( 115, 2 );
	p->lastInserted->enableCardLabel( 26, 2 );

	m.control.a.y ++;
	m.control.b.y ++;

	p->insert( new TDateField( m, "Geburtsdatum  ", 8, "TT.MM.JJ", moDown ) );
	p->lastInserted->enableCard( 7, 1 );
	p->lastInserted->enableCardLabel( 15, 2 );

	p->insert( new TNumericField( m, "Telefon Privat", 15, " .-/" ) );
	p->lastInserted->enableCard( 96, 2 );

	f->insert( p );

	/* Contructing Page 2... */
	p = new TPage( "Konf./Zivilst." );
	m.reset();

	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TRadioField( m, "Konfession",
								1,
								new TSItem( " ",
								new TSItem( "reformiert",
								new TSItem( "katholisch",
								new TSItem( "orthodox",
								new TSItem( "neuap.",
								new TSItem( "diverse",
								new TSItem( "konfessionslos", 0 ))))))),

								new TSItem( " ",
								new TSItem( "R",
								new TSItem( "K",
								new TSItem( "O",
								new TSItem( "N",
								new TSItem( "D",
								new TSItem( "-", 0 ))))))),
								moDown ) );
	m.control.a.y += 6;
	m.control.b.y += 6;

	p->insert( new TRadioField( m, "Zivilstand",
								3,
								new TSItem( " ",
								new TSItem( "ledig",
								new TSItem( "verheiratet",
								new TSItem( "verwitwet",
								new TSItem( "geschieden",
								new TSItem( "keine Angaben", 0 )))))),
								new TSItem( " ",
								new TSItem( "led",
								new TSItem( "vrh",
								new TSItem( "vrw",
								new TSItem( "gsc",
								new TSItem( "k.A", 0 )))))),
								moDown ) );

	m.control.a.y += 5;
	m.control.b.y += 5;

	f->insert( p );

	/* Contructing Page 3... */
	p = new TPage( "Arbeitgeber/�rzte" );
	m.reset();

	p->insert( new TTextField( m, "Beruf", 23 ) );
	p->lastInserted->enableCard( 96, 0 );

	p->insert( new TTextField( m, "Arbeitgeber Name", 24, moVert ) );
	p->lastInserted->enableCard( 48, 2 );

	p->insert( new TTextField( m, "Arbeitgeber Wohnort", 24, moNoSpace ) );
	p->lastInserted->enableCard( 72, 2 );

	p->insert( new TTextField( m, "Einw. Arzt Name", 24, moVert ) );
	p->lastInserted->enableCard( 23, 1 );

	p->insert( new TTextField( m, "Einw. Arzt Wohnort", 24, moNoSpace ) );
	p->lastInserted->enableCard( 47, 1 );

	p->insert( new TTextField( m, "Hausarzt Name", 24, moVert ) );
	p->lastInserted->enableCard( 71, 1 );

	p->insert( new TTextField( m, "Hausarzt Wohnort", 24, moNoSpace ) );
	p->lastInserted->enableCard( 95, 1 );

	f->insert( p );

	/* Contructing Page 4... */
	p = new TPage( "Eintritt" );
	m.reset();

	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TDateField( m, "Eintrittsdatum", 8, "TT.MM.JJ",
							   moDown ) );
	p->lastInserted->enableCard( 15, 1 );
	p->lastInserted->enableCardLabel( 0, 2 );

	p->insert( new TNumericField( m, "Eintrittszeit ", 5, ": " ) );

	p->insert( new TRadioField( m, "Eintrittscode ",
								1,
								new TSItem( "Krankheit",
								new TSItem( "Unfall",
								new TSItem( "Geburt", 0 ))),
								new TSItem( "K",
								new TSItem( "U",
								new TSItem( "G", 0 ))),
								moDown ) );
	p->lastInserted->enableCard( 116, 2 );

	m.control.a.y += 2;
	m.control.b.y += 2;

	p->insert( new TRadioField( m, "Klasse        ",
								4,
								new TSItem( "1er P.",
								new TSItem( "2er P.",
								new TSItem( "Allg.",
								new TSItem( "Ambulant", 0 )))),
								new TSItem( "1erP",
								new TSItem( "2erP",
								new TSItem( "Allg",
								new TSItem( "    ", 0 )))),
								moDown ) );
	p->lastInserted->enableCard( 111, 2 );
	p->lastInserted->enableCardLabel( 9, 2 );

	m.control.a.y += 3;
	m.control.b.y += 3;

	p->insert( new TRadioField( m, "Stat./Ambulant",
								9,
								new TSItem( "station�r",
								new TSItem( "ambulant", 0 )),
								new TSItem( "Station�r",
								new TSItem( "Ambulant", 0 )),
								moDown ) );
	p->lastInserted->enableCardLabel( 9, 3 );

	m.control.a.y += 1;
	m.control.b.y += 1;

	f->insert( p );

	/* Contructing Page 5... */
	p = new TPage( "Diverses" );
	m.reset();

	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TRadioField( m, "Taxkatogorie",
								1,
								new TSItem( " ",
								new TSItem( "Selbstzahler",
								new TSItem( "Krankenkasse",
								new TSItem( "SUVA",
								new TSItem( "IV",
								new TSItem( "EMU",
								new TSItem( "Priv.V.",
								new TSItem( "F�rsorge", 0 )))))))),
								new TSItem( " ",
								new TSItem( "S",
								new TSItem( "K",
								new TSItem( "S",
								new TSItem( "I",
								new TSItem( "E",
								new TSItem( "P",
								new TSItem( "F", 0 )))))))),
								moDown ) );
	p->lastInserted->enableCard( 111, 2 );

	m.control.a.y += 7;
	m.control.b.y += 7;

	p->insert( new TTextField( m, "Kostenstelle", 30, moDown | moVert ) );

	p->insert( new TTextField( m, "Kostentr�ger Name", 24, moVert ) );
	p->lastInserted->enableCard( 0, 2 );

	p->insert( new TTextField( m, "Kostentr�ger Wohnort", 24, moNoSpace ) );
	p->lastInserted->enableCard( 24, 2 );

	p->insert( new THiddenConstField( m, "", 2 ) );
	p->lastInserted->enableCard( 117, 2 );

	p->insert( new THiddenConstField( m, "", 1 ) );
	p->lastInserted->enableCard( 119, 0 );

	p->insert( new THiddenConstField( m, "", 1 ) );
	p->lastInserted->enableCard( 119, 1 );

	p->insert( new THiddenConstField( m, "", 1 ) );
	p->lastInserted->enableCard( 119, 2 );

	p->insert( new THiddenConstField( m, "/", 1 ) );
	p->lastInserted->enableCardLabel( 25, 2 );

	f->insert( p );

	return f;
}