개정판 27e624cd
dev issue #503 : fix drawing size
Change-Id: I35d2e3652fb1d5a588703e87cfac1cadfa72ca7f
DTI_PID/SPPIDConverter/ConverterDocking.cs | ||
---|---|---|
43 | 43 |
dApplication = null; |
44 | 44 |
try |
45 | 45 |
{ |
46 |
textEditDrawingX.EditValue = Settings.Default.DrawingX; |
|
47 |
textEditDrawingY.EditValue = Settings.Default.DrawingY; |
|
48 |
|
|
46 | 49 |
Project_Info _ProjectInfo = Project_Info.GetInstance(); |
47 | 50 |
_ProjectInfo.DefaultPath = Settings.Default.ProjectPath; |
48 | 51 |
_ProjectInfo.DBType = (ID2DB_Type)Settings.Default.ProjectDBType; |
... | ... | |
2800 | 2803 |
application.ActiveWindow.ZoomArea2(x - 0.01, y - 0.01, x + 0.01, y + 0.01, null); |
2801 | 2804 |
Thread.Sleep(milliseconds); |
2802 | 2805 |
} |
2806 |
|
|
2803 | 2807 |
#endregion |
2804 | 2808 |
|
2805 |
|
|
2809 |
private void btnGetDrawingSize_Click(object sender, EventArgs e) |
|
2810 |
{ |
|
2811 |
dynamic application = Interaction.GetObject("", "PIDAutomation.Application"); |
|
2812 |
WrapperApplication wApp = new WrapperApplication(application.Application); |
|
2813 |
Ingr.RAD2D.Application radApp = wApp.RADApplication; |
|
2814 |
|
|
2815 |
if (radApp.ActiveSelectSet.Count > 0) |
|
2816 |
{ |
|
2817 |
DependencyObject line2D = radApp.ActiveSelectSet[0] as DependencyObject; |
|
2818 |
if (line2D != null) |
|
2819 |
{ |
|
2820 |
double minX = 0; |
|
2821 |
double minY = 0; |
|
2822 |
double maxX = 0; |
|
2823 |
double maxY = 0; |
|
2824 |
line2D.Range(out minX, out minY, out maxX, out maxY); |
|
2825 |
|
|
2826 |
Settings.Default.DrawingX = maxX - minX; |
|
2827 |
Settings.Default.DrawingY = maxY - minY; |
|
2828 |
Settings.Default.Save(); |
|
2829 |
|
|
2830 |
textEditDrawingX.EditValue = Settings.Default.DrawingX; |
|
2831 |
textEditDrawingY.EditValue = Settings.Default.DrawingY; |
|
2832 |
} |
|
2833 |
else |
|
2834 |
MessageBox.Show(Msg.SelectLine, Msg.Warning, MessageBoxButtons.OK, MessageBoxIcon.Warning); |
|
2835 |
} |
|
2836 |
else |
|
2837 |
MessageBox.Show(Msg.SelectLine, Msg.Warning, MessageBoxButtons.OK, MessageBoxIcon.Warning); |
|
2838 |
} |
|
2806 | 2839 |
} |
2807 | 2840 |
} |
내보내기 Unified diff