프로젝트

일반

사용자정보

개정판 ecf30b64

IDecf30b643bb485ffa86fd0e47241b29533ffc583
상위 98385a10
하위 21bb0035, ea54adc8

gaqhf 이(가) 약 5년 전에 추가함

dev issue #507 : remove drawing size

Change-Id: I056833efd242a005dcfd8a067918c8023291f0fe

차이점 보기:

DTI_PID/SPPIDConverter/App.config
24 24
      <setting name="ProjectPath" serializeAs="String">
25 25
        <value />
26 26
      </setting>
27
      <setting name="DrawingX" serializeAs="String">
28
        <value>0</value>
29
      </setting>
30
      <setting name="DrawingY" serializeAs="String">
31
        <value>0</value>
32
      </setting>
33 27
      <setting name="DefaultTemplate" serializeAs="String">
34 28
        <value />
35 29
      </setting>
DTI_PID/SPPIDConverter/AutoModeling.cs
1075 1075
                        drawingAttributeDT.Dispose();
1076 1076
                    }
1077 1077

  
1078
#if DEBUG
1079
                    foreach (LMAAttribute attribute1 in drawing.Attributes)
1080
                    {
1081
                        string name = attribute1.Name;
1082
                        object value = attribute1.get_Value();
1083
                    }
1084
#endif
1085

  
1078 1086
                    ReleaseCOMObjects(drawing);
1079 1087
                }
1080 1088

  
......
1170 1178
        /// <returns></returns>
1171 1179
        private bool DocumentCoordinateCorrection()
1172 1180
        {
1173
            if (Settings.Default.DrawingX != 0 && Settings.Default.DrawingY != 0)
1181
            if (radApp.ActiveDocument.ActiveSheet.SmartFrames2d.Count > 0)
1174 1182
            {
1175
                Log.Write("Setting Drawing X, Drawing Y");
1176
                document.SetSPPIDLocation(Settings.Default.DrawingX, Settings.Default.DrawingY);
1177
                Log.Write("Start coordinate correction");
1183
                double x = 0;
1184
                double y = 0;
1185
                foreach (Ingr.RAD2D.SmartFrame2d smartFrame in radApp.ActiveDocument.ActiveSheet.SmartFrames2d)
1186
                {
1187
                    x = Math.Max(smartFrame.CropRight, x);
1188
                    y = Math.Max(smartFrame.CropTop, y);
1189
                }
1190
                document.SetSPPIDLocation(x, y);
1178 1191
                document.CoordinateCorrection();
1179 1192
                return true;
1180 1193
            }
1181 1194
            else
1182 1195
            {
1183
                Log.Write("Need Drawing X, Y");
1196
                Log.Write("Need Border!");
1184 1197
                return false;
1185 1198
            }
1186 1199
        }
DTI_PID/SPPIDConverter/ConverterDocking.Designer.cs
40 40
            this.btnSymmetry = new DevExpress.XtraEditors.SimpleButton();
41 41
            this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
42 42
            this.btnLinkOPC = new DevExpress.XtraEditors.SimpleButton();
43
            this.btnGetDrawingSize = new DevExpress.XtraEditors.SimpleButton();
44
            this.textEditDrawingY = new DevExpress.XtraEditors.TextEdit();
45
            this.textEditDrawingX = new DevExpress.XtraEditors.TextEdit();
46 43
            this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
47 44
            this.btnSPPIDConverter = new DevExpress.XtraEditors.SimpleButton();
48 45
            this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
49 46
            this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
50 47
            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
51
            this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
52
            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
53
            this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
54
            this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
55 48
            this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
56 49
            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
57 50
            this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
......
73 66
            ((System.ComponentModel.ISupportInitialize)(this.toggleSwitchSnapGrid.Properties)).BeginInit();
74 67
            ((System.ComponentModel.ISupportInitialize)(this.toggleSwitchMoveSymbol.Properties)).BeginInit();
75 68
            ((System.ComponentModel.ISupportInitialize)(this.spinEditSymmetry.Properties)).BeginInit();
