//--------------------------------------------------------------------------- #include #pragma hdrstop #include "StyleView.h" #include "CombiResult.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TStyleViewForm *StyleViewForm; //--------------------------------------------------------------------------- __fastcall TStyleViewForm::TStyleViewForm(TComponent* Owner) : TForm(Owner) { Recent_Tag = -1; // add by maxleo21c } //--------------------------------------------------------------------------- void __fastcall TStyleViewForm::InitForm(int tag) { Recent_Tag = tag; // add by maxleo21c switch (tag) { case 0: case 2: Panel1->Visible = true; Panel2->Visible = false; ClientWidth = Panel1->Left + Panel1->Width; ClientHeight = Panel1->Top + Panel1->Height; Constraints->MaxWidth = Width; Constraints->MaxHeight = Height; break; case 1: case 3: Panel2->Visible = true; Panel1->Visible = false; Panel2->Width = 316; ClientWidth = Panel2->Left + Panel2->Width; ClientHeight = Panel2->Top + Panel2->Height; Constraints->MaxWidth = Width; Constraints->MaxHeight = Height; break; case 4: Panel2->Visible = true; Panel1->Visible = false; Panel2->Width = 632; ClientWidth = Panel2->Left + Panel2->Width; ClientHeight = Panel2->Top + Panel2->Height; Constraints->MaxWidth = Width; Constraints->MaxHeight = Height; break; } Left = (GetSystemMetrics(SM_CXSCREEN)-Width)/2; Top = (GetSystemMetrics(SM_CYSCREEN)-Height)/2; } //--------------------------------------------------------------------------- void __fastcall TStyleViewForm::ExitForm() { Close(); } //--------------------------------------------------------------------------- void __fastcall TStyleViewForm::FormKeyPress(TObject *Sender, char &Key) { ExitForm(); // ModalResult = mrOk; } //--------------------------------------------------------------------------- void __fastcall TStyleViewForm::Image1Click(TObject *Sender) { ExitForm(); // ModalResult = mrOk; } //--------------------------------------------------------------------------- void __fastcall TStyleViewForm::StyleViewOpenClick(TObject *Sender) { // Open : 1 ResultForm->StyleViewPopupOpen(Recent_Tag, 1); } //--------------------------------------------------------------------------- void __fastcall TStyleViewForm::StyleViewMergeClick(TObject *Sender) { // Merge : 0 ResultForm->StyleViewPopupOpen(Recent_Tag, 0); } //---------------------------------------------------------------------------