프로젝트

일반

사용자정보

개정판 9fcc54bb

ID9fcc54bb4edadc8b8faab5810e9d31774a5822d1
상위 b53b591f
하위 434eb5c7

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

dev issue #507 : samsung test source

Change-Id: I5706ec798ada240db3e4a9fed4b699fa2d64e63a

차이점 보기:

DTI_PID/SPPIDConverter/ConverterDocking.Designer.cs
32 32
            DevExpress.XtraSplashScreen.SplashScreenManager splashScreenManager = new DevExpress.XtraSplashScreen.SplashScreenManager(this, null, true, true, typeof(System.Windows.Forms.UserControl));
33 33
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConverterDocking));
34 34
            this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
35
            this.btnSegmentBreak = new DevExpress.XtraEditors.SimpleButton();
36
            this.btnPipeRunBreak = new DevExpress.XtraEditors.SimpleButton();
37
            this.btnCreateStreamBreak = new DevExpress.XtraEditors.SimpleButton();
38
            this.btnOPC = new DevExpress.XtraEditors.SimpleButton();
39
            this.textEdit2 = new DevExpress.XtraEditors.TextEdit();
40
            this.textEdit1 = new DevExpress.XtraEditors.TextEdit();
41
            this.btnLinkOPCTest = new DevExpress.XtraEditors.SimpleButton();
35 42
            this.toggleSwitchSnapGrid = new DevExpress.XtraEditors.ToggleSwitch();
36 43
            this.labelControl2 = new DevExpress.XtraEditors.LabelControl();
37 44
            this.toggleSwitchMoveSymbol = new DevExpress.XtraEditors.ToggleSwitch();
......
45 52
            this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
46 53
            this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
47 54
            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
48
            this.layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup();
55
            this.layoutControlGroupConverter = new DevExpress.XtraLayout.LayoutControlGroup();
49 56
            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
50 57
            this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
51
            this.layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup();
58
            this.layoutControlGroupUtils = new DevExpress.XtraLayout.LayoutControlGroup();
52 59
            this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
53 60
            this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
54 61
            this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
55 62
            this.simpleSeparator1 = new DevExpress.XtraLayout.SimpleSeparator();
56
            this.layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup();
63
            this.layoutControlGroupShortCut = new DevExpress.XtraLayout.LayoutControlGroup();
57 64
            this.layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup();
58 65
            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
59 66
            this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
60 67
            this.layoutControlGroup6 = new DevExpress.XtraLayout.LayoutControlGroup();
61 68
            this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
62 69
            this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
63
            this.defaultLookAndFeel = new DevExpress.LookAndFeel.DefaultLookAndFeel(this.components);
64
            this.btnLinkOPCTest = new DevExpress.XtraEditors.SimpleButton();
65 70
            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
71
            this.layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem();
72
            this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem();
73
            this.layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem();
74
            this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
75
            this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
76
            this.layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem();
77
            this.defaultLookAndFeel = new DevExpress.LookAndFeel.DefaultLookAndFeel(this.components);
78
            this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup();
66 79
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
67 80
            this.layoutControl1.SuspendLayout();
81
            ((System.ComponentModel.ISupportInitialize)(this.textEdit2.Properties)).BeginInit();
82
            ((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).BeginInit();
68 83
            ((System.ComponentModel.ISupportInitialize)(this.toggleSwitchSnapGrid.Properties)).BeginInit();
69 84
            ((System.ComponentModel.ISupportInitialize)(this.toggleSwitchMoveSymbol.Properties)).BeginInit();
70 85
            ((System.ComponentModel.ISupportInitialize)(this.spinEditSymmetry.Properties)).BeginInit();
71 86
            ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
72 87
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
73 88
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
74
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).BeginInit();
89
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroupConverter)).BeginInit();
75 90
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
76 91
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
77
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).BeginInit();
92
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroupUtils)).BeginInit();
78 93
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
79 94
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
80 95
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
81 96
            ((System.ComponentModel.ISupportInitialize)(this.simpleSeparator1)).BeginInit();
82
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).BeginInit();
97
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroupShortCut)).BeginInit();
83 98
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup5)).BeginInit();
84 99
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
85 100
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
......
87 102
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
88 103
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
89 104
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
105
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).BeginInit();
106
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit();
107
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).BeginInit();
108
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
109
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
110
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).BeginInit();
111
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit();
90 112
            this.SuspendLayout();
91 113
            // 
92 114
            // splashScreenManager
......
95 117
            // 
96 118
            // layoutControl1
97 119
            // 
120
            this.layoutControl1.Controls.Add(this.btnSegmentBreak);
121
            this.layoutControl1.Controls.Add(this.btnPipeRunBreak);
122
            this.layoutControl1.Controls.Add(this.btnCreateStreamBreak);
123
            this.layoutControl1.Controls.Add(this.btnOPC);
124
            this.layoutControl1.Controls.Add(this.textEdit2);
125
            this.layoutControl1.Controls.Add(this.textEdit1);
98 126
            this.layoutControl1.Controls.Add(this.btnLinkOPCTest);
99 127
            this.layoutControl1.Controls.Add(this.toggleSwitchSnapGrid);
100 128
            this.layoutControl1.Controls.Add(this.labelControl2);
......
114 142
            this.layoutControl1.TabIndex = 0;
115 143
            this.layoutControl1.Text = "layoutControl1";
116 144
            // 
145
            // btnSegmentBreak
146
            // 
147
            this.btnSegmentBreak.Location = new System.Drawing.Point(24, 662);
148
            this.btnSegmentBreak.Name = "btnSegmentBreak";
149
            this.btnSegmentBreak.Size = new System.Drawing.Size(185, 22);
150
            this.btnSegmentBreak.StyleController = this.layoutControl1;
151
            this.btnSegmentBreak.TabIndex = 24;
152
            this.btnSegmentBreak.Text = "Segment Break 자동 생성";
153
            this.btnSegmentBreak.Click += new System.EventHandler(this.btnSegmentBreak_Click);
154
            // 
155
            // btnPipeRunBreak
156
            // 
157
            this.btnPipeRunBreak.Location = new System.Drawing.Point(24, 688);
158
            this.btnPipeRunBreak.Name = "btnPipeRunBreak";
159
            this.btnPipeRunBreak.Size = new System.Drawing.Size(185, 22);
160
            this.btnPipeRunBreak.StyleController = this.layoutControl1;
161
            this.btnPipeRunBreak.TabIndex = 23;
162
            this.btnPipeRunBreak.Text = "Pipe Run Break 자동 생성";
163
            this.btnPipeRunBreak.Click += new System.EventHandler(this.btnPipeRunBreak_Click);
164
            // 
165
            // btnCreateStreamBreak
166
            // 
167
            this.btnCreateStreamBreak.Location = new System.Drawing.Point(24, 588);
168
            this.btnCreateStreamBreak.Name = "btnCreateStreamBreak";
169
            this.btnCreateStreamBreak.Size = new System.Drawing.Size(185, 22);
170
            this.btnCreateStreamBreak.StyleController = this.layoutControl1;
171
            this.btnCreateStreamBreak.TabIndex = 22;
172
            this.btnCreateStreamBreak.Text = "Stream No Break 자동 생성";
173
            this.btnCreateStreamBreak.Click += new System.EventHandler(this.btnCreateStreamBreak_Click);
174
            // 
175
            // btnOPC
176
            // 
177
            this.btnOPC.Location = new System.Drawing.Point(24, 562);
178
            this.btnOPC.Name = "btnOPC";
179
            this.btnOPC.Size = new System.Drawing.Size(185, 22);
180
            this.btnOPC.StyleController = this.layoutControl1;
181
            this.btnOPC.TabIndex = 21;
182
            this.btnOPC.Text = "Flow Direction 자동 부여 by OPC";
183
            this.btnOPC.Click += new System.EventHandler(this.btnOPC_Click);
184
            // 
185
            // textEdit2
186
            // 
187
            this.textEdit2.Location = new System.Drawing.Point(119, 638);
188
            this.textEdit2.Name = "textEdit2";
189
            this.textEdit2.Size = new System.Drawing.Size(90, 20);
190
            this.textEdit2.StyleController = this.layoutControl1;
191
            this.textEdit2.TabIndex = 20;
192
            // 
193
            // textEdit1
194
            // 
195
            this.textEdit1.EditValue = "";
196
            this.textEdit1.Location = new System.Drawing.Point(119, 614);
197
            this.textEdit1.Name = "textEdit1";
198
            this.textEdit1.Size = new System.Drawing.Size(90, 20);
199
            this.textEdit1.StyleController = this.layoutControl1;
200
            this.textEdit1.TabIndex = 19;
201
            // 
202
            // btnLinkOPCTest
203
            // 
204
            this.btnLinkOPCTest.Location = new System.Drawing.Point(24, 510);
205
            this.btnLinkOPCTest.Name = "btnLinkOPCTest";
206
            this.btnLinkOPCTest.Size = new System.Drawing.Size(185, 22);
207
            this.btnLinkOPCTest.StyleController = this.layoutControl1;
208
            this.btnLinkOPCTest.TabIndex = 17;
209
            this.btnLinkOPCTest.Text = "Pair OPC Test";
210
            this.btnLinkOPCTest.Click += new System.EventHandler(this.btnLinkOPCTest_Click);
211
            // 
117 212
            // toggleSwitchSnapGrid