76
            ((System.ComponentModel.ISupportInitialize)(this.textEditDrawingY.Properties)).BeginInit();
77
            ((System.ComponentModel.ISupportInitialize)(this.textEditDrawingX.Properties)).BeginInit();
78 69
            ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
79 70
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
80 71
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
81
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
82
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
83
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
84
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
85 72
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
86 73
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
87 74
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
......
113 100
            this.layoutControl1.Controls.Add(this.btnSymmetry);
114 101
            this.layoutControl1.Controls.Add(this.labelControl1);
115 102
            this.layoutControl1.Controls.Add(this.btnLinkOPC);
116
            this.layoutControl1.Controls.Add(this.btnGetDrawingSize);
117
            this.layoutControl1.Controls.Add(this.textEditDrawingY);
118
            this.layoutControl1.Controls.Add(this.textEditDrawingX);
119 103
            this.layoutControl1.Controls.Add(this.simpleButton1);
120 104
            this.layoutControl1.Controls.Add(this.btnSPPIDConverter);
121 105
            this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
......
128 112
            // 
129 113
            // toggleSwitchSnapGrid
130 114
            // 
131
            this.toggleSwitchSnapGrid.Location = new System.Drawing.Point(36, 490);
115
            this.toggleSwitchSnapGrid.Location = new System.Drawing.Point(36, 371);
132 116
            this.toggleSwitchSnapGrid.Name = "toggleSwitchSnapGrid";
133 117
            this.toggleSwitchSnapGrid.Properties.OffText = "Off";
134 118
            this.toggleSwitchSnapGrid.Properties.OnText = "On";
......
139 123
            // 
140 124
            // labelControl2
141 125
            // 
142
            this.labelControl2.Location = new System.Drawing.Point(36, 558);
126
            this.labelControl2.Location = new System.Drawing.Point(36, 439);
143 127
            this.labelControl2.Name = "labelControl2";
144 128
            this.labelControl2.Size = new System.Drawing.Size(106, 14);
145 129
            this.labelControl2.StyleController = this.layoutControl1;
......
148 132
            // 
149 133
            // toggleSwitchMoveSymbol
150 134
            // 
151
            this.toggleSwitchMoveSymbol.Location = new System.Drawing.Point(36, 576);
135
            this.toggleSwitchMoveSymbol.Location = new System.Drawing.Point(36, 457);
152 136
            this.toggleSwitchMoveSymbol.Name = "toggleSwitchMoveSymbol";
153 137
            this.toggleSwitchMoveSymbol.Properties.OffText = "Off";
154 138
            this.toggleSwitchMoveSymbol.Properties.OnText = "On";
......
160 144
            // btnSpecBreakRelocation
161 145
            // 
162 146
            this.btnSpecBreakRelocation.ImageOptions.SvgImage = global::Converter.SPPID.Properties.Resources.newrecurringappointment;
163
            this.btnSpecBreakRelocation.Location = new System.Drawing.Point(24, 354);
147
            this.btnSpecBreakRelocation.Location = new System.Drawing.Point(24, 235);
164 148
            this.btnSpecBreakRelocation.Name = "btnSpecBreakRelocation";
165 149
            this.btnSpecBreakRelocation.Size = new System.Drawing.Size(202, 36);
166 150
            this.btnSpecBreakRelocation.StyleController = this.layoutControl1;
......
175 159
            0,
176 160
            0,
177 161
            0});
178
            this.spinEditSymmetry.Location = new System.Drawing.Point(119, 289);
162
            this.spinEditSymmetry.Location = new System.Drawing.Point(119, 170);
179 163
            this.spinEditSymmetry.Name = "spinEditSymmetry";
180 164
            this.spinEditSymmetry.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
181 165
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
......
196 180
            // btnSymmetry
197 181
            // 
198 182
            this.btnSymmetry.ImageOptions.SvgImage = global::Converter.SPPID.Properties.Resources.productquickcomparisons;
199
            this.btnSymmetry.Location = new System.Drawing.Point(24, 313);
183
            this.btnSymmetry.Location = new System.Drawing.Point(24, 194);
