//--------------------------------------------------------------------------- #include #pragma hdrstop #include #include "common.h" #include "Editor.h" #include "Design.h" #include "Main_F.h" #include "FloatingWin.h" #include "InputMode3Data_F.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma link "Rulers" #pragma link "RzButton" #pragma link "RzEdit" #pragma link "RzTabs" #pragma resource "*.dfm" //--------------------------------------------------------------------------- #define IDS_EDITOR StringTable[0] #define IDS_LOAD StringTable[1] #define IDS_SAVE StringTable[2] #define IDS_CUT StringTable[3] #define IDS_COPY StringTable[4] #define IDS_PASTE StringTable[5] #define IDS_ELAPLLY StringTable1[0] #define IDS_TOTALCOURSE StringTable1[1] #define IDS_CURRENTCOURSE StringTable1[2] //--------------------------------------------------------------------------- TEditorForm *EditorForm; //--------------------------------------------------------------------------- __fastcall TEditorForm::TEditorForm(TComponent* Owner) : TForm(Owner) { temptex=NULL; initMode3();//Mode 3 ÃʱâÈ­ myELData = NULL; EditorForm->Constraints->MaxHeight = Main->Height; EditorForm->Constraints->MaxWidth = Main->Width; } //--------------------------------------------------------------------------- void __fastcall TEditorForm::SetFont(){ SetSmallFont(Font); SetSmallFont(cbELmode->Font); SetSmallFont(mmData->Font); SetSmallFont(sbOK->Font); SetSmallFont(pcEditor->Font); SetSmallFont(pcLayer->Font); SetSmallFont(memoHorzData1->Font); SetSmallFont(memoHorzData2->Font); SetSmallFont(memoHorzData3->Font); SetSmallFont(memoHorzData4->Font); SetSmallFont(memoHorzData5->Font); SetSmallFont(memoHorzData6->Font); SetSmallFont(memoHorzData7->Font); SetSmallFont(lbL1->Font); SetSmallFont(lbL2->Font); SetSmallFont(lbL3->Font); SetSmallFont(lbL4->Font); SetSmallFont(lbL5->Font); SetSmallFont(lbL6->Font); SetSmallFont(lbL7->Font); SetSmallFont(lb3Total1->Font); SetSmallFont(lb3Total2->Font); SetSmallFont(lb3Total3->Font); SetSmallFont(lb3Total4->Font); SetSmallFont(lb3Total5->Font); SetSmallFont(lb3Total6->Font); SetSmallFont(lb3Total7->Font); SetSmallFont(lb3C1->Font); SetSmallFont(lb3C2->Font); SetSmallFont(lb3C3->Font); SetSmallFont(lb3C4->Font); SetSmallFont(lb3C5->Font); SetSmallFont(lb3C6->Font); SetSmallFont(lb3C7->Font); SetSmallFont(lb3TT1->Font); SetSmallFont(lb3TT2->Font); SetSmallFont(lb3TT3->Font); SetSmallFont(lb3TT4->Font); SetSmallFont(lb3TT5->Font); SetSmallFont(lb3TT6->Font); SetSmallFont(lb3TT7->Font); SetSmallFont(lb3T1->Font); SetSmallFont(lb3T2->Font); SetSmallFont(lb3T3->Font); SetSmallFont(lb3T4->Font); SetSmallFont(lb3T5->Font); SetSmallFont(lb3T6->Font); SetSmallFont(lb3T7->Font); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::Init(){ if (Main->LayerMode) {//Bar ó¸® ³»¿ë int barCount = Main->maindata.bar - 1; //Mode 1 ÃʱâÈ­ temptex = (Tex *)Main->texlayer->TexList->Items[Main->LayerNum]; mmData->Clear(); for(int i=0;iCurve->Count;i++){ KO *ko=(KO *)temptex->Curve->Items[i]; AnsiString s = IntToStr(ko->in)+" "+IntToStr(ko->via); if(s.Length()==3) s+=" "; else if(s.Length()==4) s+=" "; else if(s.Length()==5) s+=" "; s=s+"( "+IntToStr(i+1)+" )"; mmData->Lines->Add(s); } //Mode 2 ÃʱâÈ­ memoHorzData1->Text=""; memoHorzData2->Text=""; memoHorzData3->Text=""; memoHorzData4->Text=""; memoHorzData5->Text=""; memoHorzData6->Text=""; memoHorzData7->Text=""; for(int j = barCount, i = 0;j >= 0 ; j--, i++){ Tex *tex2 = (Tex *)Main->texlayer->TexList->Items[j]; AnsiString s; for(int i=0;iCurve->Count;i++){ KO *ko=(KO *)tex2->Curve->Items[i]; s += IntToStr(ko->in)+IntToStr(ko->via)+" "; } if(i==0){ memoHorzData1->Text=s; } else if(i==1){ memoHorzData2->Text=s; } else if(i==2){ memoHorzData3->Text=s; } else if(i==3){ memoHorzData4->Text=s; } else if(i==4){ memoHorzData5->Text=s; } else if(i==5){ memoHorzData6->Text=s; } else if(i==6){ memoHorzData7->Text=s; } } } else { //LyaerÀÇ °æ¿ì ó¸® ³»¿ë //Mode 1 ÃʱâÈ­ temptex = (Tex *)Main->texlayer->TexList->Items[Main->LayerNum]; mmData->Clear(); for(int i=0;iCurve->Count;i++){ KO *ko=(KO *)temptex->Curve->Items[i]; AnsiString s = IntToStr(ko->in)+" "+IntToStr(ko->via); if(s.Length()==3) s+=" "; else if(s.Length()==4) s+=" "; else if(s.Length()==5) s+=" "; s=s+"( "+IntToStr(i+1)+" )"; mmData->Lines->Add(s); } //Mode 2 ÃʱâÈ­ memoHorzData1->Text=""; memoHorzData2->Text=""; memoHorzData3->Text=""; memoHorzData4->Text=""; memoHorzData5->Text=""; memoHorzData6->Text=""; memoHorzData7->Text=""; for(int j=0;jtexlayer->TexList->Count;j++){ Tex *tex2 = (Tex *)Main->texlayer->TexList->Items[j]; AnsiString s; for(int i=0;iCurve->Count;i++){ KO *ko=(KO *)tex2->Curve->Items[i]; s += IntToStr(ko->in)+IntToStr(ko->via)+" "; } if(j==0){ memoHorzData1->Text=s; } else if(j==1){ memoHorzData2->Text=s; } else if(j==2){ memoHorzData3->Text=s; } else if(j==3){ memoHorzData4->Text=s; } else if(j==4){ memoHorzData5->Text=s; } else if(j==5){ memoHorzData6->Text=s; } else if(j==6){//MAX_LAYER_COUNT memoHorzData7->Text=s; } } } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::initMode3() { //Mode 3 ÃʱâÈ­ //cbELmode->Checked = false; //DesignForm->ELmode = cbELmode->Checked; ELMemo1->Text=""; ELMemo2->Text=""; ELMemo3->Text=""; ELMemo4->Text=""; ELMemo5->Text=""; ELMemo6->Text=""; ELMemo7->Text=""; lb3D1->Caption=""; lb3D2->Caption=""; lb3D3->Caption=""; lb3D4->Caption=""; lb3D5->Caption=""; lb3D6->Caption=""; lb3D7->Caption=""; lb3T1->Caption="0"; lb3T2->Caption="0"; lb3T3->Caption="0"; lb3T4->Caption="0"; lb3T5->Caption="0"; lb3T6->Caption="0"; lb3T7->Caption="0"; } //--------------------------------------------------------------------------- void __fastcall TEditorForm::UpdateTex(){ try{ for(int i=0;iCurve->Count;i++){ KO *ko=(KO *)temptex->Curve->Items[i]; sscanf(mmData->Lines->Strings[i].c_str(), "%d %d", &(ko->in), &(ko->via)); } } catch(...){ return; } temptex->Correction(); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::sbOKClick(TObject *Sender) { Main->Undo->do_(Main->texlayer); UpdateTex(); DesignForm->DrawChart(false); //Close(); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::pmLoadClick(TObject *Sender) { OpenDialog->InitialDir=BaseDir + "\\layer"; OpenDialog->DefaultExt="lay"; OpenDialog->Filter="Layer Files(*.lay)|*.lay"; if(OpenDialog->Execute()){ mmData->Lines->LoadFromFile(OpenDialog->FileName); } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::pmSaveClick(TObject *Sender) { SaveDialog->InitialDir=BaseDir + "\\layer"; SaveDialog->DefaultExt="lay"; SaveDialog->Filter="Layer Files(*.lay)|*.lay"; if(SaveDialog->Execute()){ mmData->Lines->SaveToFile(SaveDialog->FileName); } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::mmDataKeyUp(TObject *Sender, WORD &Key, TShiftState Shift) { StatusBar->Panels->Items[0]->Text = "Line : "+IntToStr(mmData->CaretPos.y+1); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::mmDataMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { StatusBar->Panels->Items[0]->Text = "Line : "+IntToStr(mmData->CaretPos.y+1); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::FormCreate(TObject *Sender) { pcEditor->ActivePage=tsHorz; ClientHeight = 720; ClientWidth = 433; StringTable.Create(BaseDir, Language, "PathData"); Caption = IDS_EDITOR; pmLoad->Caption = IDS_LOAD; pmSave->Caption = IDS_SAVE; pmCut->Caption = IDS_CUT; pmCopy->Caption = IDS_COPY; pmPaste->Caption = IDS_PASTE; StringTable1.Create(BaseDir, Language, "Editor"); sbEL1->Caption = IDS_ELAPLLY; sbEL2->Caption = sbEL1->Caption; sbEL3->Caption = sbEL1->Caption; sbEL4->Caption = sbEL1->Caption; sbEL5->Caption = sbEL1->Caption; sbEL6->Caption = sbEL1->Caption; sbEL7->Caption = sbEL1->Caption; lb3Total1->Caption=IDS_TOTALCOURSE; lb3Total2->Caption=lb3Total1->Caption; lb3Total3->Caption=lb3Total1->Caption; lb3Total4->Caption=lb3Total1->Caption; lb3Total5->Caption=lb3Total1->Caption; lb3Total6->Caption=lb3Total1->Caption; lb3Total7->Caption=lb3Total1->Caption; lb3C1->Caption=IDS_CURRENTCOURSE; lb3C2->Caption=lb3C1->Caption; lb3C3->Caption=lb3C1->Caption; lb3C4->Caption=lb3C1->Caption; lb3C5->Caption=lb3C1->Caption; lb3C6->Caption=lb3C1->Caption; lb3C7->Caption=lb3C1->Caption; ApplyRzBitBtn->Caption=IDS_ELAPLLY; //# sjpark - Editor Layer Visible Initialize tsL1->TabVisible = false; tsL2->TabVisible = false; tsL3->TabVisible = false; tsL4->TabVisible = false; tsL5->TabVisible = false; tsL6->TabVisible = false; tsL7->TabVisible = false; lbL1->Color = clGray; lbL2->Color = clGray; lbL3->Color = clGray; lbL4->Color = clGray; lbL5->Color = clGray; lbL6->Color = clGray; lbL7->Color = clGray; memoHorzData1->Enabled = false; memoHorzData2->Enabled = false; memoHorzData3->Enabled = false; memoHorzData4->Enabled = false; memoHorzData5->Enabled = false; memoHorzData6->Enabled = false; memoHorzData7->Enabled = false; if(Main->maindata.bar>=1){ tsL1->TabVisible = true; lbL1->Font->Color = clWhite; lbL1->Color = RGB2TColor(62,67,88); memoHorzData1->Enabled = true; } if(Main->maindata.bar>=2){ tsL2->TabVisible = true; lbL2->Font->Color = clWhite; lbL2->Color = RGB2TColor(62,67,88); memoHorzData2->Enabled = true; } if(Main->maindata.bar>=3){ tsL3->TabVisible = true; lbL3->Font->Color = clWhite; lbL3->Color = RGB2TColor(62,67,88); memoHorzData3->Enabled = true; } if(Main->maindata.bar>=4){ tsL4->TabVisible = true; lbL4->Font->Color = clWhite; lbL4->Color = RGB2TColor(62,67,88); memoHorzData4->Enabled = true; } if(Main->maindata.bar>=5){ tsL5->TabVisible = true; lbL5->Font->Color = clWhite; lbL5->Color = RGB2TColor(62,67,88); memoHorzData5->Enabled = true; } if(Main->maindata.bar>=6){ tsL6->TabVisible = true; lbL6->Font->Color = clWhite; lbL6->Color = RGB2TColor(62,67,88); memoHorzData6->Enabled = true; } if(Main->maindata.bar>=7){ tsL7->TabVisible = true; lbL7->Font->Color = clWhite; lbL7->Color = RGB2TColor(62,67,88); memoHorzData7->Enabled = true; } Init(); SetFont(); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::FormDestroy(TObject *Sender) { if(myELData) delete myELData; myELData = NULL; if (InputMode3DataForm) { delete InputMode3DataForm; InputMode3DataForm = NULL; } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::FormResize(TObject *Sender) { int margin = 8; pcEditor->Width = ClientWidth-margin*2; //# margin 8 pixel pcEditor->Height = ClientHeight-margin*2; pcLayer->Width=pcEditor->Width-4; pcLayer->Height=pcEditor->Height-4; //# mode 1 memo mmData->Top = margin; mmData->Left = margin; mmData->Width = tsVert->ClientWidth-margin*2; mmData->Height = tsVert->ClientHeight-StatusBar->Height-sbOK->Height-margin*4; //# mode 1 btn sbOK->Left = margin; sbOK->Top = mmData->Top+mmData->Height+margin; sbOK->Width = tsVert->ClientWidth-margin*2; //# mode 2 memo memoHorzData1->Width = tsHorz->ClientWidth-memoHorzData1->Left-margin; memoHorzData2->Width = memoHorzData1->Width; memoHorzData3->Width = memoHorzData1->Width; memoHorzData4->Width = memoHorzData1->Width; memoHorzData5->Width = memoHorzData1->Width; memoHorzData6->Width = memoHorzData1->Width; memoHorzData7->Width = memoHorzData1->Width; //# mode 2 btn ApplyRzBitBtn->Left = tsHorz->ClientWidth-ApplyRzBitBtn->Width-margin; //# mode 3 memo ELMemo1->Width=tsEL->ClientWidth-margin*2; ELMemo2->Width=ELMemo1->Width; ELMemo3->Width=ELMemo1->Width; ELMemo4->Width=ELMemo1->Width; ELMemo5->Width=ELMemo1->Width; ELMemo6->Width=ELMemo1->Width; ELMemo7->Width=ELMemo1->Width; ELMemo1->Height=tsEL->ClientHeight-ELMemo1->Top-margin*4; ELMemo2->Height=ELMemo1->Height; ELMemo3->Height=ELMemo1->Height; ELMemo4->Height=ELMemo1->Height; ELMemo5->Height=ELMemo1->Height; ELMemo6->Height=ELMemo1->Height; ELMemo7->Height=ELMemo1->Height; //# mode 3 btn cbELmode->Left = tsEL->Width-cbELmode->Width-margin; sbEL1->Left = cbELmode->Left; sbEL2->Left = cbELmode->Left; sbEL3->Left = cbELmode->Left; sbEL4->Left = cbELmode->Left; sbEL5->Left = cbELmode->Left; sbEL6->Left = cbELmode->Left; sbEL7->Left = cbELmode->Left; } //--------------------------------------------------------------------------- void __fastcall TEditorForm::mmDataKeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { StatusBar->Panels->Items[0]->Text = "Line : "+IntToStr(mmData->CaretPos.y+1); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::pmCutClick(TObject *Sender) { mmData->CutToClipboard(); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::pmCopyClick(TObject *Sender) { mmData->CopyToClipboard(); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::pmPasteClick(TObject *Sender) { mmData->PasteFromClipboard(); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::SetTex(TEdit *edit, int layer){ if(Main->texlayer->TexList->Count<=layer) return; Main->Undo->do_(Main->texlayer); Tex *tex = (Tex *)Main->texlayer->TexList->Items[layer]; AnsiString s = edit->Text; char *str = new char[s.Length()+1]; int *num1 = new int[tex->Curve->Count]; int *num2 = new int[tex->Curve->Count]; memset(str,0,s.Length()+1); strcpy(str,s.c_str()); int len=strlen(str); for(int i=0;i'9') && str[i]!=',' )str[i]='.'; } int course=0; int nums; for(int i=0;i=tex->Curve->Count) break; if(str[i]=='.'){ sscanf(str+i+1,"%d.",&nums); separate(str+i+1, num1+course, num2+course); course++; } else if(i==0){ sscanf(str,"%d.",&nums); separate(str, num1+course, num2+course); course++; } } if(course){ for(int i=0;iCurve->Count;i++){ KO *ko=(KO *)tex->Curve->Items[i]; ko->in = num1[i%course]; ko->via = num2[i%course]; } } delete [] num1; delete [] num2; delete [] str; DesignForm->DrawChart(false); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::SetTex(TMemo *edit, int layer){ if(Main->texlayer->TexList->Count<=layer) return; Main->Undo->do_(Main->texlayer); Tex *tex = (Tex *)Main->texlayer->TexList->Items[layer]; AnsiString s = edit->Text; char *str = new char[s.Length()+1]; int *num1 = new int[tex->Curve->Count]; int *num2 = new int[tex->Curve->Count]; memset(str,0,s.Length()+1); strcpy(str,s.c_str()); int len=strlen(str); for(int i=0;i'9') && str[i]!=',' ){ if( i+1 < len ){ if((str[i+1]<'0'||str[i+1]>'9') && str[i]!=',' ){ for(int j = i ; j < len -1 ;j++){ str[j] = str[j+1]; } str[len-1]=NULL; i--; } else{ str[i]='.'; } } } } } int course=0; int nums; for(int i=0;i=tex->Curve->Count) break; if(str[i]=='.'){ sscanf(str+i+1,"%d.",&nums); separate(str+i+1, num1+course, num2+course); course++; } else if(i==0){ sscanf(str,"%d.",&nums); separate(str, num1+course, num2+course); course++; } } if(course){ for(int i=0;iCurve->Count;i++){ KO *ko=(KO *)tex->Curve->Items[i]; ko->in = num1[i%course]; ko->via = num2[i%course]; } } delete [] num1; delete [] num2; delete [] str; DesignForm->DrawChart(false); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::separate(char *str, int *num1, int *num2) { int i; int separator = 0; for(i=1;i<16;i++)//16ÀÚ¸® ¼ýÀÚ¸é ÃæºÐÇÒ°Í.. { if(str[i]=='.'||str[i]=='\0') break; if(str[i]==',') separator = i; } if(i==0) return; char str1[8]; char str2[8]; if (separator){//gabriel: »ç¿ëÀÚ°¡ ,·Î ¼ýÀÚ¸¦ ³ª´©¸é memset(str1,0,8); memset(str2,0,8); for(int j=0;jabs(temp3-temp4)){//Â÷À̰¡ ÀûÀº°Ô Æò¹üÇϹǷΠÂ÷À̰¡ ÀûÀº°ÍÀ» ÅÃÇÑ´Ù *num1=temp3; *num2=temp4; } else { *num1=temp1; *num2=temp2; } } } //--------------------------------------------------------------------------- bool ELChecked = false; void __fastcall TEditorForm::cbELmodeClick(TObject *Sender) { if (!Visible) return; // DesignForm->ELmode = cbELmode->Checked; tsELShow(Sender); if (ELChecked) { if (!InputMode3DataForm) { InputMode3DataForm = new TInputMode3DataForm(this); SetWindowPos(InputMode3DataForm->Handle,HWND_TOPMOST,0,0,InputMode3DataForm->Width,InputMode3DataForm->Height,SWP_SHOWWINDOW); InputMode3DataForm->Visible = true; InputMode3DataForm->RzEditData->SetFocus(); } ELChecked = false; } else { if (InputMode3DataForm) { delete InputMode3DataForm; InputMode3DataForm = NULL; } ELChecked = true; } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::pcLayerChange(TObject *Sender) { if (Main->LayerMode) {//Bar ó¸® ³»¿ë if (pcLayer->ActivePage == tsL1){ Main->cbB7Click(NULL); } else if (pcLayer->ActivePage == tsL2){ Main->cbB6Click(NULL); } else if (pcLayer->ActivePage == tsL3){ Main->cbB5Click(NULL); } else if (pcLayer->ActivePage == tsL4){ Main->cbB4Click(NULL); } else if (pcLayer->ActivePage == tsL5){ Main->cbB3Click(NULL); } else if (pcLayer->ActivePage == tsL6){ Main->cbB2Click(NULL); } else if (pcLayer->ActivePage == tsL7){ Main->cbB1Click(NULL); } } else { if (pcLayer->ActivePage == tsL1){ Main->sbL1Click(NULL); } else if (pcLayer->ActivePage == tsL2){ Main->sbL2Click(NULL); } else if (pcLayer->ActivePage == tsL3){ Main->sbL3Click(NULL); } else if (pcLayer->ActivePage == tsL4){ Main->sbL4Click(NULL); } else if (pcLayer->ActivePage == tsL5){ Main->sbL5Click(NULL); } else if (pcLayer->ActivePage == tsL6){ Main->sbL6Click(NULL); } else if (pcLayer->ActivePage == tsL7){ Main->sbL7Click(NULL); } } } void __fastcall TEditorForm::EditorTextChange(){ tsL1->TabVisible = false; tsL2->TabVisible = false; tsL3->TabVisible = false; tsL4->TabVisible = false; tsL5->TabVisible = false; tsL6->TabVisible = false; tsL7->TabVisible = false; lbL1->Color = clGray; lbL2->Color = clGray; lbL3->Color = clGray; lbL4->Color = clGray; lbL5->Color = clGray; lbL6->Color = clGray; lbL7->Color = clGray; memoHorzData1->Enabled = false; memoHorzData2->Enabled = false; memoHorzData3->Enabled = false; memoHorzData4->Enabled = false; memoHorzData5->Enabled = false; memoHorzData6->Enabled = false; memoHorzData7->Enabled = false; if(Main->maindata.bar>=1){ EditorForm->tsL1->TabVisible = true; EditorForm->lbL1->Font->Color = clWhite; EditorForm->lbL1->Color = RGB2TColor(62,67,88); EditorForm->memoHorzData1->Enabled = true; } if(Main->maindata.bar>=2){ EditorForm->tsL2->TabVisible = true; EditorForm->lbL2->Font->Color = clWhite; EditorForm->lbL2->Color = RGB2TColor(62,67,88); EditorForm->memoHorzData2->Enabled = true; } if(Main->maindata.bar>=3){ EditorForm->tsL3->TabVisible = true; EditorForm->lbL3->Font->Color = clWhite; EditorForm->lbL3->Color = RGB2TColor(62,67,88); EditorForm->memoHorzData3->Enabled = true; } if(Main->maindata.bar>=4){ EditorForm->tsL4->TabVisible = true; EditorForm->lbL4->Font->Color = clWhite; EditorForm->lbL4->Color = RGB2TColor(62,67,88); EditorForm->memoHorzData4->Enabled = true; } if(Main->maindata.bar>=5){ EditorForm->tsL5->TabVisible = true; EditorForm->lbL5->Font->Color = clWhite; EditorForm->lbL5->Color = RGB2TColor(62,67,88); EditorForm->memoHorzData5->Enabled = true; } if(Main->maindata.bar>=6){ EditorForm->tsL6->TabVisible = true; EditorForm->lbL6->Font->Color = clWhite; EditorForm->lbL6->Color = RGB2TColor(62,67,88); EditorForm->memoHorzData6->Enabled = true; } if(Main->maindata.bar>=7){ EditorForm->tsL7->TabVisible = true; EditorForm->lbL7->Font->Color = clWhite; EditorForm->lbL7->Color = RGB2TColor(62,67,88); EditorForm->memoHorzData7->Enabled = true; } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::tsELShow(TObject *Sender) { //ÃÑÄÚ½º¸¦ º¸¿©ÁØ´Ù lb3TT1->Caption = AnsiString(Main->maindata.course); lb3TT2->Caption = lb3TT1->Caption; lb3TT3->Caption = lb3TT1->Caption; lb3TT4->Caption = lb3TT1->Caption; lb3TT5->Caption = lb3TT1->Caption; lb3TT6->Caption = lb3TT1->Caption; lb3TT7->Caption = lb3TT1->Caption; /* if(cbELmode->Checked) { //page À̵¿ //pcLayer->ActivePage = tsL1; switch (Main->LayerNum) { case 0: pcLayer->ActivePage = tsL1; break; case 1: pcLayer->ActivePage = tsL2; break; case 2: pcLayer->ActivePage = tsL3; break; case 3: pcLayer->ActivePage = tsL4; break; case 4: pcLayer->ActivePage = tsL5; break; case 5: pcLayer->ActivePage = tsL6; break; case (MAX_LAYER_COUNT-1): pcLayer->ActivePage = tsL7; break; } //layer°³¼ö µû¶ó enable ½ÃÅ´ ELMemo1->Enabled = true; sbEL1->Enabled = true; if(Main->maindata.bar >=2 ) { ELMemo2->Enabled = true; sbEL2->Enabled = true; } else { ELMemo2->Enabled = false; sbEL2->Enabled = false; } if(Main->maindata.bar >=3 ) { ELMemo3->Enabled = true; sbEL3->Enabled = true; } else { ELMemo3->Enabled = false; sbEL3->Enabled = false; } if(Main->maindata.bar >=4 ) { ELMemo4->Enabled = true; sbEL4->Enabled = true; } else { ELMemo4->Enabled = false; sbEL4->Enabled = false; } if(Main->maindata.bar >=5 ) { ELMemo5->Enabled = true; sbEL5->Enabled = true; } else { ELMemo5->Enabled = false; sbEL5->Enabled = false; } if(Main->maindata.bar >=6 ) { ELMemo6->Enabled = true; sbEL6->Enabled = true; } else { ELMemo6->Enabled = false; sbEL6->Enabled = false; } if(Main->maindata.bar >=MAX_LAYER_COUNT ) { ELMemo7->Enabled = true; sbEL7->Enabled = true; } else { ELMemo7->Enabled = false; sbEL7->Enabled = false; } } else { ELMemo1->Enabled = false; ELMemo2->Enabled = false; sbEL2->Enabled = false; ELMemo3->Enabled = false; sbEL3->Enabled = false; ELMemo4->Enabled = false; sbEL4->Enabled = false; ELMemo5->Enabled = false; sbEL5->Enabled = false; ELMemo6->Enabled = false; sbEL6->Enabled = false; ELMemo7->Enabled = false; sbEL7->Enabled = false; } */ } //--------------------------------------------------------------------------- void __fastcall TEditorForm::sbEL1Click(TObject *Sender) { int barCount = Main->maindata.bar; if (Main->LayerMode) { if(Main->maindata.course == StrToInt(lb3T1->Caption) && barCount-1 >= 0){ memoHorzData1->Text = lb3D1->Caption; SetTex(memoHorzData1, barCount-1); } } else { if(Main->maindata.course == StrToInt(lb3T1->Caption) && Main->maindata.bar >=1){ memoHorzData1->Text = lb3D1->Caption; SetTex(memoHorzData1,0); } } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::sbEL2Click(TObject *Sender) { int barCount = Main->maindata.bar; if (Main->LayerMode) { if(Main->maindata.course == StrToInt(lb3T2->Caption) && barCount-2 >= 0) { memoHorzData2->Text = lb3D2->Caption; SetTex(memoHorzData2,barCount-2); } } else { if(Main->maindata.course == StrToInt(lb3T2->Caption) && Main->maindata.bar >=2) { memoHorzData2->Text = lb3D2->Caption; SetTex(memoHorzData2,1); } } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::sbEL3Click(TObject *Sender) { int barCount = Main->maindata.bar; if (Main->LayerMode) { if(Main->maindata.course == StrToInt(lb3T3->Caption) && barCount-3 >= 0) { memoHorzData3->Text = lb3D3->Caption; SetTex(memoHorzData3, barCount-3); } } else { if(Main->maindata.course == StrToInt(lb3T3->Caption) && Main->maindata.bar >=3) { memoHorzData3->Text = lb3D3->Caption; SetTex(memoHorzData3,2); } } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::sbEL4Click(TObject *Sender) { int barCount = Main->maindata.bar; if (Main->LayerMode) { if(Main->maindata.course == StrToInt(lb3T4->Caption) && barCount-4 >= 0){ memoHorzData4->Text = lb3D4->Caption; SetTex(memoHorzData4,barCount-4); } } else { if(Main->maindata.course == StrToInt(lb3T4->Caption) && Main->maindata.bar >=4){ memoHorzData4->Text = lb3D4->Caption; SetTex(memoHorzData4 , 3); } } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::sbEL5Click(TObject *Sender) { int barCount = Main->maindata.bar; if (Main->LayerMode) { if(Main->maindata.course == StrToInt(lb3T5->Caption) && barCount-5 >= 0) { memoHorzData5->Text = lb3D5->Caption; SetTex(memoHorzData5, barCount-5); } } else { if(Main->maindata.course == StrToInt(lb3T5->Caption) && Main->maindata.bar >=5) { memoHorzData5->Text = lb3D5->Caption; SetTex(memoHorzData5,4); } } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::sbEL6Click(TObject *Sender) { int barCount = Main->maindata.bar; if (Main->LayerMode) { if(Main->maindata.course == StrToInt(lb3T6->Caption) && barCount-6 >= 0) { memoHorzData6->Text = lb3D6->Caption; SetTex(memoHorzData6, barCount-6); } } else { if(Main->maindata.course == StrToInt(lb3T6->Caption) && Main->maindata.bar >=6) { memoHorzData6->Text = lb3D6->Caption; SetTex(memoHorzData6, 5); } } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::sbEL7Click(TObject *Sender) { int barCount = Main->maindata.bar; if (Main->LayerMode) { if(Main->maindata.course == StrToInt(lb3T7->Caption) && barCount-MAX_LAYER_COUNT >= 0) { memoHorzData7->Text = lb3D7->Caption; SetTex(memoHorzData7, barCount- MAX_LAYER_COUNT); } } else { if(Main->maindata.course == StrToInt(lb3T7->Caption) && Main->maindata.bar >=MAX_LAYER_COUNT) { memoHorzData7->Text = lb3D7->Caption; SetTex(memoHorzData7, 6); } } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::LoadELdata(HANDLE hFile, int ver) { int strlen=0; DWORD dwRead; LPVOID buf=NULL; int maxLayerCnt; if(ver < 7) maxLayerCnt = 6; else maxLayerCnt = MAX_LAYER_COUNT; for(int i=0;iLayerMode) {//Bar ó¸® ³»¿ë int barCount = Main->maindata.bar; if (barCount-1 >=0) ELMemo1->Lines->Add(ELMemo_Text[barCount-1]);//Text = ELMemo_Text[barCount-1]; else ELMemo1->Text = ""; if (barCount-2 >=0) ELMemo2->Lines->Add(ELMemo_Text[barCount-2]);//Text = ELMemo_Text[barCount-2]; else ELMemo2->Text = ""; if (barCount-3 >=0) ELMemo3->Lines->Add(ELMemo_Text[barCount-3]);//Text = ELMemo_Text[barCount-3]; else ELMemo3->Text = ""; if (barCount-4 >=0) ELMemo4->Lines->Add(ELMemo_Text[barCount-4]);//Text = ELMemo_Text[barCount-4]; else ELMemo4->Text = ""; if (barCount-5 >=0) ELMemo5->Lines->Add(ELMemo_Text[barCount-5]);//Text = ELMemo_Text[barCount-5]; else ELMemo5->Text = ""; if (barCount-6 >=0) ELMemo6->Lines->Add(ELMemo_Text[barCount-6]);//Text = ELMemo_Text[barCount-6]; else ELMemo6->Text = ""; if (barCount-7 >=0) ELMemo7->Lines->Add(ELMemo_Text[barCount-7]);//Text = ELMemo_Text[barCount-6]; else ELMemo7->Text = ""; if (barCount-1 >=0) lb3D1->Caption = lb3D_Caption[barCount-1]; else lb3D1->Caption = ""; if (barCount-2 >=0) lb3D2->Caption = lb3D_Caption[barCount-2]; else lb3D2->Caption = ""; if (barCount-3 >=0) lb3D3->Caption = lb3D_Caption[barCount-3]; else lb3D3->Caption = ""; if (barCount-4 >=0) lb3D4->Caption = lb3D_Caption[barCount-4]; else lb3D4->Caption = ""; if (barCount-5 >=0) lb3D5->Caption = lb3D_Caption[barCount-5]; else lb3D5->Caption = ""; if (barCount-6 >=0) lb3D6->Caption = lb3D_Caption[barCount-6]; else lb3D6->Caption = ""; if (barCount-7 >=0) lb3D7->Caption = lb3D_Caption[barCount-7]; else lb3D7->Caption = ""; if (barCount-1 >=0) lb3T1->Caption = lb3T_Caption[barCount-1]; else lb3T1->Caption = ""; if (barCount-2 >=0) lb3T2->Caption = lb3T_Caption[barCount-2]; else lb3T2->Caption = ""; if (barCount-3 >=0) lb3T3->Caption = lb3T_Caption[barCount-3]; else lb3T3->Caption = ""; if (barCount-4 >=0) lb3T4->Caption = lb3T_Caption[barCount-4]; else lb3T4->Caption = ""; if (barCount-5 >=0) lb3T5->Caption = lb3T_Caption[barCount-5]; else lb3T5->Caption = ""; if (barCount-6 >=0) lb3T6->Caption = lb3T_Caption[barCount-6]; else lb3T6->Caption = ""; if (barCount-7 >=0) lb3T7->Caption = lb3T_Caption[barCount-7]; else lb3T7->Caption = ""; } else { //Layer mode /* ELMemo1->Text = ELMemo_Text[0]; ELMemo2->Text = ELMemo_Text[1]; ELMemo3->Text = ELMemo_Text[2]; ELMemo4->Text = ELMemo_Text[3]; ELMemo5->Text = ELMemo_Text[4]; ELMemo6->Text = ELMemo_Text[5]; */ ELMemo1->Lines->Add(ELMemo_Text[0]); ELMemo2->Lines->Add(ELMemo_Text[1]); ELMemo3->Lines->Add(ELMemo_Text[2]); ELMemo4->Lines->Add(ELMemo_Text[3]); ELMemo5->Lines->Add(ELMemo_Text[4]); ELMemo6->Lines->Add(ELMemo_Text[5]); ELMemo7->Lines->Add(ELMemo_Text[6]); lb3D1->Caption = lb3D_Caption[0]; lb3D2->Caption = lb3D_Caption[1]; lb3D3->Caption = lb3D_Caption[2]; lb3D4->Caption = lb3D_Caption[3]; lb3D5->Caption = lb3D_Caption[4]; lb3D6->Caption = lb3D_Caption[5]; lb3D7->Caption = lb3D_Caption[6]; lb3T1->Caption = lb3T_Caption[0]; lb3T2->Caption = lb3T_Caption[1]; lb3T3->Caption = lb3T_Caption[2]; lb3T4->Caption = lb3T_Caption[3]; lb3T5->Caption = lb3T_Caption[4]; lb3T6->Caption = lb3T_Caption[5]; lb3T7->Caption = lb3T_Caption[6]; } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::SaveELdata(HANDLE hFile) { ELMemo_Text[0] = ELMemo1->Text; ELMemo_Text[1] = ELMemo2->Text; ELMemo_Text[2] = ELMemo3->Text; ELMemo_Text[3] = ELMemo4->Text; ELMemo_Text[4] = ELMemo5->Text; ELMemo_Text[5] = ELMemo6->Text; ELMemo_Text[6] = ELMemo7->Text; lb3D_Caption[0] = lb3D1->Caption; lb3D_Caption[1] = lb3D2->Caption; lb3D_Caption[2] = lb3D3->Caption; lb3D_Caption[3] = lb3D4->Caption; lb3D_Caption[4] = lb3D5->Caption; lb3D_Caption[5] = lb3D6->Caption; lb3D_Caption[6] = lb3D7->Caption; lb3T_Caption[0] = lb3T1->Caption; lb3T_Caption[1] = lb3T2->Caption; lb3T_Caption[2] = lb3T3->Caption; lb3T_Caption[3] = lb3T4->Caption; lb3T_Caption[4] = lb3T5->Caption; lb3T_Caption[5] = lb3T6->Caption; lb3T_Caption[6] = lb3T7->Caption; if (Main->LayerMode) {//Bar ó¸® ³»¿ë int barCount = Main->maindata.bar; AnsiString memo[MAX_LAYER_COUNT], lb3D[MAX_LAYER_COUNT], lb3T[MAX_LAYER_COUNT]; for (int i = 0; i < MAX_LAYER_COUNT; i++) { memo[i] = ELMemo_Text[i]; lb3D[i] = lb3D_Caption[i]; lb3T[i] = lb3T_Caption[i]; } for (int i = 0, j = barCount-1; j >= 0; j--, i++) { ELMemo_Text[i] = memo[j]; lb3D_Caption[i] = lb3D[j]; lb3T_Caption[i] = lb3T[j]; } } int strlen = 0; DWORD dwWrite; for(int i=0;iText); Label_layer->Caption = myELData->ToParsedString(); totalLabel_layer->Caption = myELData->Total(); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::PerformParsing(int layer){ //TricotELData *myELData; if(myELData) delete myELData; myELData = NULL; TMemo *Memo_layer = (TMemo *) FindComponent("ELMemo" + AnsiString(layer)); TLabel *Label_layer = (TLabel *) FindComponent("lb3D" + AnsiString(layer)); TLabel *totalLabel_layer = (TLabel *) FindComponent("lb3T" + AnsiString(layer)); myELData = TricotELData::parseText(Memo_layer->Text); Label_layer->Caption = myELData->ToString(); totalLabel_layer->Caption = myELData->Total(); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo1Change(TObject *Sender) { Do_Parse(1); if(lb3TT1->Caption == lb3T1->Caption){ sbEL1->Enabled=true; } else { sbEL1->Enabled=false; } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo2Change(TObject *Sender) { Do_Parse(2); if(lb3TT2->Caption == lb3T2->Caption){ sbEL2->Enabled=true; } else { sbEL2->Enabled=false; } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo3Change(TObject *Sender) { Do_Parse(3); if(lb3TT3->Caption == lb3T3->Caption){ sbEL3->Enabled=true; } else { sbEL3->Enabled=false; } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo4Change(TObject *Sender) { Do_Parse(4); if(lb3TT4->Caption == lb3T4->Caption){ sbEL4->Enabled=true; } else { sbEL4->Enabled=false; } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo5Change(TObject *Sender) { Do_Parse(5); if(lb3TT5->Caption == lb3T5->Caption){ sbEL5->Enabled=true; } else { sbEL5->Enabled=false; } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo6Change(TObject *Sender) { Do_Parse(6); if(lb3TT6->Caption == lb3T6->Caption){ sbEL6->Enabled=true; } else { sbEL6->Enabled=false; } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo7Change(TObject *Sender) { Do_Parse(7); if(lb3TT7->Caption == lb3T7->Caption){ sbEL7->Enabled=true; } else { sbEL7->Enabled=false; } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo1MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { if(myELData) delete myELData; myELData = NULL; myELData = TricotELData::parseText(ELMemo1->Text); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo2MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { if(myELData) delete myELData; myELData = NULL; myELData = TricotELData::parseText(ELMemo2->Text); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo3MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { if(myELData) delete myELData; myELData = NULL; myELData = TricotELData::parseText(ELMemo3->Text); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo4MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { if(myELData) delete myELData; myELData = NULL; myELData = TricotELData::parseText(ELMemo4->Text); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo5MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { if(myELData) delete myELData; myELData = NULL; myELData = TricotELData::parseText(ELMemo5->Text); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo6MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { if(myELData) delete myELData; myELData = NULL; myELData = TricotELData::parseText(ELMemo6->Text); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo7MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { if(myELData) delete myELData; myELData = NULL; myELData = TricotELData::parseText(ELMemo7->Text); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::pmELMemoPopup(TObject *Sender) { if(myELData == NULL) return; int startPosition, endPosition; TPopupMenu *thisPopup = (TPopupMenu *)Sender; SelectedMemo = (TMemo *)(thisPopup->PopupComponent); //Label1->Caption = Memo1->SelStart; if(myELData->getStartEndPosition(SelectedMemo->SelStart,startPosition,endPosition)){ //¾îµò°¡ ¹Ì¸® ¸¸µé¾îÁø ±¸°£À̸é /* 2006.04.24 ÇöÀç´Â Àüü¼±ÅÃÀÌ Àǹ̰¡ ¾ø´Ù SelectedMemo->SelStart = startPosition; SelectedMemo->SelLength = endPosition - startPosition; SelectedMemo->SetFocus(); */ //raw1->Visible = true; //parsed1->Visible = false; Repeat_course->Visible = false; }else{ //raw1->Visible = false; //parsed1->Visible = true; Repeat_course->Visible = true; } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::Repeat_courseClick(TObject *Sender) { Screen->Cursor = crIBeam; FloatingWindow->Left=Mouse->CursorPos.x; FloatingWindow->Top=Mouse->CursorPos.y-FloatingWindow->Height; FloatingWindow->Caption=0; if(FloatingWindow->ShowModal()==mrOk){ RepeatSelectedRegion(Sender,FloatingWindow->edit->Text); } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::RepeatSelectedRegion(TObject *Sender, AnsiString Text) { //if(true){//Á¦´ë·Î µÈ ±¸°£À» °ñ¶úÀ¸¸é //´ÙÀ̾ó·Î±× ¹Ú½º¸¦ ¶ç¿ö¼­ ¹Ýº¹È½¼ö¸¦ ¹¯´Â´Ù. int repeatCount; if( repeatCount = Text.ToInt() ){//¹Ýº¹ ¼ýÀÚ°¡ ÀÖÀ¸¸é //¹Ýº¹ ½ÃÄÑÁØ´Ù. AnsiString result = SelectedMemo->SelText; result = "( " + result + " ) x "+repeatCount; SelectedMemo->SelText = result; } //} } //--------------------------------------------------------------------------- void __fastcall TEditorForm::LocateClick(TObject *Sender) { Screen->Cursor = crIBeam; FloatingWindow->Left=Mouse->CursorPos.x; FloatingWindow->Top=Mouse->CursorPos.y-FloatingWindow->Height; FloatingWindow->Caption=0; if(FloatingWindow->ShowModal()==mrOk){ Do_Locate(Sender,FloatingWindow->edit->Text); } } //--------------------------------------------------------------------------- /*//¿øÇÏ´Â ºÎºÐ ¼±ÅÃÇÏ´Â ¹æ¹ý Memo1->SelStart = 3; Memo1->SelLength = 3; Memo1->SetFocus(); */ void __fastcall TEditorForm::Do_Locate(TObject *Sender, AnsiString Text) { //À§Ä¡ ã±â. int index; try{ index = Text.ToInt(); } catch(...){ return;//¼ýÀÚ°¡ ¾Æ´Ô. } int position; int sel_length=0; position = myELData->getStartPositionOfIndex(index); SelectedMemo->SelStart = position; sel_length = myELData->getendPositionOfIndex(index) - position; SelectedMemo->SelLength = sel_length; //SelectedMemo->SetFocus(); } //--------------------------------------------------------------------------- /* pop up menu void __fastcall TEditorForm::raw1Click(TObject *Sender) { TricotELData *tempELData = TricotELData::parseText(ELMemo_i->SelText); ELMemo_i->SelText = tempELData->ToString(); } //--------------------------------------------------------------------------- void __fastcall TEditorForm::parsed1Click(TObject *Sender) { TricotELData *tempELData = TricotELData::parseRawText(ELMemo_i->SelText); ELMemo(i)->SelText = tempELData->ToParsedString(); } */ //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo1KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { // } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo2KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { // } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo3KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { // } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo4KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { // } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo5KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { // } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo6KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { // } void __fastcall TEditorForm::ELMemo7KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { // } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ELMemo3KeyPress(TObject *Sender, char &Key) { // } //--------------------------------------------------------------------------- void __fastcall TEditorForm::FormClose(TObject *Sender, TCloseAction &Action) { if (InputMode3DataForm) { delete InputMode3DataForm; InputMode3DataForm = NULL; } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::FormShow(TObject *Sender) { int barCount = Main->maindata.bar; if (Main->LayerMode) {//Bar ó¸® ³»¿ë lbL1->Caption = "GB 1"; lbL2->Caption = "GB 2"; lbL3->Caption = "GB 3"; lbL4->Caption = "GB 4"; lbL5->Caption = "GB 5"; lbL6->Caption = "GB 6"; lbL7->Caption = "GB 7"; tsL1->Caption = "G1"; tsL2->Caption = "G2"; tsL3->Caption = "G3"; tsL4->Caption = "G4"; tsL5->Caption = "G5"; tsL6->Caption = "G6"; tsL7->Caption = "G7"; } else { //layer ¸ðµåÀÏ °æ¿ì lbL1->Caption = "Layer 1"; lbL2->Caption = "Layer 2"; lbL3->Caption = "Layer 3"; lbL4->Caption = "Layer 4"; lbL5->Caption = "Layer 5"; lbL6->Caption = "Layer 6"; lbL7->Caption = "Layer 7"; tsL1->Caption = "L1"; tsL2->Caption = "L2"; tsL3->Caption = "L3"; tsL4->Caption = "L4"; tsL5->Caption = "L5"; tsL6->Caption = "L6"; tsL7->Caption = "L7"; } if (ELChecked) { if (pcEditor->ActivePageIndex != 2) pcEditor->ActivePageIndex = 2; if (!InputMode3DataForm) { InputMode3DataForm = new TInputMode3DataForm(this); SetWindowPos(InputMode3DataForm->Handle,HWND_TOPMOST,0,0,InputMode3DataForm->Width,InputMode3DataForm->Height,SWP_SHOWWINDOW); InputMode3DataForm->Visible = true; InputMode3DataForm->RzEditData->SetFocus(); } else { InputMode3DataForm->Show(); } ELChecked = false; } else { ELChecked = true; } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::memoHorzData1KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { if(GetAsyncKeyState(VK_CONTROL)) { if(Key==0x41) { //#A memoHorzData1->SelectAll(); } } if(Key==VK_RETURN) { SetTex(memoHorzData1, 0); } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::memoHorzData2KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { if(GetAsyncKeyState(VK_CONTROL)) { if(Key==0x41) { //#A memoHorzData2->SelectAll(); } } if(Key==VK_RETURN) { SetTex(memoHorzData2, 1); } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::memoHorzData3KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { if(GetAsyncKeyState(VK_CONTROL)) { if(Key==0x41) { //#A memoHorzData3->SelectAll(); } } if(Key==VK_RETURN) { SetTex(memoHorzData3, 2); } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::memoHorzData4KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { if(GetAsyncKeyState(VK_CONTROL)) { if(Key==0x41) { //#A memoHorzData4->SelectAll(); } } if(Key==VK_RETURN) { SetTex(memoHorzData4, 3); } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::memoHorzData5KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { if(GetAsyncKeyState(VK_CONTROL)) { if(Key==0x41) { //#A memoHorzData5->SelectAll(); } } if(Key==VK_RETURN) { SetTex(memoHorzData5, 4); } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::memoHorzData6KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { if(GetAsyncKeyState(VK_CONTROL)) { if(Key==0x41) { //#A memoHorzData6->SelectAll(); } } if(Key==VK_RETURN) { SetTex(memoHorzData6, 5); } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::memoHorzData7KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { if(GetAsyncKeyState(VK_CONTROL)) { if(Key==0x41) { //#A memoHorzData7->SelectAll(); } } if(Key==VK_RETURN) { SetTex(memoHorzData7, 6); } } //--------------------------------------------------------------------------- void __fastcall TEditorForm::ApplyRzBitBtnClick(TObject *Sender) { int barCount = Main->maindata.bar; if (Main->LayerMode) {//Bar ó¸® ³»¿ë if (barCount - 1 < 0) return; } SetTex(memoHorzData1, 0); SetTex(memoHorzData2, 1); SetTex(memoHorzData3, 2); SetTex(memoHorzData4, 3); SetTex(memoHorzData5, 4); SetTex(memoHorzData6, 5); SetTex(memoHorzData7, 6); Init(); } //---------------------------------------------------------------------------