118 213
            // 
119
            this.toggleSwitchSnapGrid.Location = new System.Drawing.Point(36, 371);
214
            this.toggleSwitchSnapGrid.Location = new System.Drawing.Point(36, 344);
120 215
            this.toggleSwitchSnapGrid.Name = "toggleSwitchSnapGrid";
121 216
            this.toggleSwitchSnapGrid.Properties.OffText = "Off";
122 217
            this.toggleSwitchSnapGrid.Properties.OnText = "On";
123
            this.toggleSwitchSnapGrid.Size = new System.Drawing.Size(178, 19);
218
            this.toggleSwitchSnapGrid.Size = new System.Drawing.Size(161, 19);
124 219
            this.toggleSwitchSnapGrid.StyleController = this.layoutControl1;
125 220
            this.toggleSwitchSnapGrid.TabIndex = 16;
126 221
            this.toggleSwitchSnapGrid.Toggled += new System.EventHandler(this.toggleSwitchSnapGrid_Toggled);
127 222
            // 
128 223
            // labelControl2
129 224
            // 
130
            this.labelControl2.Location = new System.Drawing.Point(36, 439);
225
            this.labelControl2.Location = new System.Drawing.Point(36, 412);
131 226
            this.labelControl2.Name = "labelControl2";
132 227
            this.labelControl2.Size = new System.Drawing.Size(106, 14);
133 228
            this.labelControl2.StyleController = this.layoutControl1;
......
136 231
            // 
137 232
            // toggleSwitchMoveSymbol
138 233
            // 
139
            this.toggleSwitchMoveSymbol.Location = new System.Drawing.Point(36, 457);
234
            this.toggleSwitchMoveSymbol.Location = new System.Drawing.Point(36, 430);
140 235
            this.toggleSwitchMoveSymbol.Name = "toggleSwitchMoveSymbol";
141 236
            this.toggleSwitchMoveSymbol.Properties.OffText = "Off";
142 237
            this.toggleSwitchMoveSymbol.Properties.OnText = "On";
143
            this.toggleSwitchMoveSymbol.Size = new System.Drawing.Size(178, 19);
238
            this.toggleSwitchMoveSymbol.Size = new System.Drawing.Size(161, 19);
144 239
            this.toggleSwitchMoveSymbol.StyleController = this.layoutControl1;
145 240
            this.toggleSwitchMoveSymbol.TabIndex = 14;
146 241
            this.toggleSwitchMoveSymbol.Toggled += new System.EventHandler(this.toggleSwitchMoveSymbol_Toggled);
......
148 243
            // btnSpecBreakRelocation
149 244
            // 
150 245
            this.btnSpecBreakRelocation.ImageOptions.SvgImage = global::Converter.SPPID.Properties.Resources.newrecurringappointment;
151
            this.btnSpecBreakRelocation.Location = new System.Drawing.Point(24, 235);
246
            this.btnSpecBreakRelocation.Location = new System.Drawing.Point(24, 208);
152 247
            this.btnSpecBreakRelocation.Name = "btnSpecBreakRelocation";
153
            this.btnSpecBreakRelocation.Size = new System.Drawing.Size(202, 36);
248
            this.btnSpecBreakRelocation.Size = new System.Drawing.Size(185, 36);
154 249
            this.btnSpecBreakRelocation.StyleController = this.layoutControl1;
155 250
            this.btnSpecBreakRelocation.TabIndex = 13;
156 251
            this.btnSpecBreakRelocation.Text = "SpecBreak Relocation";
......
163 258
            0,
164 259
            0,
165 260
            0});
166
            this.spinEditSymmetry.Location = new System.Drawing.Point(119, 170);
261
            this.spinEditSymmetry.Location = new System.Drawing.Point(119, 143);
167 262
            this.spinEditSymmetry.Name = "spinEditSymmetry";
168 263
            this.spinEditSymmetry.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
169 264
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
......
177 272
            0,
178 273
            0,
179 274
            0});
180
            this.spinEditSymmetry.Size = new System.Drawing.Size(107, 20);
275
            this.spinEditSymmetry.Size = new System.Drawing.Size(90, 20);
181 276
            this.spinEditSymmetry.StyleController = this.layoutControl1;
182 277
            this.spinEditSymmetry.TabIndex = 12;
183 278
            // 
184 279
            // btnSymmetry
185 280
            // 
186 281
            this.btnSymmetry.ImageOptions.SvgImage = global::Converter.SPPID.Properties.Resources.productquickcomparisons;
187
            this.btnSymmetry.Location = new System.Drawing.Point(24, 194);
282
            this.btnSymmetry.Location = new System.Drawing.Point(24, 167);
188 283
            this.btnSymmetry.Name = "btnSymmetry";
189
            this.btnSymmetry.Size = new System.Drawing.Size(202, 36);
284
            this.btnSymmetry.Size = new System.Drawing.Size(185, 36);
190 285
            this.btnSymmetry.StyleController = this.layoutControl1;
191 286
            this.btnSymmetry.TabIndex = 11;
192 287
            this.btnSymmetry.Text = "Symbol Symmetry";
......
194 289
            // 
195 290
            // labelControl1
196 291
            // 
197
            this.labelControl1.Location = new System.Drawing.Point(36, 353);
292
            this.labelControl1.Location = new System.Drawing.Point(36, 326);
198 293
            this.labelControl1.Name = "labelControl1";
199 294
            this.labelControl1.Size = new System.Drawing.Size(81, 14);
200 295
            this.labelControl1.StyleController = this.layoutControl1;
......
204 299
            // btnLinkOPC
205 300
            // 
206 301
            this.btnLinkOPC.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnLinkOPC.ImageOptions.SvgImage")));
207
            this.btnLinkOPC.Location = new System.Drawing.Point(24, 85);
302
            this.btnLinkOPC.Location = new System.Drawing.Point(24, 58);
208 303
            this.btnLinkOPC.Name = "btnLinkOPC";
209
            this.btnLinkOPC.Size = new System.Drawing.Size(202, 36);
304
            this.btnLinkOPC.Size = new System.Drawing.Size(185, 36);
210 305
            this.btnLinkOPC.StyleController = this.layoutControl1;
211 306
            this.btnLinkOPC.TabIndex = 9;
212 307
            this.btnLinkOPC.Text = "Link OPC";
......
214 309
            // 
215 310
            // simpleButton1
216 311
            // 
217
            this.simpleButton1.Location = new System.Drawing.Point(12, 530);
312
            this.simpleButton1.Location = new System.Drawing.Point(24, 536);
218 313
            this.simpleButton1.Name = "simpleButton1";
219
            this.simpleButton1.Size = new System.Drawing.Size(226, 22);
314
            this.simpleButton1.Size = new System.Drawing.Size(185, 22);
220 315
            this.simpleButton1.StyleController = this.layoutControl1;
221 316
            this.simpleButton1.TabIndex = 5;
222 317
            this.simpleButton1.Text = "simpleButton1";
......
225 320
            // btnSPPIDConverter
226 321
            // 
227 322
            this.btnSPPIDConverter.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnSPPIDConverter.ImageOptions.SvgImage")));
228
            this.btnSPPIDConverter.Location = new System.Drawing.Point(24, 45);
323
            this.btnSPPIDConverter.Location = new System.Drawing.Point(24, 18);
229 324
            this.btnSPPIDConverter.Name = "btnSPPIDConverter";
230
            this.btnSPPIDConverter.Size = new System.Drawing.Size(202, 36);
325
            this.btnSPPIDConverter.Size = new System.Drawing.Size(185, 36);
231 326
            this.btnSPPIDConverter.StyleController = this.layoutControl1;
232 327
            this.btnSPPIDConverter.TabIndex = 4;
233 328
            this.btnSPPIDConverter.Text = "Open Converter";
......
239 334
            this.Root.GroupBordersVisible = false;
240 335
            this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
241 336
            this.emptySpaceItem1,
242
            this.layoutControlItem2,
243
            this.layoutControlGroup2,
244
            this.layoutControlGroup3,
245
            this.layoutControlGroup4,
246
            this.layoutControlItem3});
337
            this.layoutControlGroupConverter,
338
            this.layoutControlGroupUtils,
339
            this.layoutControlGroupShortCut,
340
            this.layoutControlGroup1});
247 341
            this.Root.Name = "Root";
248
            this.Root.Size = new System.Drawing.Size(250, 744);
342
            this.Root.Size = new System.Drawing.Size(233, 771);
249 343
            this.Root.TextVisible = false;
250 344
            // 
251 345
            // emptySpaceItem1
252 346
            // 
253 347
            this.emptySpaceItem1.AllowHotTrack = false;
254
            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 544);
348
            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 741);
255 349
            this.emptySpaceItem1.Name = "emptySpaceItem1";
256
            this.emptySpaceItem1.Size = new System.Drawing.Size(230, 180);
350
            this.emptySpaceItem1.Size = new System.Drawing.Size(213, 10);
257 351
            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
258 352
            // 
259 353
            // layoutControlItem2
260 354
            // 
261 355
            this.layoutControlItem2.Control = this.simpleButton1;
262
            this.layoutControlItem2.Location = new System.Drawing.Point(0, 518);
356
            this.layoutControlItem2.Location = new System.Drawing.Point(0, 26);
263 357
            this.layoutControlItem2.Name = "layoutControlItem2";
264
            this.layoutControlItem2.Size = new System.Drawing.Size(230, 26);