200 184
            this.btnSymmetry.Name = "btnSymmetry";
201 185
            this.btnSymmetry.Size = new System.Drawing.Size(202, 36);
202 186
            this.btnSymmetry.StyleController = this.layoutControl1;
......
206 190
            // 
207 191
            // labelControl1
208 192
            // 
209
            this.labelControl1.Location = new System.Drawing.Point(36, 472);
193
            this.labelControl1.Location = new System.Drawing.Point(36, 353);
210 194
            this.labelControl1.Name = "labelControl1";
211 195
            this.labelControl1.Size = new System.Drawing.Size(81, 14);
212 196
            this.labelControl1.StyleController = this.layoutControl1;
......
224 208
            this.btnLinkOPC.Text = "Link OPC";
225 209
            this.btnLinkOPC.Click += new System.EventHandler(this.btnLinkOPC_Click);
226 210
            // 
227
            // btnGetDrawingSize
228
            // 
229
            this.btnGetDrawingSize.Location = new System.Drawing.Point(24, 170);
230
            this.btnGetDrawingSize.Name = "btnGetDrawingSize";
231
            this.btnGetDrawingSize.Size = new System.Drawing.Size(202, 22);
232
            this.btnGetDrawingSize.StyleController = this.layoutControl1;
233
            this.btnGetDrawingSize.TabIndex = 8;
234
            this.btnGetDrawingSize.Text = "Get Drawing Size";
235
            this.btnGetDrawingSize.Click += new System.EventHandler(this.btnGetDrawingSize_Click);
236
            // 
237
            // textEditDrawingY
238
            // 
239
            this.textEditDrawingY.Location = new System.Drawing.Point(44, 220);
240
            this.textEditDrawingY.Name = "textEditDrawingY";
241
            this.textEditDrawingY.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
242
            this.textEditDrawingY.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
243
            this.textEditDrawingY.Properties.ReadOnly = true;
244
            this.textEditDrawingY.Size = new System.Drawing.Size(182, 20);
245
            this.textEditDrawingY.StyleController = this.layoutControl1;
246
            this.textEditDrawingY.TabIndex = 7;
247
            // 
248
            // textEditDrawingX
249
            // 
250
            this.textEditDrawingX.Location = new System.Drawing.Point(44, 196);
251
            this.textEditDrawingX.Name = "textEditDrawingX";
252
            this.textEditDrawingX.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
253
            this.textEditDrawingX.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
254
            this.textEditDrawingX.Properties.ReadOnly = true;
255
            this.textEditDrawingX.Size = new System.Drawing.Size(182, 20);
256
            this.textEditDrawingX.StyleController = this.layoutControl1;
257
            this.textEditDrawingX.TabIndex = 6;
258
            // 
259 211
            // simpleButton1
260 212
            // 
261
            this.simpleButton1.Location = new System.Drawing.Point(12, 623);
213
            this.simpleButton1.Location = new System.Drawing.Point(12, 504);
262 214
            this.simpleButton1.Name = "simpleButton1";
263 215
            this.simpleButton1.Size = new System.Drawing.Size(226, 22);
264 216
            this.simpleButton1.StyleController = this.layoutControl1;
......
284 236
            this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
285 237
            this.emptySpaceItem1,
286 238
            this.layoutControlItem2,
287
            this.layoutControlGroup1,
288 239
            this.layoutControlGroup2,
289 240
            this.layoutControlGroup3,
290 241
            this.layoutControlGroup4});
......
295 246
            // emptySpaceItem1
296 247
            // 
297 248
            this.emptySpaceItem1.AllowHotTrack = false;
298
            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 637);
249
            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 518);
299 250
            this.emptySpaceItem1.Name = "emptySpaceItem1";
300
            this.emptySpaceItem1.Size = new System.Drawing.Size(230, 87);
251
            this.emptySpaceItem1.Size = new System.Drawing.Size(230, 206);
301 252
            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
302 253
            // 
303 254
            // layoutControlItem2
304 255
            // 
305 256
            this.layoutControlItem2.Control = this.simpleButton1;
