개정판 17f2a3a7
dev issue #000 : 메뉴얼 추가 및 Converter 수정
Change-Id: Iac7fc46b848a1dc776715774fd3e5c513df4fc03
DTI_PID/SPPIDConverter/ConverterForm.cs | ||
---|---|---|
70 | 70 |
private void commandControl_Activate(object sender, EventArgs e) |
71 | 71 |
{ |
72 | 72 |
Show(); |
73 |
//if (ShowDialog() == DialogResult.OK) |
|
74 |
//{ |
|
75 |
|
|
76 |
//} |
|
77 |
|
|
78 |
//foreach (var item in commandControl.Application.RADApplication.ActiveSelectSet) |
|
79 |
//{ |
|
80 |
// //MessageBox.Show(item.GetType()); |
|
81 |
// int count = ((Ingr.RAD2D.LineStringGeometry2d)((Ingr.RAD2D.DependencyObject)item).GetGeometry()).VertexCount; |
|
82 |
// double[] iii = null; |
|
83 |
// ((Ingr.RAD2D.LineStringGeometry2d)((Ingr.RAD2D.DependencyObject)item).GetGeometry()).GetVertices(ref count, ref iii); |
|
84 |
// for (int i = 0; i < count; i++) |
|
85 |
// { |
|
86 |
// double x = 0; |
|
87 |
// double y = 0; |
|
88 |
// ((Ingr.RAD2D.LineStringGeometry2d)((Ingr.RAD2D.DependencyObject)item).GetGeometry()).GetVertex(i + 1, ref x, ref y); |
|
89 |
|
|
90 |
// } |
|
91 |
// Ingr.RAD2D.Symbol2d symbol2D; |
|
92 |
// //symbol2D.Move |
|
93 |
//} |
|
94 |
|
|
95 |
//commandControl.Application.RADApplication.Interactive = true; |
|
96 |
//Hide(); |
|
97 |
//commandControl.Done = true; |
|
98 | 73 |
} |
99 | 74 |
|
100 | 75 |
/// <summary> |
... | ... | |
508 | 483 |
|
509 | 484 |
private void btnLoadFile_Click(object sender, EventArgs e) |
510 | 485 |
{ |
511 |
modeling.Test(); |
|
512 |
return; |
|
513 | 486 |
Project_Info _ProjectInfo = Project_Info.GetInstance(); |
514 | 487 |
if (!_ProjectInfo.Enable) |
515 | 488 |
{ |
... | ... | |
547 | 520 |
} |
548 | 521 |
} |
549 | 522 |
} |
550 |
static AutoModeling modeling; |
|
523 |
|
|
551 | 524 |
private void btnRun_Click(object sender, EventArgs e) |
552 | 525 |
{ |
553 | 526 |
#if DEBUG |
554 | 527 |
this.Visible = false; |
555 | 528 |
|
556 |
SPPID_Document document = new SPPID_Document(@"Z:\HanKyouHo\temp\Isocynates\Temp\11111.xml"); |
|
557 |
//SPPID_Document document = new SPPID_Document(@"Z:\HanKyouHo\temp\Isocynates\Temp\Isocynates-325_Page50.xml");
|
|
529 |
//SPPID_Document document = new SPPID_Document(@"Z:\HanKyouHo\temp\Isocynates\Temp\11111.xml");
|
|
530 |
SPPID_Document document = new SPPID_Document(@"Z:\HanKyouHo\temp\Isocynates\Temp\Isocynates-325_Page50.xml"); |
|
558 | 531 |
//SPPID_Document document = new SPPID_Document(@"Z:\HanKyouHo\temp\Isocynates\Temp\Isocynates-325_Page49.xml"); |
559 | 532 |
document.SymbolMappings = symbolMappings; |
560 | 533 |
document.ChildSymbolMappings = childSymbolMappings; |
... | ... | |
567 | 540 |
|
568 | 541 |
if (document.SetSPPIDMapping() && document.Enable) |
569 | 542 |
{ |
570 |
modeling = new AutoModeling(document, commandControl.Application.RADApplication); |
|
543 |
AutoModeling modeling = new AutoModeling(document, commandControl.Application.RADApplication);
|
|
571 | 544 |
modeling.Run(); |
572 | 545 |
} |
573 | 546 |
|
574 | 547 |
this.Visible = true; |
575 | 548 |
return; |
576 |
#endif |
|
549 |
#else |
|
550 |
_Documents.Clear(); |
|
577 | 551 |
|
578 |
//_Documents.Clear(); |
|
579 |
|
|
580 |
//foreach (int rowHandle in gridViewConverter.GetSelectedRows()) |
|
581 |
//{ |
|
582 |
// string _FilePath = gridViewConverter.GetRowCellDisplayText(rowHandle, "colDrawingFilePath"); |
|
583 |
// string _Unit = gridViewConverter.GetRowCellDisplayText(rowHandle, "colUnit"); |
|
584 |
// string _Template = gridViewConverter.GetRowCellDisplayText(rowHandle, "colTemplate"); |
|
585 |
// string _DrawingNumber = gridViewConverter.GetRowCellDisplayText(rowHandle, "colDrawingNumber"); |
|
586 |
// string _DrawingName = gridViewConverter.GetRowCellDisplayText(rowHandle, "colDrawingName"); |
|
587 |
// SPPID_Document document = _DicDocuments[_FilePath]; |
|
588 |
// document.Unit = _Unit; |
|
589 |
// document.Template = _Template; |
|
590 |
// document.DrawingNumber = _DrawingNumber; |
|
591 |
// document.DrawingName = _DrawingName; |
|
592 |
// _Documents.Add(document); |
|
593 |
//} |
|
552 |
foreach (int rowHandle in gridViewConverter.GetSelectedRows()) |
|
553 |
{ |
|
554 |
string _FilePath = gridViewConverter.GetRowCellDisplayText(rowHandle, "colDrawingFilePath"); |
|
555 |
string _Unit = gridViewConverter.GetRowCellDisplayText(rowHandle, "colUnit"); |
|
556 |
string _Template = gridViewConverter.GetRowCellDisplayText(rowHandle, "colTemplate"); |
|
557 |
string _DrawingNumber = gridViewConverter.GetRowCellDisplayText(rowHandle, "colDrawingNumber"); |
|
558 |
string _DrawingName = gridViewConverter.GetRowCellDisplayText(rowHandle, "colDrawingName"); |
|
559 |
SPPID_Document document = _DicDocuments[_FilePath]; |
|
560 |
document.Unit = _Unit; |
|
561 |
document.Template = _Template; |
|
562 |
document.DrawingNumber = _DrawingNumber; |
|
563 |
document.DrawingName = _DrawingName; |
|
564 |
_Documents.Add(document); |
|
565 |
} |
|
594 | 566 |
|
595 | 567 |
DialogResult = DialogResult.OK; |
568 |
#endif |
|
596 | 569 |
} |
597 | 570 |
|
598 | 571 |
private void btnSPPIDDB_Click(object sender, EventArgs e) |
DTI_PID/SPPIDConverter_DialogBarWrapper/SPPIDConverterWrapper.cs | ||
---|---|---|
129 | 129 |
RegistryKey ID2 = DOFTECH.OpenSubKey("ID2"); |
130 | 130 |
if (ID2 != null) |
131 | 131 |
{ |
132 |
//string wrapperDllPath = ID2.GetValue("Path").ToString() + @"Converter\SPPIDConverter_Wrapper.dll"; |
|
133 |
//string wrapperDllPath = System.Reflection.Assembly.GetExecutingAssembly().Location; |
|
134 |
string wrapperDllPath = @"Z:\HanKyouHo\Source\DTIPID\DTI_PID\SPPIDConverterDll\SPPIDConverter_Wrapper.dll"; |
|
135 |
string autoModelingDllPath = @"Z:\HanKyouHo\Source\DTIPID\DTI_PID\SPPIDConverterDll\SPPIDConverter.dll"; |
|
132 |
string wrapperDllPath = ID2.GetValue("path") + @"Converter\SPPIDConverter_Wrapper.dll"; |
|
133 |
string autoModelingDllPath = ID2.GetValue("path") + @"Converter\SPPIDConverter.dll"; |
|
134 |
#if DEBUG |
|
135 |
wrapperDllPath = @"Z:\HanKyouHo\Source\DTIPID\DTI_PID\SPPIDConverterDll\SPPIDConverter_Wrapper.dll"; |
|
136 |
autoModelingDllPath = @"Z:\HanKyouHo\Source\DTIPID\DTI_PID\SPPIDConverterDll\SPPIDConverter.dll"; |
|
137 |
#endif |
|
136 | 138 |
|
137 | 139 |
#region Set ToolBar and Menu |
138 | 140 |
ToolBars toolBars = application.ToolBars; |
... | ... | |
205 | 207 |
#endregion |
206 | 208 |
|
207 | 209 |
|
208 |
commandControl.Application.RADApplication.RunManagedMacro(@"Z:\HanKyouHo\Source\DTIPID\DTI_PID\SPPIDConverterDll\SPPIDConverter.dll", "Converter.SPPID.SPPIDConverter_AutoModeling"); |
|
209 |
return; |
|
210 |
|
|
211 |
#region DialogBar Setting |
|
212 |
try |
|
213 |
{ |
|
214 |
foreach (DialogBar dialogBar in application.DialogBars) |
|
215 |
{ |
|
216 |
if (dialogBar.Name == DialogBarName) |
|
217 |
{ |
|
218 |
dialogBar.Delete(); |
|
219 |
break; |
|
220 |
} |
|
221 |
} |
|
222 |
DialogBar dlgBar = application.DialogBars.Add(DialogBarName, DockingFlagsConstants.igDockableOnLeft, DockingLocationConstants.igDockOnLeft, |
|
223 |
DialogBarStyleConstants.igDialogBarStyleShowCaption | DialogBarStyleConstants.igDialogBarStyleStretchToFitHorizontal | DialogBarStyleConstants.igDialogBarStyleStretchToFitVertical | DialogBarStyleConstants.igDialogBarStyleNoBorder, 0, 0); |
|
224 |
//DialogbarControl dialogBarControl_UserControl = dlgBar.Controls.AddManaged(wrapperDllPath, "SPPIDConverter_AutoModeling.MainControl", 733, 900); |
|
225 |
DialogbarControl dialogBarControl_UserControl = dlgBar.Controls.AddManaged(autoModelingDllPath, "Converter.SPPID.MainWrapper", 0, 0); |
|
226 |
dynamic userControl = dialogBarControl_UserControl.ControlDispatch; |
|
227 |
userControl.ShowDialog(); |
|
228 |
//Control control = userControl as Control; |
|
229 |
} |
|
230 |
catch (Exception ex) |
|
231 |
{ |
|
232 |
|
|
233 |
} |
|
234 |
#endregion |
|
235 |
|
|
236 |
|
|
210 |
commandControl.Application.RADApplication.RunManagedMacro(autoModelingDllPath, "Converter.SPPID.SPPIDConverter_AutoModeling"); |
|
237 | 211 |
} |
238 | 212 |
} |
239 | 213 |
else |
내보내기 Unified diff