358
            this.layoutControlItem2.Size = new System.Drawing.Size(189, 26);
265 359
            this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
266 360
            this.layoutControlItem2.TextVisible = false;
267 361
            this.layoutControlItem2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.OnlyInCustomization;
268 362
            // 
269
            // layoutControlGroup2
363
            // layoutControlGroupConverter
270 364
            // 
271
            this.layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
365
            this.layoutControlGroupConverter.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
272 366
            this.layoutControlItem1,
273 367
            this.layoutControlItem6});
274
            this.layoutControlGroup2.Location = new System.Drawing.Point(0, 0);
275
            this.layoutControlGroup2.Name = "layoutControlGroup2";
276
            this.layoutControlGroup2.Size = new System.Drawing.Size(230, 125);
277
            this.layoutControlGroup2.Text = "Converter";
368
            this.layoutControlGroupConverter.Location = new System.Drawing.Point(0, 0);
369
            this.layoutControlGroupConverter.Name = "layoutControlGroupConverter";
370
            this.layoutControlGroupConverter.Size = new System.Drawing.Size(213, 125);
371
            this.layoutControlGroupConverter.Text = "Converter";
278 372
            // 
279 373
            // layoutControlItem1
280 374
            // 
281 375
            this.layoutControlItem1.Control = this.btnSPPIDConverter;
282 376
            this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
283 377
            this.layoutControlItem1.Name = "layoutControlItem1";
284
            this.layoutControlItem1.Size = new System.Drawing.Size(206, 40);
378
            this.layoutControlItem1.Size = new System.Drawing.Size(189, 40);
285 379
            this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
286 380
            this.layoutControlItem1.TextVisible = false;
287 381
            // 
......
290 384
            this.layoutControlItem6.Control = this.btnLinkOPC;
291 385
            this.layoutControlItem6.Location = new System.Drawing.Point(0, 40);
292 386
            this.layoutControlItem6.Name = "layoutControlItem6";
293
            this.layoutControlItem6.Size = new System.Drawing.Size(206, 40);
387
            this.layoutControlItem6.Size = new System.Drawing.Size(189, 40);
294 388
            this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
295 389
            this.layoutControlItem6.TextVisible = false;
296 390
            // 
297
            // layoutControlGroup3
391
            // layoutControlGroupUtils
298 392
            // 
299
            this.layoutControlGroup3.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
393
            this.layoutControlGroupUtils.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
300 394
            this.layoutControlItem8,
301 395
            this.layoutControlItem9,
302 396
            this.layoutControlItem10,
303 397
            this.simpleSeparator1});
304
            this.layoutControlGroup3.Location = new System.Drawing.Point(0, 125);
305
            this.layoutControlGroup3.Name = "layoutControlGroup3";
306
            this.layoutControlGroup3.Size = new System.Drawing.Size(230, 150);
307
            this.layoutControlGroup3.Text = "SPPID Utils";
398
            this.layoutControlGroupUtils.Location = new System.Drawing.Point(0, 125);
399
            this.layoutControlGroupUtils.Name = "layoutControlGroupUtils";
400
            this.layoutControlGroupUtils.Size = new System.Drawing.Size(213, 150);
401
            this.layoutControlGroupUtils.Text = "SPPID Utils";
308 402
            // 
309 403
            // layoutControlItem8
310 404
            // 
311 405
            this.layoutControlItem8.Control = this.btnSymmetry;
312 406
            this.layoutControlItem8.Location = new System.Drawing.Point(0, 24);
313 407
            this.layoutControlItem8.Name = "layoutControlItem8";
314
            this.layoutControlItem8.Size = new System.Drawing.Size(206, 40);
408
            this.layoutControlItem8.Size = new System.Drawing.Size(189, 40);
315 409
            this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0);
316 410
            this.layoutControlItem8.TextVisible = false;
317 411
            // 
......
320 414
            this.layoutControlItem9.Control = this.spinEditSymmetry;
321 415
            this.layoutControlItem9.Location = new System.Drawing.Point(0, 0);
322 416
            this.layoutControlItem9.Name = "layoutControlItem9";
323
            this.layoutControlItem9.Size = new System.Drawing.Size(206, 24);
417
            this.layoutControlItem9.Size = new System.Drawing.Size(189, 24);
324 418
            this.layoutControlItem9.Text = "Symmetry Count";
325 419
            this.layoutControlItem9.TextSize = new System.Drawing.Size(92, 14);
326 420
            // 
......
329 423
            this.layoutControlItem10.Control = this.btnSpecBreakRelocation;
330 424
            this.layoutControlItem10.Location = new System.Drawing.Point(0, 65);
331 425
            this.layoutControlItem10.Name = "layoutControlItem10";
332
            this.layoutControlItem10.Size = new System.Drawing.Size(206, 40);
426
            this.layoutControlItem10.Size = new System.Drawing.Size(189, 40);
333 427
            this.layoutControlItem10.TextSize = new System.Drawing.Size(0, 0);
334 428
            this.layoutControlItem10.TextVisible = false;
335 429
            // 
......
338 432
            this.simpleSeparator1.AllowHotTrack = false;
339 433
            this.simpleSeparator1.Location = new System.Drawing.Point(0, 64);
340 434
            this.simpleSeparator1.Name = "simpleSeparator1";
341
            this.simpleSeparator1.Size = new System.Drawing.Size(206, 1);
435
            this.simpleSeparator1.Size = new System.Drawing.Size(189, 1);
342 436
            // 
343
            // layoutControlGroup4
437
            // layoutControlGroupShortCut
344 438
            // 
345
            this.layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
439
            this.layoutControlGroupShortCut.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
346 440
            this.layoutControlGroup5,
347 441
            this.layoutControlGroup6});
348
            this.layoutControlGroup4.Location = new System.Drawing.Point(0, 275);
349
            this.layoutControlGroup4.Name = "layoutControlGroup4";
350
            this.layoutControlGroup4.Size = new System.Drawing.Size(230, 217);
351
            this.layoutControlGroup4.Text = "Keyboard Shortcut";
442
            this.layoutControlGroupShortCut.Location = new System.Drawing.Point(0, 275);
443
            this.layoutControlGroupShortCut.Name = "layoutControlGroupShortCut";
444
            this.layoutControlGroupShortCut.Size = new System.Drawing.Size(213, 217);
445
            this.layoutControlGroupShortCut.Text = "Keyboard Shortcut";
352 446
            // 
353 447
            // layoutControlGroup5
354 448
            // 
......
358 452
            this.layoutControlItem13});
359 453
            this.layoutControlGroup5.Location = new System.Drawing.Point(0, 0);
360 454
            this.layoutControlGroup5.Name = "layoutControlGroup5";
361
            this.layoutControlGroup5.Size = new System.Drawing.Size(206, 86);
455
            this.layoutControlGroup5.Size = new System.Drawing.Size(189, 86);
362 456
            this.layoutControlGroup5.Text = "Snap Grid";
363 457
            // 
364 458
            // layoutControlItem7
......
366 460
            this.layoutControlItem7.Control = this.labelControl1;
367 461
            this.layoutControlItem7.Location = new System.Drawing.Point(0, 0);
368 462
            this.layoutControlItem7.Name = "layoutControlItem7";
369
            this.layoutControlItem7.Size = new System.Drawing.Size(182, 18);
463
            this.layoutControlItem7.Size = new System.Drawing.Size(165, 18);
370 464
            this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
371 465
            this.layoutControlItem7.TextVisible = false;
372 466
            // 
......
375 469
            this.layoutControlItem13.Control = this.toggleSwitchSnapGrid;
376 470
            this.layoutControlItem13.Location = new System.Drawing.Point(0, 18);
377 471
            this.layoutControlItem13.Name = "layoutControlItem13";
378
            this.layoutControlItem13.Size = new System.Drawing.Size(182, 23);
472
            this.layoutControlItem13.Size = new System.Drawing.Size(165, 23);
379 473
            this.layoutControlItem13.TextSize = new System.Drawing.Size(0, 0);
380 474
            this.layoutControlItem13.TextVisible = false;
381 475
            // 
......
386 480
            this.layoutControlItem11});
387 481
            this.layoutControlGroup6.Location = new System.Drawing.Point(0, 86);
388 482
            this.layoutControlGroup6.Name = "layoutControlGroup6";
389
            this.layoutControlGroup6.Size = new System.Drawing.Size(206, 86);
483
            this.layoutControlGroup6.Size = new System.Drawing.Size(189, 86);
390 484
            this.layoutControlGroup6.Text = "Move Symbol (Selected)";
391 485
            // 
392 486
            // layoutControlItem12
......
394 488
            this.layoutControlItem12.Control = this.labelControl2;
395 489
            this.layoutControlItem12.Location = new System.Drawing.Point(0, 0);
396 490
            this.layoutControlItem12.Name = "layoutControlItem12";
397
            this.layoutControlItem12.Size = new System.Drawing.Size(182, 18);
491
            this.layoutControlItem12.Size = new System.Drawing.Size(165, 18);
398 492
            this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0);
399 493
            this.layoutControlItem12.TextVisible = false;
400 494
            // 
......
403 497
            this.layoutControlItem11.Control = this.toggleSwitchMoveSymbol;
404 498
            this.layoutControlItem11.Location = new System.Drawing.Point(0, 18);
405 499
            this.layoutControlItem11.Name = "layoutControlItem11";