306
            this.layoutControlItem2.Location = new System.Drawing.Point(0, 611);
257
            this.layoutControlItem2.Location = new System.Drawing.Point(0, 492);
307 258
            this.layoutControlItem2.Name = "layoutControlItem2";
308 259
            this.layoutControlItem2.Size = new System.Drawing.Size(230, 26);
309 260
            this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
310 261
            this.layoutControlItem2.TextVisible = false;
311 262
            this.layoutControlItem2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.OnlyInCustomization;
312 263
            // 
313
            // layoutControlGroup1
314
            // 
315
            this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
316
            this.layoutControlItem3,
317
            this.layoutControlItem4,
318
            this.layoutControlItem5});
319
            this.layoutControlGroup1.Location = new System.Drawing.Point(0, 125);
320
            this.layoutControlGroup1.Name = "layoutControlGroup1";
321
            this.layoutControlGroup1.Size = new System.Drawing.Size(230, 119);
322
            this.layoutControlGroup1.Text = "Drawing Size Setting";
323
            // 
324
            // layoutControlItem3
325
            // 
326
            this.layoutControlItem3.Control = this.textEditDrawingX;
327
            this.layoutControlItem3.Location = new System.Drawing.Point(0, 26);
328
            this.layoutControlItem3.Name = "layoutControlItem3";
329
            this.layoutControlItem3.Size = new System.Drawing.Size(206, 24);
330
            this.layoutControlItem3.Text = "X";
331
            this.layoutControlItem3.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
332
            this.layoutControlItem3.TextSize = new System.Drawing.Size(15, 14);
333
            this.layoutControlItem3.TextToControlDistance = 5;
334
            // 
335
            // layoutControlItem4
336
            // 
337
            this.layoutControlItem4.Control = this.textEditDrawingY;
338
            this.layoutControlItem4.Location = new System.Drawing.Point(0, 50);
339
            this.layoutControlItem4.Name = "layoutControlItem4";
340
            this.layoutControlItem4.Size = new System.Drawing.Size(206, 24);
341
            this.layoutControlItem4.Text = "Y";
342
            this.layoutControlItem4.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize;
343
            this.layoutControlItem4.TextSize = new System.Drawing.Size(15, 14);
344
            this.layoutControlItem4.TextToControlDistance = 5;
345
            // 
346
            // layoutControlItem5
347
            // 
348
            this.layoutControlItem5.Control = this.btnGetDrawingSize;
349
            this.layoutControlItem5.Location = new System.Drawing.Point(0, 0);
350
            this.layoutControlItem5.Name = "layoutControlItem5";
351
            this.layoutControlItem5.Size = new System.Drawing.Size(206, 26);
352
            this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
353
            this.layoutControlItem5.TextVisible = false;
354
            // 
355 264
            // layoutControlGroup2
356 265
            // 
357 266
            this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
......
387 296
            this.layoutControlItem9,
388 297
            this.layoutControlItem10,
389 298
            this.simpleSeparator1});
390
            this.layoutControlGroup3.Location = new System.Drawing.Point(0, 244);
299
            this.layoutControlGroup3.Location = new System.Drawing.Point(0, 125);
391 300
            this.layoutControlGroup3.Name = "layoutControlGroup3";
392 301
            this.layoutControlGroup3.Size = new System.Drawing.Size(230, 150);
393 302
            this.layoutControlGroup3.Text = "SPPID Utils";
......
431 340
            this.layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
432 341
            this.layoutControlGroup5,
433 342
            this.layoutControlGroup6});
434
            this.layoutControlGroup4.Location = new System.Drawing.Point(0, 394);
343
            this.layoutControlGroup4.Location = new System.Drawing.Point(0, 275);
435 344
            this.layoutControlGroup4.Name = "layoutControlGroup4";
436 345
            this.layoutControlGroup4.Size = new System.Drawing.Size(230, 217);
437 346
            this.layoutControlGroup4.Text = "Keyboard Shortcut";
......
510 419
            ((System.ComponentModel.ISupportInitialize)(this.toggleSwitchSnapGrid.Properties)).EndInit();
511 420
            ((System.ComponentModel.ISupportInitialize)(this.toggleSwitchMoveSymbol.Properties)).EndInit();
512 421
            ((System.ComponentModel.ISupportInitialize)(this.spinEditSymmetry.Properties)).EndInit();
513
            ((System.ComponentModel.ISupportInitialize)(this.textEditDrawingY.Properties)).EndInit();
514
            ((System.ComponentModel.ISupportInitialize)(this.textEditDrawingX.Properties)).EndInit();
515 422
            ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
516 423
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
517 424
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
518
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
519
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
520
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
521
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
522 425
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
523 426
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
524 427
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
......
548 451
        public DevExpress.XtraEditors.SimpleButton simpleButton1;
549 452
        public DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
550 453
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
551
        private DevExpress.XtraEditors.TextEdit textEditDrawingY;
552
        private DevExpress.XtraEditors.TextEdit textEditDrawingX;
553
        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
554
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
555
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
556 454
        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2;
557
        private DevExpress.XtraEditors.SimpleButton btnGetDrawingSize;
558
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
559 455
        private DevExpress.XtraEditors.SimpleButton btnLinkOPC;
560 456
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
561 457
        private DevExpress.XtraEditors.LabelControl labelControl1;
DTI_PID/SPPIDConverter/ConverterDocking.cs
30 30
    public partial class ConverterDocking : UserControl
31 31
    {
32 32
        Ingr.RAD2D.Application application;
33
        static bool addEvent = false;
33
        internal static bool addEvent = false;
34 34
        public ConverterDocking()
35 35
        {
36 36
            InitializeComponent();
......
43 43
            dApplication = null;
44 44
            try
45 45
            {
46
                textEditDrawingX.EditValue = Settings.Default.DrawingX;
47
                textEditDrawingY.EditValue = Settings.Default.DrawingY;
48

  
49 46
                Project_Info _ProjectInfo = Project_Info.GetInstance();
50 47
                _ProjectInfo.DefaultPath = Settings.Default.ProjectPath;
51 48
                _ProjectInfo.DBType = (ID2DB_Type)Settings.Default.ProjectDBType;
......
213 210
            }
214 211
        }
215 212

  
216
        private void btnGetDrawingSize_Click(object sender, EventArgs e)
217
        {
218
            dynamic application = Interaction.GetObject("", "PIDAutomation.Application");
219
            WrapperApplication wApp = new WrapperApplication(application.Application);
220
            Ingr.RAD2D.Application radApp = wApp.RADApplication;
221

  
222
            if (radApp.ActiveSelectSet.Count > 0)
223
            {
224
                DependencyObject line2D = radApp.ActiveSelectSet[0] as DependencyObject;
225
                if (line2D != null)
226
                {
227
                    double minX = 0;
228
                    double minY = 0;
229
                    double maxX = 0;
230
                    double maxY = 0;
231
                    line2D.Range(out minX, out minY, out maxX, out maxY);
232

  
233
                    Settings.Default.DrawingX = maxX - minX;
234
                    Settings.Default.DrawingY = maxY - minY;
235
                    Settings.Default.Save();
236

  
237
                    textEditDrawingX.EditValue = Settings.Default.DrawingX;
238
                    textEditDrawingY.EditValue = Settings.Default.DrawingY;
239
                }
240
                else
241
                    MessageBox.Show(Msg.SelectLine, Msg.Warning, MessageBoxButtons.OK, MessageBoxIcon.Warning);
242
            }
243
            else
244
                MessageBox.Show(Msg.SelectLine, Msg.Warning, MessageBoxButtons.OK, MessageBoxIcon.Warning);
245
        }
246

  
247 213
        #region SPPID Utils
248 214

  
249 215
        #region Symmetry
......
1483 1449
            //string a = "0A509911F33441A2AF088BFBA78B770D";
1484 1450
            //LMLabelPersist label = dataSource.GetLabelPersist(a);
1485 1451
            //label.set_XCoordinate(0.4);
1486

  
1487
            Symbol2d symbol = application.ActiveSelectSet[0] as Symbol2d;
1488
            double minX = double.MaxValue;
1489
            int index = 0;
1490
            bool start = false;
1491
            Line2d tar = null;
1492
            double rx1 = 0, ry1 = 0, rx2 = 0, ry2 = 0;
1493
            if (symbol != null)
1452
            
1453
            foreach (AttributeSet attributes in application.ActiveDocument.AttributeSets)
1494 1454
            {
1495
                for (int i = 0; i < symbol.DrawingObjects.Count; i++)
1455
                foreach (Ingr.RAD2D.Attribute attribute in attributes)
1496 1456
                {
1497
                    DrawingObjectBase drawingObj = symbol.DrawingObjects[i];
1498

  
1499
                    if (drawingObj.GetType() == typeof(Line2d))
1500
                    {
1501
                        Line2d line = drawingObj as Line2d;
1502
                        double x1, y1, x2, y2;
1503
                        line.GetStartPoint(out x1, out y1);
1504
                        line.GetEndPoint(out x2, out y2);
1505
                        if (x1 < minX)
1506
                        {
1507
                            minX = x1;
1508
                            index = i;
1509
                            start = true;
1510
                            tar = line;
1511

  
1512
                            rx1 = x1;
1513
                            rx2 = x2;
1514
                            ry1 = y1;
1515
                            ry2 = y2;
1516
                        }
1517

  
1518
                        if (x2 < minX)
1519
                        {
1520
                            minX = x2;
1521
                            index = i;
1522
                            start = false;
1523
                            tar = line;
1524

  
1525
                            rx1 = x1;
1526
                            rx2 = x2;
1527
                            ry1 = y1;
1528
                            ry2 = y2;
1529
                        }
1530
                    }
1457
                    string name = attribute.Name;
1458
                    object value = attribute.GetValue();
1459
                    
1531 1460
                }
1532 1461
            }
1533

  
1534
            if (start)
1535
            {
1536
                symbol.Symbol2dParameters[0].Value = 0.02;
1537
                //Ingr.RAD2D.Group group = symbol.Convert();
1538
                //group.
1539
            }
1540
            else
1541
            {
1542

  
1543
            }
1544 1462
        }