406
            this.layoutControlItem11.Size = new System.Drawing.Size(182, 23);
500
            this.layoutControlItem11.Size = new System.Drawing.Size(165, 23);
407 501
            this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0);
408 502
            this.layoutControlItem11.TextVisible = false;
409 503
            // 
410
            // defaultLookAndFeel
411
            // 
412
            this.defaultLookAndFeel.LookAndFeel.SkinName = "Office 2019 Colorful";
413
            // 
414
            // btnLinkOPCTest
415
            // 
416
            this.btnLinkOPCTest.Location = new System.Drawing.Point(12, 504);
417
            this.btnLinkOPCTest.Name = "btnLinkOPCTest";
418
            this.btnLinkOPCTest.Size = new System.Drawing.Size(226, 22);
419
            this.btnLinkOPCTest.StyleController = this.layoutControl1;
420
            this.btnLinkOPCTest.TabIndex = 17;
421
            this.btnLinkOPCTest.Text = "Pair OPC Test";
422
            this.btnLinkOPCTest.Click += new System.EventHandler(this.btnLinkOPCTest_Click);
423
            // 
424 504
            // layoutControlItem3
425 505
            // 
426 506
            this.layoutControlItem3.Control = this.btnLinkOPCTest;
427
            this.layoutControlItem3.Location = new System.Drawing.Point(0, 492);
507
            this.layoutControlItem3.Location = new System.Drawing.Point(0, 0);
428 508
            this.layoutControlItem3.Name = "layoutControlItem3";
429
            this.layoutControlItem3.Size = new System.Drawing.Size(230, 26);
509
            this.layoutControlItem3.Size = new System.Drawing.Size(189, 26);
430 510
            this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
431 511
            this.layoutControlItem3.TextVisible = false;
432 512
            // 
513
            // layoutControlItem15
514
            // 
515
            this.layoutControlItem15.Control = this.btnOPC;
516
            this.layoutControlItem15.Location = new System.Drawing.Point(0, 52);
517
            this.layoutControlItem15.Name = "layoutControlItem15";
518
            this.layoutControlItem15.Size = new System.Drawing.Size(189, 26);
519
            this.layoutControlItem15.TextSize = new System.Drawing.Size(0, 0);
520
            this.layoutControlItem15.TextVisible = false;
521
            // 
522
            // layoutControlItem16
523
            // 
524
            this.layoutControlItem16.Control = this.btnCreateStreamBreak;
525
            this.layoutControlItem16.Location = new System.Drawing.Point(0, 78);
526
            this.layoutControlItem16.Name = "layoutControlItem16";
527
            this.layoutControlItem16.Size = new System.Drawing.Size(189, 26);
528
            this.layoutControlItem16.TextSize = new System.Drawing.Size(0, 0);
529
            this.layoutControlItem16.TextVisible = false;
530
            // 
531
            // layoutControlItem18
532
            // 
533
            this.layoutControlItem18.Control = this.btnSegmentBreak;
534
            this.layoutControlItem18.Location = new System.Drawing.Point(0, 152);
535
            this.layoutControlItem18.Name = "layoutControlItem18";
536
            this.layoutControlItem18.Size = new System.Drawing.Size(189, 26);
537
            this.layoutControlItem18.TextSize = new System.Drawing.Size(0, 0);
538
            this.layoutControlItem18.TextVisible = false;
539
            // 
540
            // layoutControlItem5
541
            // 
542
            this.layoutControlItem5.Control = this.textEdit1;
543
            this.layoutControlItem5.Location = new System.Drawing.Point(0, 104);
544
            this.layoutControlItem5.Name = "layoutControlItem5";
545
            this.layoutControlItem5.Size = new System.Drawing.Size(189, 24);
546
            this.layoutControlItem5.Text = "From";
547
            this.layoutControlItem5.TextSize = new System.Drawing.Size(92, 14);
548
            // 
549
            // layoutControlItem14
550
            // 
551
            this.layoutControlItem14.Control = this.textEdit2;
552
            this.layoutControlItem14.Location = new System.Drawing.Point(0, 128);
553
            this.layoutControlItem14.Name = "layoutControlItem14";
554
            this.layoutControlItem14.Size = new System.Drawing.Size(189, 24);
555
            this.layoutControlItem14.Text = "To";
556
            this.layoutControlItem14.TextSize = new System.Drawing.Size(92, 14);
557
            // 
558
            // layoutControlItem17
559
            // 
560
            this.layoutControlItem17.Control = this.btnPipeRunBreak;
561
            this.layoutControlItem17.Location = new System.Drawing.Point(0, 178);
562
            this.layoutControlItem17.Name = "layoutControlItem17";
563
            this.layoutControlItem17.Size = new System.Drawing.Size(189, 26);
564
            this.layoutControlItem17.TextSize = new System.Drawing.Size(0, 0);
565
            this.layoutControlItem17.TextVisible = false;
566
            // 
567
            // defaultLookAndFeel
568
            // 
569
            this.defaultLookAndFeel.LookAndFeel.SkinName = "Office 2019 Colorful";
570
            // 
571
            // layoutControlGroup1
572
            // 
573
            this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
574
            this.layoutControlItem3,
575
            this.layoutControlItem2,
576
            this.layoutControlItem15,
577
            this.layoutControlItem16,
578
            this.layoutControlItem5,
579
            this.layoutControlItem14,
580
            this.layoutControlItem18,
581
            this.layoutControlItem17});
582
            this.layoutControlGroup1.Location = new System.Drawing.Point(0, 492);
583
            this.layoutControlGroup1.Name = "layoutControlGroup1";
584
            this.layoutControlGroup1.Size = new System.Drawing.Size(213, 249);
585
            this.layoutControlGroup1.Text = "Test Source";
586
            // 
433 587
            // ConverterDocking
434 588
            // 
435 589
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
......
437 591
            this.Controls.Add(this.layoutControl1);
438 592
            this.Name = "ConverterDocking";
439 593
            this.Size = new System.Drawing.Size(250, 744);
440
            this.Load += new System.EventHandler(this.ConverterDocking_Load);
441 594
            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
442 595
            this.layoutControl1.ResumeLayout(false);
596
            ((System.ComponentModel.ISupportInitialize)(this.textEdit2.Properties)).EndInit();
597
            ((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).EndInit();
443 598
            ((System.ComponentModel.ISupportInitialize)(this.toggleSwitchSnapGrid.Properties)).EndInit();
444 599
            ((System.ComponentModel.ISupportInitialize)(this.toggleSwitchMoveSymbol.Properties)).EndInit();
445 600
            ((System.ComponentModel.ISupportInitialize)(this.spinEditSymmetry.Properties)).EndInit();
446 601
            ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
447 602
            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
448 603
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
449
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup2)).EndInit();
604
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroupConverter)).EndInit();
450 605
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
451 606
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
452
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup3)).EndInit();
607
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroupUtils)).EndInit();
453 608
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
454 609
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
455 610
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
456 611
            ((System.ComponentModel.ISupportInitialize)(this.simpleSeparator1)).EndInit();
457
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).EndInit();
612
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroupShortCut)).EndInit();
458 613
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup5)).EndInit();
459 614
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
460 615
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
......
462 617
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
463 618
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
464 619
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
620
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).EndInit();
621
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit();
622
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).EndInit();
623
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
624
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
625
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem17)).EndInit();
626
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit();
465 627
            this.ResumeLayout(false);
466 628

  
467 629
        }
......
476 638
        public DevExpress.XtraEditors.SimpleButton simpleButton1;
477 639
        public DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
478 640
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
479
        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup2;
641
        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroupConverter;
480 642
        private DevExpress.XtraEditors.SimpleButton btnLinkOPC;
481 643
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
482 644
        private DevExpress.XtraEditors.LabelControl labelControl1;
483
        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3;
645
        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroupUtils;
484 646
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
485 647
        private DevExpress.XtraEditors.SimpleButton btnSymmetry;
486 648
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
487
        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4;
649
        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroupShortCut;
488 650
        private DevExpress.XtraEditors.SpinEdit spinEditSymmetry;
489 651
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
490 652
        private DevExpress.XtraEditors.SimpleButton btnSpecBreakRelocation;
......
500 662
        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup6;
501 663
        private DevExpress.XtraEditors.SimpleButton btnLinkOPCTest;
502 664
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
665
        private DevExpress.XtraEditors.TextEdit textEdit2;
666
        private DevExpress.XtraEditors.TextEdit textEdit1;
667
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
668
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14;
669
        private DevExpress.XtraEditors.SimpleButton btnOPC;
670
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem15;
671
        private DevExpress.XtraEditors.SimpleButton btnCreateStreamBreak;
672
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem16;
673
        private DevExpress.XtraEditors.SimpleButton btnPipeRunBreak;
674
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem17;
675
        private DevExpress.XtraEditors.SimpleButton btnSegmentBreak;
676
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem18;
677
        private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup1;
503 678
    }
504 679
}
DTI_PID/SPPIDConverter/ConverterDocking.cs
53 53
                if (Project_DB.ConnTestAndCreateTable())
54 54
                {
55 55
                    _ProjectInfo.Enable = true;
56
                    layoutControlGroup3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
56
                    layoutControlGroupUtils.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
57 57

  
58 58
                    DataTable dt = Project_DB.SelectSetting();
59 59
                    foreach (DataRow item in dt.Rows)
......
67 67
                }
68 68
                else
69 69
                {
70
                    layoutControlGroup3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
70
                    layoutControlGroupUtils.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
71 71
                }
72 72

  
73 73
                if (!addEvent)
......
83 83
                sb.AppendLine(ex.StackTrace);
84 84
                MessageBox.Show(sb.ToString());
85 85
            }
86

  
87
#if DEBUG
88
            this.layoutControlItem2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
89
            layoutControlGroup1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
90

  
91
#else
92
            layoutControlGroup1.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
93
            this.layoutControlItem2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
94
#endif
95

  
96
            //#if DEBUG
97
            //            layoutControlGroupConverter.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
98
            //            layoutControlGroupUtils.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
99
            //            layoutControlGroupShortCut.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
100
            //            this.layoutControlItem2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
101
            //            this.layoutControlItem3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
102
            //#endif
86 103
        }
87 104
        private void ApplicationEvents_ApplicationExit(out bool cancel)
88 105
        {
......
1191 1208
            width = x2 - x1;
1192 1209
            height = y2 - y1;
1193 1210
        }
1194

  
1195 1211
        private void FindRangeWithOutLineString2dAndTextBox(DependencyObject dependency, out double x1, out double y1, out double x2, out double y2)
1196 1212
        {
1197 1213
            x1 = double.MaxValue;
......
1602 1618

  
1603 1619
        #endregion
1604 1620

  
1621
        
1605 1622
        #region TEST
1606

  
1607 1623
        private void simpleButton1_Click(object sender, EventArgs e)
1608 1624
        {
1609 1625
            //SPPIDUtil.test();
......
1667 1683
            //relationships.Collect(dataSource, Filter: filter);
1668 1684

  
1669 1685
        }
1670

  
1671 1686
        private void AutoJoinPipeRun()
1672 1687
        {
1673 1688
            dynamic application = Interaction.GetObject("", "PIDAutomation.Application");
......
1702 1717
        [DllImport("user32.dll", SetLastError = true)]
1703 1718
        static extern int GetWindowThreadProcessId(IntPtr hWnd, out int processId);
1704 1719

  
1705
        private void ConverterDocking_Load(object sender, EventArgs e)
1706
        {
1707
#if DEBUG
1708
            this.layoutControlItem2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
1709
#else
1710
            this.layoutControlItem2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
1711
#endif
1712

  
1713
        }
1714

  
1715 1720
        private void btnLinkOPCTest_Click(object sender, EventArgs e)
1716 1721
        {
1717 1722
            Placement placement = new Placement();
......
1758 1763
            ReleaseCOMObjects(dataSource);
1759 1764
            ReleaseCOMObjects(placement);
1760 1765
        }
1766

  
1767
        #region Test For SECL
1768
        private void btnAutoBreakTest_Click(object sender, EventArgs e)
1769
        {
1770
            
1771
        }
1772

  
1773
        private void FindRun(LMSymbol startSymbol, LMSymbol endSymbol, string model)
1774
        {
1775
            Placement placement = new Placement();
1776
            LMADataSource dataSource = placement.PIDDataSource;
1777
            List<string> endRepID = new List<string>();
1778
            List<string> findRepID = new List<string>();
1779
            endRepID.Add(startSymbol.AsLMRepresentation().Id);
1780
            findRepID.Add(startSymbol.AsLMRepresentation().Id);
1781
            bool end = false;
1782
            LoopRunTest(startSymbol.AsLMRepresentation(), endRepID, endSymbol.AsLMRepresentation().Id, ref end, findRepID);
1783

  
1784

  
1785
            //findRepID.Reverse();
1786
            for (int i = 0; i < findRepID.Count; i++)
1787
            {
1788
                string repID = findRepID[i];
1789

  
1790
                LMRepresentation representation = dataSource.GetRepresentation(repID);
1791
                if (representation != null)
1792
                {
1793
                    string fileName = representation.get_FileName().ToString();
1794
                    if (fileName.Contains(@"\Piping\Valves"))
1795
                    {
1796
                        LMModelItem modelItem = representation.ModelItemObject;
1797
                        LMSymbol tarsym = dataSource.GetSymbol(representation.Id);
1798
                        LMRepresentation prevRep = dataSource.GetRepresentation(findRepID[i - 1]);
1799
                        LMConnector removeConnector = dataSource.GetConnector(prevRep.Id);
1800

  
1801
                        List<double[]> vertices = GetConnectorVertices(removeConnector);
1802

  
1803
                        ZoomObjectByGraphicOID(vertices[0][0], vertices[0][1]);
1804
                        Array array = new double[] { 0, vertices[0][0], vertices[0][1] };
1805
                        LMLabelPersist _LmLabelPersist = placement.PIDPlaceLabel(model, ref array, LabeledItem: removeConnector.AsLMRepresentation(), IsLeaderVisible: true);
1806
                        if (_LmLabelPersist == null)
1807
                        {
1808
                            if (removeConnector.get_ItemStatus() == "Active")
1809
                            {
1810
                                LMConnector newConnector = ReModelingLine(removeConnector, removeConnector.ConnectItem1SymbolObject, removeConnector.ConnectItem2SymbolObject, true, false);
1811
                                FindRun(startSymbol, endSymbol, model);
1812
                            }
1813
                        }
1814
                        
1815

  
1816

  
1817
                        //string dd = startSymbol.ModelItemObject.Attributes["SteamOutTemperature"].get_Value();
1818
                        //string dd2 = endSymbol.ModelItemObject.Attributes["SteamOutTemperature"].get_Value();
1819
                        //double value1 = Convert.ToDouble(dd.Split(new char[] { ' ' })[0]);
1820
                        //double value2 = Convert.ToDouble(dd2.Split(new char[] { ' ' })[0]);
1821

  
1822
                        //if (value1 > value2)
1823
                        //{
1824
                        //    LMRepresentation prevRep = dataSource.GetRepresentation(endRepID[i + 1]);
1825
                        //    placement.PIDRemovePlacement(prevRep);
1826
                        //}
1827
                        //else
1828
                        //{
1829
                        //    LMRepresentation prevRep = dataSource.GetRepresentation(endRepID[i - 1]);
1830
                        //    placement.PIDRemovePlacement(prevRep);
1831
                        //}
1832

  
1833
                        //LMRepresentation prevRep = dataSource.GetRepresentation(endRepID[i - 1]);
1834
                        //placement.PIDRemovePlacement(prevRep);
1835

  
1836

  
1837
                        //application.ActiveDocument.Save();
1838
                        //ReleaseCOMObjects(modelItem);
1839
                        break;
1840
                    }
1841
                }
1842

  
1843
                ReleaseCOMObjects(representation);
1844
            }
1845
        }
1846
        private LMConnector ReModelingLine(LMConnector prevLMConnector, LMSymbol startSymbol, LMSymbol endSymbol, bool bStart, bool bEnd)
1847
        {
1848
            Placement _placement = new Placement();
1849
            LMADataSource dataSource = _placement.PIDDataSource;
1850

  
1851
            string symbolPath = string.Empty;
1852
            #region get symbol path
1853
            LMModelItem modelItem = dataSource.GetModelItem(prevLMConnector.ModelItemID);
1854
            symbolPath = GetSPPIDFileName(modelItem);
1855
            ReleaseCOMObjects(modelItem);
1856
            #endregion
1857
            bool diagonal = false;
1858
            _LMAItem _LMAItem = _placement.PIDCreateItem(symbolPath);
1859
            LMConnector newConnector = null;
1860
            dynamic OID = prevLMConnector.get_GraphicOID().ToString();
1861
            DependencyObject drawingObject = application.ActiveDocument.ActiveSheet.DrawingObjects[OID];
1862
            Ingr.RAD2D.LineStringGeometry2d lineStringGeometry = drawingObject.GetGeometry() as Ingr.RAD2D.LineStringGeometry2d;
1863
            int verticesCount = lineStringGeometry.VertexCount;
1864
            PlaceRunInputs placeRunInputs = new PlaceRunInputs();
1865

  
1866
            List<double[]> vertices = new List<double[]>();
1867
            for (int i = 1; i <= verticesCount; i++)
1868
            {
1869
                double x = 0;
1870
                double y = 0;
1871
                lineStringGeometry.GetVertex(i, ref x, ref y);
1872
                vertices.Add(new double[] { x, y });
1873
            }
1874

  
1875
            for (int i = 0; i < vertices.Count; i++)
1876
            {
1877
                double[] points = vertices[i];
1878
                // 시작 심볼이 있고 첫번째 좌표일 때
1879
                if (startSymbol != null && i == 0)
1880
                {
1881
                    if (bStart)
1882
                    {
1883
                        SlopeType slopeType = SPPIDUtil.CalcSlope(points[0], points[1], vertices[i + 1][0], vertices[i + 1][1]);
1884
                        if (slopeType == SlopeType.HORIZONTAL)
1885
                            placeRunInputs.AddPoint(points[0], -0.1);
1886
                        else if (slopeType == SlopeType.VERTICAL)
1887
                            placeRunInputs.AddPoint(-0.1, points[1]);
1888
                        else
1889
                            placeRunInputs.AddPoint(points[0], -0.1);
1890

  
1891
                        placeRunInputs.AddPoint(points[0], points[1]);
1892
                    }
1893
                    else
1894
                    {
1895
                        placeRunInputs.AddSymbolTarget(startSymbol, points[0], points[1], diagonal);
1896
                    }
1897
                }
1898
                // 마지막 심볼이 있고 마지막 좌표일 때
1899
                else if (endSymbol != null && i == vertices.Count - 1)
1900
                {
1901
                    if (bEnd)
1902
                    {
1903
                        placeRunInputs.AddPoint(points[0], points[1]);
1904

  
1905
                        SlopeType slopeType = SPPIDUtil.CalcSlope(points[0], points[1], vertices[i - 1][0], vertices[i - 1][1]);
1906
                        if (slopeType == SlopeType.HORIZONTAL)
1907
                            placeRunInputs.AddPoint(points[0], -0.1);
1908
                        else if (slopeType == SlopeType.VERTICAL)
1909
                            placeRunInputs.AddPoint(-0.1, points[1]);
1910
                        else
1911
                            placeRunInputs.AddPoint(points[0], -0.1);
1912
                    }
1913
                    else
1914
                    {
1915
                        placeRunInputs.AddSymbolTarget(endSymbol, points[0], points[1], diagonal);
1916
                    }
1917
                }
1918
                // 첫번째이며 시작 심볼이 아니고 Connecotr일 경우
1919
                else if (i == 0 && prevLMConnector.ConnectItem1SymbolObject != null)
1920
                    placeRunInputs.AddSymbolTarget(prevLMConnector.ConnectItem1SymbolObject, points[0], points[1], diagonal);
1921
                // 마지막이며 마지막 심볼이 아니고 Connecotr일 경우
1922
                else if (i == vertices.Count - 1 && prevLMConnector.ConnectItem2SymbolObject != null)
1923
                    placeRunInputs.AddSymbolTarget(prevLMConnector.ConnectItem2SymbolObject, points[0], points[1], diagonal);
1924
                else
1925
                    placeRunInputs.AddPoint(points[0], points[1]);
1926
            }
1927

  
1928
            _placement.PIDRemovePlacement(prevLMConnector.AsLMRepresentation());
1929
            Thread.Sleep(1000);
1930
            newConnector = _placement.PIDPlaceRun(_LMAItem, placeRunInputs);
1931

  
1932
            ReleaseCOMObjects(placeRunInputs);
1933
            ReleaseCOMObjects(_LMAItem);
1934
            ReleaseCOMObjects(modelItem);
1935

  
1936
            if (newConnector != null)
1937
            {
1938
                newConnector.Commit();
1939
                if (startSymbol != null && bStart)
1940
                {
1941
                    _LMAItem = _placement.PIDCreateItem(symbolPath);
1942
                    placeRunInputs = new PlaceRunInputs();
1943
                    placeRunInputs.AddSymbolTarget(startSymbol, vertices[0][0], vertices[0][1]);
1944
                    placeRunInputs.AddConnectorTarget(newConnector, vertices[0][0], vertices[0][1]);
1945
                    LMConnector _LMConnector = _placement.PIDPlaceRun(_LMAItem, placeRunInputs);
1946
                    if (_LMConnector != null)
1947
                    {
1948
                        _LMConnector.Commit();
1949
                        newConnector = RemoveConnectorForReModelingLine(newConnector);
1950
                        ReleaseCOMObjects(_LMConnector);
1951
                    }
1952
                    ReleaseCOMObjects(placeRunInputs);
1953
                    ReleaseCOMObjects(_LMAItem);
1954
                }
1955

  
1956
                if (endSymbol != null && bEnd)
1957
                {
1958
                    if (startSymbol != null)
1959
                    {
1960
                        Dictionary<LMConnector, List<double[]>> dicVertices = GetPipeRunVertices(newConnector.ModelItemID);
1961
                        newConnector = dicVertices.First().Key;
1962
                    }
1963

  
1964
                    _LMAItem = _placement.PIDCreateItem(symbolPath);
1965
                    placeRunInputs = new PlaceRunInputs();
1966
                    placeRunInputs.AddSymbolTarget(endSymbol, vertices[vertices.Count - 1][0], vertices[vertices.Count - 1][1]);
1967
                    placeRunInputs.AddConnectorTarget(newConnector, vertices[vertices.Count - 1][0], vertices[vertices.Count - 1][1]);
1968
                    LMConnector _LMConnector = _placement.PIDPlaceRun(_LMAItem, placeRunInputs);
1969
                    if (_LMConnector != null)
1970
                    {
1971
                        _LMConnector.Commit();
1972
                        newConnector = RemoveConnectorForReModelingLine(newConnector);
1973
                        ReleaseCOMObjects(_LMConnector);
1974
                    }
1975
                    ReleaseCOMObjects(placeRunInputs);
1976
                    ReleaseCOMObjects(_LMAItem);
1977
                }
1978

  
1979
                
1980
            }
1981
            ReleaseCOMObjects(modelItem);
1982
            return newConnector;
1983
            
1984
        }
1985

  
1986
        private LMConnector RemoveConnectorForReModelingLine(LMConnector connector)
1987
        {
1988
            Placement _placement = new Placement();
1989
            LMADataSource dataSource = _placement.PIDDataSource;
1990

  
1991
            Dictionary<LMConnector, List<double[]>> dicVertices = GetPipeRunVertices(connector.ModelItemID);
1992
            foreach (var item in dicVertices)
1993
            {
1994
                if (item.Value.Count == 2)
1995
                {
1996
                    bool result = false;
1997
                    foreach (var point in item.Value)
1998
                    {
1999
                        if (point[0] < 0 || point[1] < 0)
2000
                        {
2001
                            result = true;
2002
                            _placement.PIDRemovePlacement(item.Key.AsLMRepresentation());
2003
                            break;
2004
                        }
2005
                    }
2006

  
2007
                    if (result)
2008
                        break;
2009
                }
2010
            }
2011

  
2012
            LMConnector result111 = null;
2013
            foreach (var item in dicVertices)
2014
            {
2015
                if (item.Key.get_ItemStatus() == "Active")
2016
                    result111 = item.Key;
2017
                else
2018
                    ReleaseCOMObjects(item.Key);
2019
            }
2020

  
2021
            return result111;
2022
        }
2023

  
2024
        private Dictionary<LMConnector, List<double[]>> GetPipeRunVertices(string modelId, bool ContainZeroLength = true)
2025
        {
2026
            Placement _placement = new Placement();
2027
            LMADataSource dataSource = _placement.PIDDataSource;
2028

  
2029
            Dictionary<LMConnector, List<double[]>> connectorVertices = new Dictionary<LMConnector, List<double[]>>();
2030
            LMModelItem modelItem = dataSource.GetModelItem(modelId);
2031

  
2032
            if (modelItem != null)
2033
            {
2034
                foreach (LMRepresentation rep in modelItem.Representations)
2035
                {
2036
                    if (rep.Attributes["RepresentationType"].get_Value() == "Connector" && rep.Attributes["ItemStatus"].get_Value() == "Active")
2037
                    {
2038
                        LMConnector _LMConnector = dataSource.GetConnector(rep.Id);
2039
                        if (!ContainZeroLength && Convert.ToBoolean(_LMConnector.get_IsZeroLength()))
2040
                        {
2041
                            ReleaseCOMObjects(_LMConnector);
2042
                            _LMConnector = null;
2043
                            continue;
2044
                        }
2045
                        connectorVertices.Add(_LMConnector, new List<double[]>());
2046
                        dynamic OID = rep.get_GraphicOID().ToString();
2047
                        DependencyObject drawingObject = application.ActiveDocument.ActiveSheet.DrawingObjects[OID];
2048
                        Ingr.RAD2D.LineStringGeometry2d lineStringGeometry = drawingObject.GetGeometry() as Ingr.RAD2D.LineStringGeometry2d;
2049
                        int verticesCount = lineStringGeometry.VertexCount;
2050
                        double[] vertices = null;
2051
                        lineStringGeometry.GetVertices(ref verticesCount, ref vertices);
2052
                        for (int i = 0; i < verticesCount; i++)
2053
                        {
2054
                            double x = 0;
2055
                            double y = 0;
2056
                            lineStringGeometry.GetVertex(i + 1, ref x, ref y);
2057
                            connectorVertices[_LMConnector].Add(new double[] { x, y });
2058
                        }
2059
                    }
2060
                }
2061

  
2062
                ReleaseCOMObjects(modelItem);
2063
            }
2064

  
2065
            return connectorVertices;
2066
        }
2067
        private string GetSPPIDFileName(LMModelItem modelItem)
2068
        {
2069
            string symbolPath = null;
2070
            foreach (LMRepresentation rep in modelItem.Representations)
2071
            {
2072
                if (!DBNull.Value.Equals(rep.get_FileName()) && !string.IsNullOrEmpty(rep.get_FileName()))
2073
                {
2074
                    symbolPath = rep.get_FileName();
2075
                    break;
2076
                }
2077
            }
2078
            return symbolPath;
2079
        }
2080
        private string GetSPPIDFileName(string modelItemId)
2081
        {
2082
            Placement placement = new Placement();
2083
            LMADataSource dataSource = placement.PIDDataSource;
2084

  
2085
            LMModelItem modelItem = dataSource.GetModelItem(modelItemId);
2086
            string symbolPath = null;
2087
            foreach (LMRepresentation rep in modelItem.Representations)
2088
            {
2089
                if (!DBNull.Value.Equals(rep.get_FileName()) && !string.IsNullOrEmpty(rep.get_FileName()))
2090
                {
2091
                    symbolPath = rep.get_FileName();
2092
                    break;
2093
                }
2094
            }
2095
            ReleaseCOMObjects(modelItem);
2096
            return symbolPath;
2097
        }
2098
        private List<double[]> GetConnectorVertices(LMConnector connector)
2099
        {
2100
            List<double[]> vertices = new List<double[]>();
2101
            if (connector != null)
2102
            {
2103
                dynamic OID = connector.get_GraphicOID().ToString();
2104
                DependencyObject drawingObject = application.ActiveDocument.ActiveSheet.DrawingObjects[OID];
2105
                Ingr.RAD2D.LineStringGeometry2d lineStringGeometry = drawingObject.GetGeometry() as Ingr.RAD2D.LineStringGeometry2d;
2106
                int verticesCount = lineStringGeometry.VertexCount;
2107
                double[] value = null;
2108
                lineStringGeometry.GetVertices(ref verticesCount, ref value);
2109
                for (int i = 0; i < verticesCount; i++)
2110
                {
2111
                    double x = 0;
2112
                    double y = 0;
2113
                    lineStringGeometry.GetVertex(i + 1, ref x, ref y);
2114
                    vertices.Add(new double[] { x, y });
2115
                }
2116
            }
2117
            return vertices;
2118
        }
2119
        private void LoopRunTest(LMRepresentation rep, List<string> endRepID, string endID,ref bool end, List<string> findRepID)
2120
        {
2121
            if (!end)
2122
            {
2123
                foreach (LMRelationship item in rep.Relation1Relationships)
2124
                {
2125
                    if (end)
2126
                        break;
2127

  
2128
                    if (!DBNull.Value.Equals(item.Item1RepresentationID) && !endRepID.Contains(item.Item1RepresentationID) && item.Item1RepresentationObject.get_ItemStatus() == "Active" &&
2129
                        (item.Item1RepresentationObject.get_RepresentationClass() == "Symbol" || item.Item1RepresentationObject.get_RepresentationClass() == "Connector"))
2130
                    {
2131
                        if (endID != item.Item1RepresentationID)
2132
                        {
2133
                            endRepID.Add(item.Item1RepresentationID);
2134
                            LoopRunTest(item.Item1RepresentationObject, endRepID, endID, ref end, findRepID);
2135
                            if (end)
2136
                                findRepID.Add(item.Item1RepresentationID);
2137
                        }
2138
                        else
2139
                            end = true;
2140
                    }
2141

  
2142
                    if (end)
2143
                        break;
2144

  
2145
                    if (!DBNull.Value.Equals(item.Item2RepresentationID) && !endRepID.Contains(item.Item2RepresentationID) && item.Item2RepresentationObject.get_ItemStatus() == "Active" &&
2146
                        (item.Item2RepresentationObject.get_RepresentationClass() == "Symbol" || item.Item2RepresentationObject.get_RepresentationClass() == "Connector"))
2147
                    {
2148
                        if (endID != item.Item2RepresentationID)
2149
                        {
2150
                            endRepID.Add(item.Item2RepresentationID);
2151
                            LoopRunTest(item.Item2RepresentationObject, endRepID, endID, ref end, findRepID);
2152
                            if (end)
2153
                                findRepID.Add(item.Item2RepresentationID);
2154
                        }
2155
                        else
2156
                            end = true;
2157
                    }
2158
                }
2159
            }
2160

  
2161
            if (!end)
2162
            {
2163
                foreach (LMRelationship item in rep.Relation2Relationships)
2164
                {
2165
                    if (end)
2166
                        break;
2167

  
2168
                    if (!DBNull.Value.Equals(item.Item1RepresentationID) && !endRepID.Contains(item.Item1RepresentationID) && item.Item1RepresentationObject.get_ItemStatus() == "Active" &&
2169
                        (item.Item1RepresentationObject.get_RepresentationClass() == "Symbol" || item.Item1RepresentationObject.get_RepresentationClass() == "Connector"))
2170
                    {
2171
                        if (endID != item.Item1RepresentationID)
2172
                        {
2173
                            endRepID.Add(item.Item1RepresentationID);
2174
                            LoopRunTest(item.Item1RepresentationObject, endRepID, endID, ref end, findRepID);
2175
                            if (end)
2176
                                findRepID.Add(item.Item1RepresentationID);
2177
                        }
2178
                        else
2179
                            end = true;
2180
                    }
2181

  
2182
                    if (end)
2183
                        break;
2184

  
2185
                    if (!DBNull.Value.Equals(item.Item2RepresentationID) && !endRepID.Contains(item.Item2RepresentationID) && item.Item2RepresentationObject.get_ItemStatus() == "Active" &&
2186
                        (item.Item2RepresentationObject.get_RepresentationClass() == "Symbol" || item.Item2RepresentationObject.get_RepresentationClass() == "Connector"))
2187
                    {
2188
                        if (endID != item.Item2RepresentationID)
2189
                        {
2190
                            endRepID.Add(item.Item2RepresentationID);
2191
                            LoopRunTest(item.Item2RepresentationObject, endRepID, endID, ref end, findRepID);
2192
                            if (end)
2193
                                findRepID.Add(item.Item2RepresentationID);
2194
                        }
2195
                        else
2196
                            end = true;
2197
                    }
2198
                }
2199
            }
2200
        }
2201

  
2202
        private void btnOPC_Click(object sender, EventArgs e)
2203
        {
2204
            Placement _placement;
2205
            LMADataSource dataSource;
2206
            _placement = new Placement();
2207
            dataSource = _placement.PIDDataSource;
2208

  
2209
            OPCFlowDirection();
2210

  
2211
            void OPCFlowDirection()
2212
            {
2213
                //current LMDrawing 가져오기
2214
                LMAFilter filter = new LMAFilter();
2215
                LMACriterion criterion = new LMACriterion();
2216
                filter.ItemType = "Drawing";
2217
                criterion.SourceAttributeName = "Name";
2218
                criterion.Operator = "=";
2219
                criterion.set_ValueAttribute(application.ActiveDocument.Name.Replace(".pid", ""));
2220
                filter.get_Criteria().Add(criterion);
2221

  
2222
                LMDrawings drawings = new LMDrawings();
2223
                drawings.Collect(dataSource, Filter: filter);
2224

  
2225
                // Input Drawing Attribute
2226
                LMDrawing drawing = ((dynamic)drawings).Nth(1);
2227

  
2228
                LMAFilter filter2 = new LMAFilter();
2229
                filter2.ItemType = "REPRESENTATION";
2230

  
2231
                LMACriterion criterion2 = new LMACriterion();
2232
                criterion2.SourceAttributeName = "REPRESENTATIONTYPE";
2233
                criterion2.Operator = "=";
2234
                criterion2.set_ValueAttribute("39");
2235
                filter2.get_Criteria().Add(criterion2);
2236

  
2237
                LMRepresentations representations = new LMRepresentations();
2238
                representations.Collect(dataSource, Filter: filter2);
2239

  
2240
                foreach (LMRepresentation representation in representations)
2241
                {
2242
                    if (representation.DrawingID == drawing.Id)
2243
                    {
2244
                        RunOPC(representation);
2245
                    }
2246
                }
2247
                
2248
                ReleaseCOMObjects(filter);
2249
                ReleaseCOMObjects(filter2);
2250
                ReleaseCOMObjects(criterion);
2251
                ReleaseCOMObjects(criterion2);
2252
                ReleaseCOMObjects(drawing);
2253
                ReleaseCOMObjects(drawings);
2254
                ReleaseCOMObjects(representations);
2255
            }
2256

  
2257
            void RunOPC(LMRepresentation representation)
2258
            {
2259
                LMSymbol symbol = dataSource.GetSymbol(representation.Id);
2260
                List<string> endRepId = new List<string>();
2261
                endRepId.Add(symbol.AsLMRepresentation().Id);
2262
                LoopSymbol(symbol, endRepId);
2263
                
2264
                ReleaseCOMObjects(symbol);
2265

  
2266
                void LoopSymbol(LMSymbol loopSymbol, List<string> endRepID)
2267
                {
2268
                    foreach (LMRelationship item in loopSymbol.Relation1Relationships)
2269
                    {
2270
                        if (!DBNull.Value.Equals(item.Item1RepresentationID) && !endRepID.Contains(item.Item1RepresentationID))
2271
                        {
2272
                            endRepID.Add(item.Item1RepresentationID);
2273
                            if (item.Item1RepresentationObject.get_RepresentationClass() == "Connector")
2274
                            {
2275
                                LMModelItem modelItem = item.Item1RepresentationObject.ModelItemObject;
2276
                                SetAttribute(modelItem);
2277
                                LoopConnector(dataSource.GetConnector(item.Item1RepresentationID), endRepID);
2278
                            }
2279
                            else if (item.Item1RepresentationObject.get_RepresentationClass() == "Symbol")
2280
                            {
2281
                                LoopSymbol(dataSource.GetSymbol(item.Item1RepresentationID), endRepID);
2282
                            }
2283
                        }
2284

  
2285
                        if (!DBNull.Value.Equals(item.Item2RepresentationID) && !endRepID.Contains(item.Item2RepresentationID))
2286
                        {
2287
                            endRepID.Add(item.Item2RepresentationID);
2288
                            if (item.Item2RepresentationObject.get_RepresentationClass() == "Connector")
2289
                            {
2290
                                LMModelItem modelItem = item.Item2RepresentationObject.ModelItemObject;
2291
                                SetAttribute(modelItem);
2292
                                LoopConnector(dataSource.GetConnector(item.Item2RepresentationID), endRepID);
2293
                            }
2294
                            else if (item.Item2RepresentationObject.get_RepresentationClass() == "Symbol")
2295
                            {
2296
                                LoopSymbol(dataSource.GetSymbol(item.Item2RepresentationID), endRepID);
2297
                            }
2298
                        }
2299
                    }
2300

  
2301
                    foreach (LMRelationship item in loopSymbol.Relation2Relationships)
2302
                    {
2303
                        if (!DBNull.Value.Equals(item.Item1RepresentationID) && !endRepID.Contains(item.Item1RepresentationID))
2304
                        {
2305
                            endRepID.Add(item.Item1RepresentationID);
2306
                            if (item.Item1RepresentationObject.get_RepresentationClass() == "Connector")
2307
                            {
2308
                                LMModelItem modelItem = item.Item1RepresentationObject.ModelItemObject;
2309
                                SetAttribute(modelItem);
2310
                                LoopConnector(dataSource.GetConnector(item.Item1RepresentationID), endRepID);
2311
                            }
2312
                            else if (item.Item1RepresentationObject.get_RepresentationClass() == "Symbol")
2313
                            {
2314
                                LoopSymbol(dataSource.GetSymbol(item.Item1RepresentationID), endRepID);
2315
                            }
2316
                        }
2317

  
2318
                        if (!DBNull.Value.Equals(item.Item2RepresentationID) && !endRepID.Contains(item.Item2RepresentationID))
2319
                        {
2320
                            endRepID.Add(item.Item2RepresentationID);
2321
                            if (item.Item2RepresentationObject.get_RepresentationClass() == "Connector")
2322
                            {
2323
                                LMModelItem modelItem = item.Item2RepresentationObject.ModelItemObject;
2324
                                SetAttribute(modelItem);
2325
                                LoopConnector(dataSource.GetConnector(item.Item2RepresentationID), endRepID);
2326
                            }
2327
                            else if (item.Item2RepresentationObject.get_RepresentationClass() == "Symbol")
2328
                            {
2329
                                LoopSymbol(dataSource.GetSymbol(item.Item2RepresentationID), endRepID);
2330
                            }
2331
                        }
2332
                    }
2333

  
2334
                    foreach (LMConnector item in loopSymbol.Connect1Connectors)//나가는것
2335
                    {
2336
                        if (item.get_ItemStatus() != "Active" || endRepID.Contains(item.AsLMRepresentation().Id))
2337
                            continue;
2338

  
2339
                        endRepID.Add(item.AsLMRepresentation().Id);
2340
                        if (item.get_ItemStatus() == "Active")
2341
                        {
2342
                            LMModelItem modelItem = item.ModelItemObject;
2343
                            SetAttribute(modelItem);
2344
                            LoopConnector(item, endRepID);
2345
                        }
2346
                    }
2347

  
2348
                    foreach (LMConnector item in loopSymbol.Connect2Connectors)//들어오는것
2349
                    {
2350
                        if (item.get_ItemStatus() != "Active" || endRepID.Contains(item.AsLMRepresentation().Id))
2351
                            continue;
2352

  
2353
                        endRepID.Add(item.AsLMRepresentation().Id);
2354
                        if (item.get_ItemStatus() == "Active")
2355
                        {
2356
                            LMModelItem modelItem = item.ModelItemObject;
2357
                            SetAttribute(modelItem);
2358
                            LoopConnector(item, endRepID);
2359
                        }
2360
                    }
2361
                }
2362

  
2363
                void LoopConnector(LMConnector connector, List<string> endRepID)
2364
                {
2365
                    if (connector.ConnectItem1SymbolObject != null && !endRepID.Contains(connector.ConnectItem1SymbolObject.AsLMRepresentation().Id))
2366
                    {
2367
                        endRepID.Add(connector.ConnectItem1SymbolObject.AsLMRepresentation().Id);
2368
                        //LoopSymbol(connector.ConnectItem1SymbolObject, endRepID);
2369
                    }
2370

  
2371
                    if (connector.ConnectItem2SymbolObject != null && !endRepID.Contains(connector.ConnectItem2SymbolObject.AsLMRepresentation().Id))
2372
                    {
2373
                        endRepID.Add(connector.ConnectItem2SymbolObject.AsLMRepresentation().Id);
2374
                        //LoopSymbol(connector.ConnectItem2SymbolObject, endRepID);
2375
                    }
2376
                }
2377
            }
2378

  
2379
            void SetAttribute(LMModelItem modelItem)
2380
            {
2381
                LMAAttribute attribute = modelItem.Attributes["FlowDirection"];
2382
                if (attribute != null)
2383
                    attribute.set_Value("End 1 is upstream (Inlet)");
2384
                modelItem.Commit();
2385
            }
2386

  
2387
            ReleaseCOMObjects(_placement);
2388
            ReleaseCOMObjects(dataSource);
2389

  
2390
            MessageBox.Show("End OPC Flow Direction");
2391
        }
2392

  
2393
        private void btnCreateStreamBreak_Click(object sender, EventArgs e)
2394
        {
2395
            Placement _placement;
2396
            LMADataSource dataSource;
2397

  
2398
            StreamNoBreak();
2399

  
2400
            void StreamNoBreak()
2401
            {
2402
                
2403
                _placement = new Placement();
2404
                dataSource = _placement.PIDDataSource;
2405

  
2406
                OPCFlowDirection();
2407

  
2408
                void OPCFlowDirection()
2409
                {
2410
                    //current LMDrawing 가져오기
2411
                    LMAFilter filter = new LMAFilter();
2412
                    LMACriterion criterion = new LMACriterion();
2413
                    filter.ItemType = "Drawing";
2414
                    criterion.SourceAttributeName = "Name";
2415
                    criterion.Operator = "=";
2416
                    criterion.set_ValueAttribute(application.ActiveDocument.Name.Replace(".pid", ""));
2417
                    filter.get_Criteria().Add(criterion);
2418

  
2419
                    LMDrawings drawings = new LMDrawings();
2420
                    drawings.Collect(dataSource, Filter: filter);
2421

  
2422
                    // Input Drawing Attribute
2423
                    LMDrawing drawing = ((dynamic)drawings).Nth(1);
2424

  
2425
                    LMAFilter filter2 = new LMAFilter();
2426
                    filter2.ItemType = "REPRESENTATION";
2427

  
2428
                    LMACriterion criterion2 = new LMACriterion();
2429
                    criterion2.SourceAttributeName = "REPRESENTATIONTYPE";
2430
                    criterion2.Operator = "=";
2431
                    criterion2.set_ValueAttribute("46");
2432
                    filter2.get_Criteria().Add(criterion2);
2433

  
2434
                    LMRepresentations representations = new LMRepresentations();
2435
                    representations.Collect(dataSource, Filter: filter2);
2436

  
2437
                    foreach (LMRepresentation representation in representations)
2438
                    {
2439
                        if (representation.DrawingID == drawing.Id)
2440
                        {
2441
                            LMSymbol symbol = dataSource.GetSymbol(representation.Id);
2442
                            CreateSpec(symbol);
2443
                        }
2444
                    }
2445

  
2446
                    ReleaseCOMObjects(filter);
2447
                    ReleaseCOMObjects(filter2);
2448
                    ReleaseCOMObjects(criterion);
2449
                    ReleaseCOMObjects(criterion2);
2450
                    ReleaseCOMObjects(drawing);
2451
                    ReleaseCOMObjects(drawings);
2452
                    ReleaseCOMObjects(representations);
2453
                }
2454
            }
2455

  
2456
            void CreateSpec(LMSymbol symbol)
2457
            {
2458
                ZoomObjectByGraphicOID(symbol.get_XCoordinate(), symbol.get_YCoordinate());
2459

  
2460
                foreach (LMConnector item in symbol.Connect1Connectors)
2461
                {
2462
                    if (item.get_ItemStatus() == "Active")
2463
                    {
2464
                        Array array = new double[] { 0, symbol.get_XCoordinate(), symbol.get_YCoordinate() };
2465
                        LMLabelPersist _LmLabelPersist = _placement.PIDPlaceLabel(@"\Piping\Segment Breaks\Above\stream Number Break.sym", ref array, LabeledItem: item.AsLMRepresentation(), IsLeaderVisible: true);
2466
                    }
2467
                }
2468

  
2469
                foreach (LMConnector item in symbol.Connect2Connectors)
2470
                {
2471
                    if (item.get_ItemStatus() == "Active")
2472
                    {
2473
                        Array array = new double[] { 0, symbol.get_XCoordinate(), symbol.get_YCoordinate() };
2474
                        LMLabelPersist _LmLabelPersist = _placement.PIDPlaceLabel(@"\Piping\Segment Breaks\Above\stream Number Break.sym", ref array, LabeledItem: item.AsLMRepresentation(), IsLeaderVisible: true);
2475
                    }
2476
                }
2477

  
2478
                Thread.Sleep(500);
2479
            }
2480

  
2481
            MessageBox.Show("End Modeling");
2482
        }
2483
        
2484
        private void btnPipeRunBreak_Click(object sender, EventArgs e)
2485
        {
2486
            Placement placement = new Placement();
2487
            LMADataSource dataSource = placement.PIDDataSource;
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

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