1545 1463

  
1546 1464
        private void AutoJoinPipeRun()
DTI_PID/SPPIDConverter/Properties/Settings.Designer.cs
12 12
    
13 13
    
14 14
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
15
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
16 16
    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 17
        
18 18
        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
......
37 37
        
38 38
        [global::System.Configuration.UserScopedSettingAttribute()]
39 39
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40
        [global::System.Configuration.DefaultSettingValueAttribute("0")]
41
        public double DrawingX {
42
            get {
43
                return ((double)(this["DrawingX"]));
44
            }
45
            set {
46
                this["DrawingX"] = value;
47
            }
48
        }
49
        
50
        [global::System.Configuration.UserScopedSettingAttribute()]
51
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
52
        [global::System.Configuration.DefaultSettingValueAttribute("0")]
53
        public double DrawingY {
54
            get {
55
                return ((double)(this["DrawingY"]));
56
            }
57
            set {
58
                this["DrawingY"] = value;
59
            }
60
        }
61
        
62
        [global::System.Configuration.UserScopedSettingAttribute()]
63
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
64 40
        [global::System.Configuration.DefaultSettingValueAttribute("")]
65 41
        public string DefaultTemplate {
66 42
            get {
DTI_PID/SPPIDConverter/Properties/Settings.settings
5 5
    <Setting Name="ProjectPath" Type="System.String" Scope="User">
6 6
      <Value Profile="(Default)" />
7 7
    </Setting>
8
    <Setting Name="DrawingX" Type="System.Double" Scope="User">
9
      <Value Profile="(Default)">0</Value>
10
    </Setting>
11
    <Setting Name="DrawingY" Type="System.Double" Scope="User">
12
      <Value Profile="(Default)">0</Value>
13
    </Setting>
14 8
    <Setting Name="DefaultTemplate" Type="System.String" Scope="User">
15 9
      <Value Profile="(Default)" />
16 10
    </Setting>

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)