개정판 5a47c65c
dev issue #1287 : Selected Symbol Move 기능 완료
Change-Id: I0287f04ef452355aa7f1a029473dc2372f1170d4
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.toggleSwitchSnapGrid = new DevExpress.XtraEditors.ToggleSwitch(); |
|
36 |
this.labelControl2 = new DevExpress.XtraEditors.LabelControl(); |
|
37 |
this.toggleSwitchMoveSymbol = new DevExpress.XtraEditors.ToggleSwitch(); |
|
35 | 38 |
this.btnSpecBreakRelocation = new DevExpress.XtraEditors.SimpleButton(); |
36 | 39 |
this.spinEditSymmetry = new DevExpress.XtraEditors.SpinEdit(); |
37 | 40 |
this.btnSymmetry = new DevExpress.XtraEditors.SimpleButton(); |
... | ... | |
58 | 61 |
this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); |
59 | 62 |
this.simpleSeparator1 = new DevExpress.XtraLayout.SimpleSeparator(); |
60 | 63 |
this.layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); |
64 |
this.layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); |
|
61 | 65 |
this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); |
66 |
this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); |
|
67 |
this.layoutControlGroup6 = new DevExpress.XtraLayout.LayoutControlGroup(); |
|
68 |
this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); |
|
69 |
this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); |
|
62 | 70 |
this.defaultLookAndFeel = new DevExpress.LookAndFeel.DefaultLookAndFeel(this.components); |
63 | 71 |
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); |
64 | 72 |
this.layoutControl1.SuspendLayout(); |
73 |
((System.ComponentModel.ISupportInitialize)(this.toggleSwitchSnapGrid.Properties)).BeginInit(); |
|
74 |
((System.ComponentModel.ISupportInitialize)(this.toggleSwitchMoveSymbol.Properties)).BeginInit(); |
|
65 | 75 |
((System.ComponentModel.ISupportInitialize)(this.spinEditSymmetry.Properties)).BeginInit(); |
66 | 76 |
((System.ComponentModel.ISupportInitialize)(this.textEditDrawingY.Properties)).BeginInit(); |
67 | 77 |
((System.ComponentModel.ISupportInitialize)(this.textEditDrawingX.Properties)).BeginInit(); |
... | ... | |
81 | 91 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit(); |
82 | 92 |
((System.ComponentModel.ISupportInitialize)(this.simpleSeparator1)).BeginInit(); |
83 | 93 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).BeginInit(); |
94 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup5)).BeginInit(); |
|
84 | 95 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); |
96 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit(); |
|
97 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup6)).BeginInit(); |
|
98 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit(); |
|
99 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit(); |
|
85 | 100 |
this.SuspendLayout(); |
86 | 101 |
// |
87 | 102 |
// splashScreenManager |
... | ... | |
90 | 105 |
// |
91 | 106 |
// layoutControl1 |
92 | 107 |
// |
108 |
this.layoutControl1.Controls.Add(this.toggleSwitchSnapGrid); |
|
109 |
this.layoutControl1.Controls.Add(this.labelControl2); |
|
110 |
this.layoutControl1.Controls.Add(this.toggleSwitchMoveSymbol); |
|
93 | 111 |
this.layoutControl1.Controls.Add(this.btnSpecBreakRelocation); |
94 | 112 |
this.layoutControl1.Controls.Add(this.spinEditSymmetry); |
95 | 113 |
this.layoutControl1.Controls.Add(this.btnSymmetry); |
... | ... | |
104 | 122 |
this.layoutControl1.Location = new System.Drawing.Point(0, 0); |
105 | 123 |
this.layoutControl1.Name = "layoutControl1"; |
106 | 124 |
this.layoutControl1.Root = this.Root; |
107 |
this.layoutControl1.Size = new System.Drawing.Size(250, 500);
|
|
125 |
this.layoutControl1.Size = new System.Drawing.Size(250, 744);
|
|
108 | 126 |
this.layoutControl1.TabIndex = 0; |
109 | 127 |
this.layoutControl1.Text = "layoutControl1"; |
110 | 128 |
// |
129 |
// toggleSwitchSnapGrid |
|
130 |
// |
|
131 |
this.toggleSwitchSnapGrid.Location = new System.Drawing.Point(36, 490); |
|
132 |
this.toggleSwitchSnapGrid.Name = "toggleSwitchSnapGrid"; |
|
133 |
this.toggleSwitchSnapGrid.Properties.OffText = "Off"; |
|
134 |
this.toggleSwitchSnapGrid.Properties.OnText = "On"; |
|
135 |
this.toggleSwitchSnapGrid.Size = new System.Drawing.Size(178, 19); |
|
136 |
this.toggleSwitchSnapGrid.StyleController = this.layoutControl1; |
|
137 |
this.toggleSwitchSnapGrid.TabIndex = 16; |
|
138 |
this.toggleSwitchSnapGrid.Toggled += new System.EventHandler(this.toggleSwitchSnapGrid_Toggled); |
|
139 |
// |
|
140 |
// labelControl2 |
|
141 |
// |
|
142 |
this.labelControl2.Location = new System.Drawing.Point(36, 558); |
|
143 |
this.labelControl2.Name = "labelControl2"; |
|
144 |
this.labelControl2.Size = new System.Drawing.Size(106, 14); |
|
145 |
this.labelControl2.StyleController = this.layoutControl1; |
|
146 |
this.labelControl2.TabIndex = 15; |
|
147 |
this.labelControl2.Text = "Key : Shift + Arrow"; |
|
148 |
// |
|
149 |
// toggleSwitchMoveSymbol |
|
150 |
// |
|
151 |
this.toggleSwitchMoveSymbol.Location = new System.Drawing.Point(36, 576); |
|
152 |
this.toggleSwitchMoveSymbol.Name = "toggleSwitchMoveSymbol"; |
|
153 |
this.toggleSwitchMoveSymbol.Properties.OffText = "Off"; |
|
154 |
this.toggleSwitchMoveSymbol.Properties.OnText = "On"; |
|
155 |
this.toggleSwitchMoveSymbol.Size = new System.Drawing.Size(178, 19); |
|
156 |
this.toggleSwitchMoveSymbol.StyleController = this.layoutControl1; |
|
157 |
this.toggleSwitchMoveSymbol.TabIndex = 14; |
|
158 |
this.toggleSwitchMoveSymbol.Toggled += new System.EventHandler(this.toggleSwitchMoveSymbol_Toggled); |
|
159 |
// |
|
111 | 160 |
// btnSpecBreakRelocation |
112 | 161 |
// |
113 | 162 |
this.btnSpecBreakRelocation.ImageOptions.SvgImage = global::Converter.SPPID.Properties.Resources.newrecurringappointment; |
114 | 163 |
this.btnSpecBreakRelocation.Location = new System.Drawing.Point(24, 354); |
115 | 164 |
this.btnSpecBreakRelocation.Name = "btnSpecBreakRelocation"; |
116 |
this.btnSpecBreakRelocation.Size = new System.Drawing.Size(185, 36);
|
|
165 |
this.btnSpecBreakRelocation.Size = new System.Drawing.Size(202, 36);
|
|
117 | 166 |
this.btnSpecBreakRelocation.StyleController = this.layoutControl1; |
118 | 167 |
this.btnSpecBreakRelocation.TabIndex = 13; |
119 | 168 |
this.btnSpecBreakRelocation.Text = "SpecBreak Relocation"; |
... | ... | |
140 | 189 |
0, |
141 | 190 |
0, |
142 | 191 |
0}); |
143 |
this.spinEditSymmetry.Size = new System.Drawing.Size(90, 20);
|
|
192 |
this.spinEditSymmetry.Size = new System.Drawing.Size(107, 20);
|
|
144 | 193 |
this.spinEditSymmetry.StyleController = this.layoutControl1; |
145 | 194 |
this.spinEditSymmetry.TabIndex = 12; |
146 | 195 |
// |
... | ... | |
149 | 198 |
this.btnSymmetry.ImageOptions.SvgImage = global::Converter.SPPID.Properties.Resources.productquickcomparisons; |
150 | 199 |
this.btnSymmetry.Location = new System.Drawing.Point(24, 313); |
151 | 200 |
this.btnSymmetry.Name = "btnSymmetry"; |
152 |
this.btnSymmetry.Size = new System.Drawing.Size(185, 36);
|
|
201 |
this.btnSymmetry.Size = new System.Drawing.Size(202, 36);
|
|
153 | 202 |
this.btnSymmetry.StyleController = this.layoutControl1; |
154 | 203 |
this.btnSymmetry.TabIndex = 11; |
155 | 204 |
this.btnSymmetry.Text = "Symbol Symmetry"; |
... | ... | |
157 | 206 |
// |
158 | 207 |
// labelControl1 |
159 | 208 |
// |
160 |
this.labelControl1.Location = new System.Drawing.Point(24, 439);
|
|
209 |
this.labelControl1.Location = new System.Drawing.Point(36, 472);
|
|
161 | 210 |
this.labelControl1.Name = "labelControl1"; |
162 |
this.labelControl1.Size = new System.Drawing.Size(179, 14);
|
|
211 |
this.labelControl1.Size = new System.Drawing.Size(81, 14);
|
|
163 | 212 |
this.labelControl1.StyleController = this.layoutControl1; |
164 | 213 |
this.labelControl1.TabIndex = 10; |
165 |
this.labelControl1.Text = "Snap Grid On/Off Key : Shift + A";
|
|
214 |
this.labelControl1.Text = "Key : Shift + A"; |
|
166 | 215 |
// |
167 | 216 |
// btnLinkOPC |
168 | 217 |
// |
169 | 218 |
this.btnLinkOPC.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnLinkOPC.ImageOptions.SvgImage"))); |
170 | 219 |
this.btnLinkOPC.Location = new System.Drawing.Point(24, 85); |
171 | 220 |
this.btnLinkOPC.Name = "btnLinkOPC"; |
172 |
this.btnLinkOPC.Size = new System.Drawing.Size(185, 36);
|
|
221 |
this.btnLinkOPC.Size = new System.Drawing.Size(202, 36);
|
|
173 | 222 |
this.btnLinkOPC.StyleController = this.layoutControl1; |
174 | 223 |
this.btnLinkOPC.TabIndex = 9; |
175 | 224 |
this.btnLinkOPC.Text = "Link OPC"; |
... | ... | |
179 | 228 |
// |
180 | 229 |
this.btnGetDrawingSize.Location = new System.Drawing.Point(24, 170); |
181 | 230 |
this.btnGetDrawingSize.Name = "btnGetDrawingSize"; |
182 |
this.btnGetDrawingSize.Size = new System.Drawing.Size(185, 22);
|
|
231 |
this.btnGetDrawingSize.Size = new System.Drawing.Size(202, 22);
|
|
183 | 232 |
this.btnGetDrawingSize.StyleController = this.layoutControl1; |
184 | 233 |
this.btnGetDrawingSize.TabIndex = 8; |
185 | 234 |
this.btnGetDrawingSize.Text = "Get Drawing Size"; |
... | ... | |
192 | 241 |
this.textEditDrawingY.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; |
193 | 242 |
this.textEditDrawingY.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric; |
194 | 243 |
this.textEditDrawingY.Properties.ReadOnly = true; |
195 |
this.textEditDrawingY.Size = new System.Drawing.Size(165, 20);
|
|
244 |
this.textEditDrawingY.Size = new System.Drawing.Size(182, 20);
|
|
196 | 245 |
this.textEditDrawingY.StyleController = this.layoutControl1; |
197 | 246 |
this.textEditDrawingY.TabIndex = 7; |
198 | 247 |
// |
... | ... | |
203 | 252 |
this.textEditDrawingX.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; |
204 | 253 |
this.textEditDrawingX.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric; |
205 | 254 |
this.textEditDrawingX.Properties.ReadOnly = true; |
206 |
this.textEditDrawingX.Size = new System.Drawing.Size(165, 20);
|
|
255 |
this.textEditDrawingX.Size = new System.Drawing.Size(182, 20);
|
|
207 | 256 |
this.textEditDrawingX.StyleController = this.layoutControl1; |
208 | 257 |
this.textEditDrawingX.TabIndex = 6; |
209 | 258 |
// |
210 | 259 |
// simpleButton1 |
211 | 260 |
// |
212 |
this.simpleButton1.Location = new System.Drawing.Point(12, 469);
|
|
261 |
this.simpleButton1.Location = new System.Drawing.Point(12, 623);
|
|
213 | 262 |
this.simpleButton1.Name = "simpleButton1"; |
214 |
this.simpleButton1.Size = new System.Drawing.Size(209, 22);
|
|
263 |
this.simpleButton1.Size = new System.Drawing.Size(226, 22);
|
|
215 | 264 |
this.simpleButton1.StyleController = this.layoutControl1; |
216 | 265 |
this.simpleButton1.TabIndex = 5; |
217 | 266 |
this.simpleButton1.Text = "simpleButton1"; |
... | ... | |
222 | 271 |
this.btnSPPIDConverter.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnSPPIDConverter.ImageOptions.SvgImage"))); |
223 | 272 |
this.btnSPPIDConverter.Location = new System.Drawing.Point(24, 45); |
224 | 273 |
this.btnSPPIDConverter.Name = "btnSPPIDConverter"; |
225 |
this.btnSPPIDConverter.Size = new System.Drawing.Size(185, 36);
|
|
274 |
this.btnSPPIDConverter.Size = new System.Drawing.Size(202, 36);
|
|
226 | 275 |
this.btnSPPIDConverter.StyleController = this.layoutControl1; |
227 | 276 |
this.btnSPPIDConverter.TabIndex = 4; |
228 | 277 |
this.btnSPPIDConverter.Text = "Open Converter"; |
... | ... | |
240 | 289 |
this.layoutControlGroup3, |
241 | 290 |
this.layoutControlGroup4}); |
242 | 291 |
this.Root.Name = "Root"; |
243 |
this.Root.Size = new System.Drawing.Size(233, 513);
|
|
292 |
this.Root.Size = new System.Drawing.Size(250, 744);
|
|
244 | 293 |
this.Root.TextVisible = false; |
245 | 294 |
// |
246 | 295 |
// emptySpaceItem1 |
247 | 296 |
// |
248 | 297 |
this.emptySpaceItem1.AllowHotTrack = false; |
249 |
this.emptySpaceItem1.Location = new System.Drawing.Point(0, 483);
|
|
298 |
this.emptySpaceItem1.Location = new System.Drawing.Point(0, 637);
|
|
250 | 299 |
this.emptySpaceItem1.Name = "emptySpaceItem1"; |
251 |
this.emptySpaceItem1.Size = new System.Drawing.Size(213, 10);
|
|
300 |
this.emptySpaceItem1.Size = new System.Drawing.Size(230, 87);
|
|
252 | 301 |
this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); |
253 | 302 |
// |
254 | 303 |
// layoutControlItem2 |
255 | 304 |
// |
256 | 305 |
this.layoutControlItem2.Control = this.simpleButton1; |
257 |
this.layoutControlItem2.Location = new System.Drawing.Point(0, 457);
|
|
306 |
this.layoutControlItem2.Location = new System.Drawing.Point(0, 611);
|
|
258 | 307 |
this.layoutControlItem2.Name = "layoutControlItem2"; |
259 |
this.layoutControlItem2.Size = new System.Drawing.Size(213, 26);
|
|
308 |
this.layoutControlItem2.Size = new System.Drawing.Size(230, 26);
|
|
260 | 309 |
this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); |
261 | 310 |
this.layoutControlItem2.TextVisible = false; |
262 | 311 |
this.layoutControlItem2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.OnlyInCustomization; |
... | ... | |
269 | 318 |
this.layoutControlItem5}); |
270 | 319 |
this.layoutControlGroup1.Location = new System.Drawing.Point(0, 125); |
271 | 320 |
this.layoutControlGroup1.Name = "layoutControlGroup1"; |
272 |
this.layoutControlGroup1.Size = new System.Drawing.Size(213, 119);
|
|
321 |
this.layoutControlGroup1.Size = new System.Drawing.Size(230, 119);
|
|
273 | 322 |
this.layoutControlGroup1.Text = "Drawing Size Setting"; |
274 | 323 |
// |
275 | 324 |
// layoutControlItem3 |
... | ... | |
277 | 326 |
this.layoutControlItem3.Control = this.textEditDrawingX; |
278 | 327 |
this.layoutControlItem3.Location = new System.Drawing.Point(0, 26); |
279 | 328 |
this.layoutControlItem3.Name = "layoutControlItem3"; |
280 |
this.layoutControlItem3.Size = new System.Drawing.Size(189, 24);
|
|
329 |
this.layoutControlItem3.Size = new System.Drawing.Size(206, 24);
|
|
281 | 330 |
this.layoutControlItem3.Text = "X"; |
282 | 331 |
this.layoutControlItem3.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize; |
283 | 332 |
this.layoutControlItem3.TextSize = new System.Drawing.Size(15, 14); |
... | ... | |
288 | 337 |
this.layoutControlItem4.Control = this.textEditDrawingY; |
289 | 338 |
this.layoutControlItem4.Location = new System.Drawing.Point(0, 50); |
290 | 339 |
this.layoutControlItem4.Name = "layoutControlItem4"; |
291 |
this.layoutControlItem4.Size = new System.Drawing.Size(189, 24);
|
|
340 |
this.layoutControlItem4.Size = new System.Drawing.Size(206, 24);
|
|
292 | 341 |
this.layoutControlItem4.Text = "Y"; |
293 | 342 |
this.layoutControlItem4.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.CustomSize; |
294 | 343 |
this.layoutControlItem4.TextSize = new System.Drawing.Size(15, 14); |
... | ... | |
299 | 348 |
this.layoutControlItem5.Control = this.btnGetDrawingSize; |
300 | 349 |
this.layoutControlItem5.Location = new System.Drawing.Point(0, 0); |
301 | 350 |
this.layoutControlItem5.Name = "layoutControlItem5"; |
302 |
this.layoutControlItem5.Size = new System.Drawing.Size(189, 26);
|
|
351 |
this.layoutControlItem5.Size = new System.Drawing.Size(206, 26);
|
|
303 | 352 |
this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0); |
304 | 353 |
this.layoutControlItem5.TextVisible = false; |
305 | 354 |
// |
... | ... | |
310 | 359 |
this.layoutControlItem6}); |
311 | 360 |
this.layoutControlGroup2.Location = new System.Drawing.Point(0, 0); |
312 | 361 |
this.layoutControlGroup2.Name = "layoutControlGroup2"; |
313 |
this.layoutControlGroup2.Size = new System.Drawing.Size(213, 125);
|
|
362 |
this.layoutControlGroup2.Size = new System.Drawing.Size(230, 125);
|
|
314 | 363 |
this.layoutControlGroup2.Text = "Converter"; |
315 | 364 |
// |
316 | 365 |
// layoutControlItem1 |
... | ... | |
318 | 367 |
this.layoutControlItem1.Control = this.btnSPPIDConverter; |
319 | 368 |
this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); |
320 | 369 |
this.layoutControlItem1.Name = "layoutControlItem1"; |
321 |
this.layoutControlItem1.Size = new System.Drawing.Size(189, 40);
|
|
370 |
this.layoutControlItem1.Size = new System.Drawing.Size(206, 40);
|
|
322 | 371 |
this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); |
323 | 372 |
this.layoutControlItem1.TextVisible = false; |
324 | 373 |
// |
... | ... | |
327 | 376 |
this.layoutControlItem6.Control = this.btnLinkOPC; |
328 | 377 |
this.layoutControlItem6.Location = new System.Drawing.Point(0, 40); |
329 | 378 |
this.layoutControlItem6.Name = "layoutControlItem6"; |
330 |
this.layoutControlItem6.Size = new System.Drawing.Size(189, 40);
|
|
379 |
this.layoutControlItem6.Size = new System.Drawing.Size(206, 40);
|
|
331 | 380 |
this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0); |
332 | 381 |
this.layoutControlItem6.TextVisible = false; |
333 | 382 |
// |
... | ... | |
340 | 389 |
this.simpleSeparator1}); |
341 | 390 |
this.layoutControlGroup3.Location = new System.Drawing.Point(0, 244); |
342 | 391 |
this.layoutControlGroup3.Name = "layoutControlGroup3"; |
343 |
this.layoutControlGroup3.Size = new System.Drawing.Size(213, 150);
|
|
392 |
this.layoutControlGroup3.Size = new System.Drawing.Size(230, 150);
|
|
344 | 393 |
this.layoutControlGroup3.Text = "SPPID Utils"; |
345 | 394 |
// |
346 | 395 |
// layoutControlItem8 |
... | ... | |
348 | 397 |
this.layoutControlItem8.Control = this.btnSymmetry; |
349 | 398 |
this.layoutControlItem8.Location = new System.Drawing.Point(0, 24); |
350 | 399 |
this.layoutControlItem8.Name = "layoutControlItem8"; |
351 |
this.layoutControlItem8.Size = new System.Drawing.Size(189, 40);
|
|
400 |
this.layoutControlItem8.Size = new System.Drawing.Size(206, 40);
|
|
352 | 401 |
this.layoutControlItem8.TextSize = new System.Drawing.Size(0, 0); |
353 | 402 |
this.layoutControlItem8.TextVisible = false; |
354 | 403 |
// |
... | ... | |
357 | 406 |
this.layoutControlItem9.Control = this.spinEditSymmetry; |
358 | 407 |
this.layoutControlItem9.Location = new System.Drawing.Point(0, 0); |
359 | 408 |
this.layoutControlItem9.Name = "layoutControlItem9"; |
360 |
this.layoutControlItem9.Size = new System.Drawing.Size(189, 24);
|
|
409 |
this.layoutControlItem9.Size = new System.Drawing.Size(206, 24);
|
|
361 | 410 |
this.layoutControlItem9.Text = "Symmetry Count"; |
362 | 411 |
this.layoutControlItem9.TextSize = new System.Drawing.Size(92, 14); |
363 | 412 |
// |
... | ... | |
366 | 415 |
this.layoutControlItem10.Control = this.btnSpecBreakRelocation; |
367 | 416 |
this.layoutControlItem10.Location = new System.Drawing.Point(0, 65); |
368 | 417 |
this.layoutControlItem10.Name = "layoutControlItem10"; |
369 |
this.layoutControlItem10.Size = new System.Drawing.Size(189, 40);
|
|
418 |
this.layoutControlItem10.Size = new System.Drawing.Size(206, 40);
|
|
370 | 419 |
this.layoutControlItem10.TextSize = new System.Drawing.Size(0, 0); |
371 | 420 |
this.layoutControlItem10.TextVisible = false; |
372 | 421 |
// |
... | ... | |
375 | 424 |
this.simpleSeparator1.AllowHotTrack = false; |
376 | 425 |
this.simpleSeparator1.Location = new System.Drawing.Point(0, 64); |
377 | 426 |
this.simpleSeparator1.Name = "simpleSeparator1"; |
378 |
this.simpleSeparator1.Size = new System.Drawing.Size(189, 1);
|
|
427 |
this.simpleSeparator1.Size = new System.Drawing.Size(206, 1);
|
|
379 | 428 |
// |
380 | 429 |
// layoutControlGroup4 |
381 | 430 |
// |
382 | 431 |
this.layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { |
383 |
this.layoutControlItem7}); |
|
432 |
this.layoutControlGroup5, |
|
433 |
this.layoutControlGroup6}); |
|
384 | 434 |
this.layoutControlGroup4.Location = new System.Drawing.Point(0, 394); |
385 | 435 |
this.layoutControlGroup4.Name = "layoutControlGroup4"; |
386 |
this.layoutControlGroup4.Size = new System.Drawing.Size(213, 63);
|
|
436 |
this.layoutControlGroup4.Size = new System.Drawing.Size(230, 217);
|
|
387 | 437 |
this.layoutControlGroup4.Text = "Keyboard Shortcut"; |
388 | 438 |
// |
439 |
// layoutControlGroup5 |
|
440 |
// |
|
441 |
this.layoutControlGroup5.CustomizationFormText = "Snap Grid"; |
|
442 |
this.layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { |
|
443 |
this.layoutControlItem7, |
|
444 |
this.layoutControlItem13}); |
|
445 |
this.layoutControlGroup5.Location = new System.Drawing.Point(0, 0); |
|
446 |
this.layoutControlGroup5.Name = "layoutControlGroup5"; |
|
447 |
this.layoutControlGroup5.Size = new System.Drawing.Size(206, 86); |
|
448 |
this.layoutControlGroup5.Text = "Snap Grid"; |
|
449 |
// |
|
389 | 450 |
// layoutControlItem7 |
390 | 451 |
// |
391 | 452 |
this.layoutControlItem7.Control = this.labelControl1; |
392 | 453 |
this.layoutControlItem7.Location = new System.Drawing.Point(0, 0); |
393 | 454 |
this.layoutControlItem7.Name = "layoutControlItem7"; |
394 |
this.layoutControlItem7.Size = new System.Drawing.Size(189, 18);
|
|
455 |
this.layoutControlItem7.Size = new System.Drawing.Size(182, 18);
|
|
395 | 456 |
this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0); |
396 | 457 |
this.layoutControlItem7.TextVisible = false; |
397 | 458 |
// |
459 |
// layoutControlItem13 |
|
460 |
// |
|
461 |
this.layoutControlItem13.Control = this.toggleSwitchSnapGrid; |
|
462 |
this.layoutControlItem13.Location = new System.Drawing.Point(0, 18); |
|
463 |
this.layoutControlItem13.Name = "layoutControlItem13"; |
|
464 |
this.layoutControlItem13.Size = new System.Drawing.Size(182, 23); |
|
465 |
this.layoutControlItem13.TextSize = new System.Drawing.Size(0, 0); |
|
466 |
this.layoutControlItem13.TextVisible = false; |
|
467 |
// |
|
468 |
// layoutControlGroup6 |
|
469 |
// |
|
470 |
this.layoutControlGroup6.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { |
|
471 |
this.layoutControlItem12, |
|
472 |
this.layoutControlItem11}); |
|
473 |
this.layoutControlGroup6.Location = new System.Drawing.Point(0, 86); |
|
474 |
this.layoutControlGroup6.Name = "layoutControlGroup6"; |
|
475 |
this.layoutControlGroup6.Size = new System.Drawing.Size(206, 86); |
|
476 |
this.layoutControlGroup6.Text = "Move Symbol (Selected)"; |
|
477 |
// |
|
478 |
// layoutControlItem12 |
|
479 |
// |
|
480 |
this.layoutControlItem12.Control = this.labelControl2; |
|
481 |
this.layoutControlItem12.Location = new System.Drawing.Point(0, 0); |
|
482 |
this.layoutControlItem12.Name = "layoutControlItem12"; |
|
483 |
this.layoutControlItem12.Size = new System.Drawing.Size(182, 18); |
|
484 |
this.layoutControlItem12.TextSize = new System.Drawing.Size(0, 0); |
|
485 |
this.layoutControlItem12.TextVisible = false; |
|
486 |
// |
|
487 |
// layoutControlItem11 |
|
488 |
// |
|
489 |
this.layoutControlItem11.Control = this.toggleSwitchMoveSymbol; |
|
490 |
this.layoutControlItem11.Location = new System.Drawing.Point(0, 18); |
|
491 |
this.layoutControlItem11.Name = "layoutControlItem11"; |
|
492 |
this.layoutControlItem11.Size = new System.Drawing.Size(182, 23); |
|
493 |
this.layoutControlItem11.TextSize = new System.Drawing.Size(0, 0); |
|
494 |
this.layoutControlItem11.TextVisible = false; |
|
495 |
// |
|
398 | 496 |
// defaultLookAndFeel |
399 | 497 |
// |
400 | 498 |
this.defaultLookAndFeel.LookAndFeel.SkinName = "Office 2019 Colorful"; |
... | ... | |
405 | 503 |
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
406 | 504 |
this.Controls.Add(this.layoutControl1); |
407 | 505 |
this.Name = "ConverterDocking"; |
408 |
this.Size = new System.Drawing.Size(250, 500);
|
|
506 |
this.Size = new System.Drawing.Size(250, 744);
|
|
409 | 507 |
this.Load += new System.EventHandler(this.ConverterDocking_Load); |
410 | 508 |
((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); |
411 | 509 |
this.layoutControl1.ResumeLayout(false); |
510 |
((System.ComponentModel.ISupportInitialize)(this.toggleSwitchSnapGrid.Properties)).EndInit(); |
|
511 |
((System.ComponentModel.ISupportInitialize)(this.toggleSwitchMoveSymbol.Properties)).EndInit(); |
|
412 | 512 |
((System.ComponentModel.ISupportInitialize)(this.spinEditSymmetry.Properties)).EndInit(); |
413 | 513 |
((System.ComponentModel.ISupportInitialize)(this.textEditDrawingY.Properties)).EndInit(); |
414 | 514 |
((System.ComponentModel.ISupportInitialize)(this.textEditDrawingX.Properties)).EndInit(); |
... | ... | |
428 | 528 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit(); |
429 | 529 |
((System.ComponentModel.ISupportInitialize)(this.simpleSeparator1)).EndInit(); |
430 | 530 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup4)).EndInit(); |
531 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup5)).EndInit(); |
|
431 | 532 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); |
533 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit(); |
|
534 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup6)).EndInit(); |
|
535 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit(); |
|
536 |
((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit(); |
|
432 | 537 |
this.ResumeLayout(false); |
433 | 538 |
|
434 | 539 |
} |
... | ... | |
464 | 569 |
private DevExpress.XtraEditors.SimpleButton btnSpecBreakRelocation; |
465 | 570 |
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10; |
466 | 571 |
private DevExpress.XtraLayout.SimpleSeparator simpleSeparator1; |
572 |
private DevExpress.XtraEditors.ToggleSwitch toggleSwitchMoveSymbol; |
|
573 |
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; |
|
574 |
private DevExpress.XtraEditors.LabelControl labelControl2; |
|
575 |
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12; |
|
576 |
private DevExpress.XtraEditors.ToggleSwitch toggleSwitchSnapGrid; |
|
577 |
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; |
|
578 |
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13; |
|
579 |
private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup6; |
|
467 | 580 |
} |
468 | 581 |
} |
DTI_PID/SPPIDConverter/ConverterDocking.cs | ||
---|---|---|
78 | 78 |
application.EventObject.BeforeApplicationExit += ApplicationEvents_ApplicationExit; |
79 | 79 |
addEvent = true; |
80 | 80 |
} |
81 |
RegisterHotKey(this.Handle, 0, (int)KeyModifier.Shift, Keys.A.GetHashCode()); |
|
82 | 81 |
} |
83 | 82 |
catch (Exception ex) |
84 | 83 |
{ |
... | ... | |
246 | 245 |
} |
247 | 246 |
|
248 | 247 |
#region SPPID Utils |
248 |
|
|
249 | 249 |
#region Symmetry |
250 | 250 |
private void btnSymmetry_Click(object sender, EventArgs e) |
251 | 251 |
{ |
... | ... | |
815 | 815 |
return false; |
816 | 816 |
} |
817 | 817 |
#endregion |
818 |
|
|
818 | 819 |
#region SpecBreak |
819 | 820 |
private void btnSpecBreakRelocation_Click(object sender, EventArgs e) |
820 | 821 |
{ |
... | ... | |
1088 | 1089 |
|
1089 | 1090 |
} |
1090 | 1091 |
#endregion |
1092 |
|
|
1091 | 1093 |
#region Hot Key |
1094 |
private void toggleSwitchSnapGrid_Toggled(object sender, EventArgs e) |
|
1095 |
{ |
|
1096 |
if (toggleSwitchSnapGrid.IsOn) |
|
1097 |
{ |
|
1098 |
RegisterHotKey(this.Handle, 0, (int)KeyModifier.Shift, Keys.A.GetHashCode()); |
|
1099 |
} |
|
1100 |
else |
|
1101 |
{ |
|
1102 |
UnregisterHotKey(this.Handle, 0); |
|
1103 |
} |
|
1104 |
} |
|
1105 |
private void toggleSwitchMoveSymbol_Toggled(object sender, EventArgs e) |
|
1106 |
{ |
|
1107 |
if (toggleSwitchMoveSymbol.IsOn) |
|
1108 |
{ |
|
1109 |
RegisterHotKey(this.Handle, 1, (int)KeyModifier.Shift, Keys.Left.GetHashCode()); |
|
1110 |
RegisterHotKey(this.Handle, 2, (int)KeyModifier.Shift, Keys.Up.GetHashCode()); |
|
1111 |
RegisterHotKey(this.Handle, 3, (int)KeyModifier.Shift, Keys.Right.GetHashCode()); |
|
1112 |
RegisterHotKey(this.Handle, 4, (int)KeyModifier.Shift, Keys.Down.GetHashCode()); |
|
1113 |
} |
|
1114 |
else |
|
1115 |
{ |
|
1116 |
UnregisterHotKey(this.Handle, 1); |
|
1117 |
UnregisterHotKey(this.Handle, 2); |
|
1118 |
UnregisterHotKey(this.Handle, 3); |
|
1119 |
UnregisterHotKey(this.Handle, 4); |
|
1120 |
} |
|
1121 |
} |
|
1122 |
public void ClearHotKey() |
|
1123 |
{ |
|
1124 |
if (toggleSwitchMoveSymbol.IsOn) |
|
1125 |
{ |
|
1126 |
UnregisterHotKey(this.Handle, 1); |
|
1127 |
UnregisterHotKey(this.Handle, 2); |
|
1128 |
UnregisterHotKey(this.Handle, 3); |
|
1129 |
UnregisterHotKey(this.Handle, 4); |
|
1130 |
} |
|
1131 |
if (toggleSwitchSnapGrid.IsOn) |
|
1132 |
{ |
|
1133 |
UnregisterHotKey(this.Handle, 0); |
|
1134 |
} |
|
1135 |
} |
|
1092 | 1136 |
[System.Runtime.InteropServices.DllImport("user32.dll")] |
1093 | 1137 |
private static extern bool RegisterHotKey(IntPtr hWnd, int id, int fsModifiers, int vk); |
1094 | 1138 |
[System.Runtime.InteropServices.DllImport("user32.dll")] |
... | ... | |
1109 | 1153 |
Keys key = (Keys)(((int)m.LParam >> 16) & 0xFFFF); |
1110 | 1154 |
KeyModifier modifier = (KeyModifier)((int)m.LParam & 0xFFFF); |
1111 | 1155 |
int id = m.WParam.ToInt32(); |
1112 |
application.RunCommand(CommandConstants.igcmdGridSnap); |
|
1156 |
switch (id) |
|
1157 |
{ |
|
1158 |
case 0: |
|
1159 |
application.RunCommand(CommandConstants.igcmdGridSnap); |
|
1160 |
break; |
|
1161 |
case 1: |
|
1162 |
MoveSymbol(Arrow.Left); |
|
1163 |
break; |
|
1164 |
case 2: |
|
1165 |
MoveSymbol(Arrow.Up); |
|
1166 |
break; |
|
1167 |
case 3: |
|
1168 |
MoveSymbol(Arrow.Right); |
|
1169 |
break; |
|
1170 |
case 4: |
|
1171 |
MoveSymbol(Arrow.Down); |
|
1172 |
break; |
|
1173 |
default: |
|
1174 |
break; |
|
1175 |
} |
|
1176 |
|
|
1113 | 1177 |
} |
1114 | 1178 |
|
1115 | 1179 |
} |
1116 | 1180 |
#endregion |
1181 |
|
|
1182 |
#region Move Symbol |
|
1183 |
enum Arrow |
|
1184 |
{ |
|
1185 |
Left, |
|
1186 |
Up, |
|
1187 |
Right, |
|
1188 |
Down |
|
1189 |
} |
|
1190 |
private void MoveSymbol(Arrow arrow) |
|
1191 |
{ |
|
1192 |
if (application.ActiveSelectSet.Count > 0) |
|
1193 |
{ |
|
1194 |
Placement placement = new Placement(); |
|
1195 |
LMADataSource dataSource = placement.PIDDataSource; |
|
1196 |
System.Collections.ObjectModel.Collection<DrawingObjectBase> drawingObjectBases = new System.Collections.ObjectModel.Collection<DrawingObjectBase>(); |
|
1197 |
Transform transform = null; |
|
1198 |
foreach (DrawingObjectBase drawingObject in application.ActiveSelectSet) |
|
1199 |
{ |
|
1200 |
Symbol2d symbol2D = drawingObject as Symbol2d; |
|
1201 |
if (symbol2D != null) |
|
1202 |
{ |
|
1203 |
if (transform == null) |
|
1204 |
transform = symbol2D.GetTransform(); |
|
1205 |
drawingObjectBases.Add(symbol2D); |
|
1206 |
LMSymbol _LMSymbol = dataSource.GetSymbol(GetRepresentationId(symbol2D)); |
|
1207 |
if (_LMSymbol != null) |
|
1208 |
{ |
|
1209 |
foreach (LMConnector connector in _LMSymbol.Connect1Connectors) |
|
1210 |
{ |
|
1211 |
if (connector.get_ItemStatus() == "Active") |
|
1212 |
{ |
|
1213 |
#region Zero Length And Branch |
|
1214 |
if (Convert.ToBoolean(connector.get_IsZeroLength())) |
|
1215 |
{ |
|
1216 |
if (connector.ConnectItem1SymbolObject != null && connector.ConnectItem1SymbolID != _LMSymbol.Id) |
|
1217 |
{ |
|
1218 |
Point2d point2D = application.ActiveDocument.ActiveSheet.DrawingObjects[connector.ConnectItem1SymbolObject.get_GraphicOID().ToString()] as Point2d; |
|
1219 |
if (point2D != null && !drawingObjectBases.Contains(point2D)) |
|
1220 |
drawingObjectBases.Add(point2D); |
|
1221 |
} |
|
1222 |
else if (connector.ConnectItem2SymbolObject != null && connector.ConnectItem2SymbolID != _LMSymbol.Id) |
|
1223 |
{ |
|
1224 |
Point2d point2D = application.ActiveDocument.ActiveSheet.DrawingObjects[connector.ConnectItem2SymbolObject.get_GraphicOID().ToString()] as Point2d; |
|
1225 |
if (point2D != null && !drawingObjectBases.Contains(point2D)) |
|
1226 |
drawingObjectBases.Add(point2D); |
|
1227 |
} |
|
1228 |
} |
|
1229 |
#endregion |
|
1230 |
#region Not Zero Length And Branch And Vertical,Horizontal |
|
1231 |
else |
|
1232 |
{ |
|
1233 |
if (connector.ConnectItem1SymbolObject != null && |
|
1234 |
connector.ConnectItem1SymbolID != _LMSymbol.Id && |
|
1235 |
connector.ConnectItem1SymbolObject.get_ItemStatus() == "Active" && |
|
1236 |
connector.ConnectItem1SymbolObject.get_RepresentationType() == "Branch" && |
|
1237 |
IsMovePoint2D(connector.ConnectItem1SymbolObject, connector, arrow)) |
|
1238 |
{ |
|
1239 |
Point2d point2D = application.ActiveDocument.ActiveSheet.DrawingObjects[connector.ConnectItem1SymbolObject.get_GraphicOID().ToString()] as Point2d; |
|
1240 |
if (point2D != null && !drawingObjectBases.Contains(point2D)) |
|
1241 |
drawingObjectBases.Add(point2D); |
|
1242 |
} |
|
1243 |
|
|
1244 |
else if (connector.ConnectItem2SymbolObject != null && |
|
1245 |
connector.ConnectItem2SymbolID != _LMSymbol.Id && |
|
1246 |
connector.ConnectItem2SymbolObject.get_ItemStatus() == "Active" && |
|
1247 |
connector.ConnectItem2SymbolObject.get_RepresentationType() == "Branch" && |
|
1248 |
IsMovePoint2D(connector.ConnectItem2SymbolObject, connector, arrow)) |
|
1249 |
{ |
|
1250 |
Point2d point2D = application.ActiveDocument.ActiveSheet.DrawingObjects[connector.ConnectItem2SymbolObject.get_GraphicOID().ToString()] as Point2d; |
|
1251 |
if (point2D != null && !drawingObjectBases.Contains(point2D)) |
|
1252 |
drawingObjectBases.Add(point2D); |
|
1253 |
} |
|
1254 |
|
|
1255 |
} |
|
1256 |
#endregion |
|
1257 |
} |
|
1258 |
} |
|
1259 |
foreach (LMConnector connector in _LMSymbol.Connect2Connectors) |
|
1260 |
{ |
|
1261 |
if (connector.get_ItemStatus() == "Active") |
|
1262 |
{ |
|
1263 |
#region Zero Length And Branch |
|
1264 |
if (Convert.ToBoolean(connector.get_IsZeroLength())) |
|
1265 |
{ |
|
1266 |
if (connector.ConnectItem1SymbolObject != null && connector.ConnectItem1SymbolID != _LMSymbol.Id) |
|
1267 |
{ |
|
1268 |
Point2d point2D = application.ActiveDocument.ActiveSheet.DrawingObjects[connector.ConnectItem1SymbolObject.get_GraphicOID().ToString()] as Point2d; |
|
1269 |
if (point2D != null && !drawingObjectBases.Contains(point2D)) |
|
1270 |
drawingObjectBases.Add(point2D); |
|
1271 |
} |
|
1272 |
else if (connector.ConnectItem2SymbolObject != null && connector.ConnectItem2SymbolID != _LMSymbol.Id) |
|
1273 |
{ |
|
1274 |
Point2d point2D = application.ActiveDocument.ActiveSheet.DrawingObjects[connector.ConnectItem2SymbolObject.get_GraphicOID().ToString()] as Point2d; |
|
1275 |
if (point2D != null && !drawingObjectBases.Contains(point2D)) |
|
1276 |
drawingObjectBases.Add(point2D); |
|
1277 |
} |
|
1278 |
} |
|
1279 |
#endregion |
|
1280 |
#region Not Zero Length And Branch And Vertical,Horizontal |
|
1281 |
else |
|
1282 |
{ |
|
1283 |
if (connector.ConnectItem1SymbolObject != null && |
|
1284 |
connector.ConnectItem1SymbolID != _LMSymbol.Id && |
|
1285 |
connector.ConnectItem1SymbolObject.get_ItemStatus() == "Active" && |
|
1286 |
connector.ConnectItem1SymbolObject.get_RepresentationType() == "Branch" && |
|
1287 |
IsMovePoint2D(connector.ConnectItem1SymbolObject, connector, arrow)) |
|
1288 |
{ |
|
1289 |
Point2d point2D = application.ActiveDocument.ActiveSheet.DrawingObjects[connector.ConnectItem1SymbolObject.get_GraphicOID().ToString()] as Point2d; |
|
1290 |
if (point2D != null && !drawingObjectBases.Contains(point2D)) |
|
1291 |
drawingObjectBases.Add(point2D); |
|
1292 |
} |
|
1293 |
|
|
1294 |
else if (connector.ConnectItem2SymbolObject != null && |
|
1295 |
connector.ConnectItem2SymbolID != _LMSymbol.Id && |
|
1296 |
connector.ConnectItem2SymbolObject.get_ItemStatus() == "Active" && |
|
1297 |
connector.ConnectItem2SymbolObject.get_RepresentationType() == "Branch" && |
|
1298 |
IsMovePoint2D(connector.ConnectItem2SymbolObject, connector, arrow)) |
|
1299 |
{ |
|
1300 |
Point2d point2D = application.ActiveDocument.ActiveSheet.DrawingObjects[connector.ConnectItem2SymbolObject.get_GraphicOID().ToString()] as Point2d; |
|
1301 |
if (point2D != null && !drawingObjectBases.Contains(point2D)) |
|
1302 |
drawingObjectBases.Add(point2D); |
|
1303 |
} |
|
1304 |
|
|
1305 |
} |
|
1306 |
#endregion |
|
1307 |
} |
|
1308 |
} |
|
1309 |
} |
|
1310 |
ReleaseCOMObjects(_LMSymbol); |
|
1311 |
} |
|
1312 |
} |
|
1313 |
|
|
1314 |
application.ActiveSelectSet.RemoveAll(); |
|
1315 |
if (drawingObjectBases.Count > 0) |
|
1316 |
{ |
|
1317 |
application.ActiveSelectSet.AddObjects(drawingObjectBases); |
|
1318 |
SetTransform(transform, arrow); |
|
1319 |
application.ActiveSelectSet.Transform(transform, false); |
|
1320 |
|
|
1321 |
application.ActiveSelectSet.RemoveAll(); |
|
1322 |
application.ActiveSelectSet.AddObjects(drawingObjectBases); |
|
1323 |
} |
|
1324 |
|
|
1325 |
//foreach (DrawingObjectBaseEx item in drawingObjectBases) |
|
1326 |
// MoveSymbol(item, arrow); |
|
1327 |
|
|
1328 |
ReleaseCOMObjects(dataSource); |
|
1329 |
ReleaseCOMObjects(placement); |
|
1330 |
} |
|
1331 |
} |
|
1332 |
private bool IsMovePoint2D(LMSymbol branchSymbol, LMConnector targetConnector, Arrow arrow) |
|
1333 |
{ |
|
1334 |
bool result = false; |
|
1335 |
|
|
1336 |
DependencyObject dependency = application.ActiveDocument.ActiveSheet.DrawingObjects[targetConnector.get_GraphicOID().ToString()] as DependencyObject; |
|
1337 |
SlopeType mainSlope = GetLineSlopeType(dependency); |
|
1338 |
|
|
1339 |
if (mainSlope == SlopeType.HORIZONTAL || mainSlope == SlopeType.VERTICAL) |
|
1340 |
{ |
|
1341 |
List<SlopeType> types = new List<SlopeType>(); |
|
1342 |
|
|
1343 |
foreach (LMConnector connector in branchSymbol.Connect1Connectors) |
|
1344 |
{ |
|
1345 |
if (connector.get_ItemStatus() == "Active" && |
|
1346 |
connector.Id != targetConnector.Id && |
|
1347 |
!Convert.ToBoolean(connector.get_IsZeroLength())) |
|
1348 |
types.Add(GetLineSlopeType(application.ActiveDocument.ActiveSheet.DrawingObjects[connector.get_GraphicOID().ToString()] as DependencyObject)); |
|
1349 |
} |
|
1350 |
|
|
1351 |
foreach (LMConnector connector in branchSymbol.Connect2Connectors) |
|
1352 |
{ |
|
1353 |
if (connector.get_ItemStatus() == "Active" && |
|
1354 |
connector.Id != targetConnector.Id && |
|
1355 |
!Convert.ToBoolean(connector.get_IsZeroLength())) |
|
1356 |
types.Add(GetLineSlopeType(application.ActiveDocument.ActiveSheet.DrawingObjects[connector.get_GraphicOID().ToString()] as DependencyObject)); |
|
1357 |
} |
|
1358 |
|
|
1359 |
foreach (var type in types) |
|
1360 |
{ |
|
1361 |
if (type == mainSlope) |
|
1362 |
{ |
|
1363 |
if (type == SlopeType.HORIZONTAL && (arrow == Arrow.Up || arrow == Arrow.Down)) |
|
1364 |
result = true; |
|
1365 |
else if (type == SlopeType.VERTICAL && (arrow == Arrow.Left || arrow == Arrow.Right)) |
|
1366 |
result = true; |
|
1367 |
else |
|
1368 |
{ |
|
1369 |
result = false; |
|
1370 |
break; |
|
1371 |
} |
|
1372 |
} |
|
1373 |
else |
|
1374 |
result = true; |
|
1375 |
} |
|
1376 |
|
|
1377 |
if (result) |
|
1378 |
{ |
|
1379 |
if ((arrow == Arrow.Down || arrow == Arrow.Up) && mainSlope == SlopeType.VERTICAL) |
|
1380 |
result = false; |
|
1381 |
else if ((arrow == Arrow.Left || arrow == Arrow.Right) && mainSlope == SlopeType.HORIZONTAL) |
|
1382 |
result = false; |
|
1383 |
} |
|
1384 |
} |
|
1385 |
|
|
1386 |
return result; |
|
1387 |
} |
|
1388 |
private SlopeType GetLineSlopeType(DependencyObject dependency) |
|
1389 |
{ |
|
1390 |
if (dependency != null && dependency.DrawingObjects.Count == 1 && dependency.DrawingObjects[0].GetType() == typeof(LineString2d)) |
|
1391 |
{ |
|
1392 |
LineString2d line = dependency.DrawingObjects[0] as LineString2d; |
|
1393 |
double x1 = 0, y1 = 0, x2 = double.MaxValue, y2 = double.MaxValue; |
|
1394 |
for (int i = 0; i < line.KeyPointCount; i++) |
|
1395 |
{ |
|
1396 |
double x, y, z; |
|
1397 |
KeyPointType keyPointType; |
|
1398 |
HandleType handleType; |
|
1399 |
line.GetKeyPoint(i, out x, out y, out z, out keyPointType, out handleType); |
|
1400 |
if (keyPointType == KeyPointType.igKeyPointStart) |
|
1401 |
{ |
|
1402 |
x1 = x; |
|
1403 |
y1 = y; |
|
1404 |
} |
|
1405 |
else if (keyPointType == KeyPointType.igKeyPointEnd) |
|
1406 |
{ |
|
1407 |
x2 = x; |
|
1408 |
y2 = y; |
|
1409 |
} |
|
1410 |
} |
|
1411 |
return SPPIDUtil.CalcSlope(x1, y1, x2, y2, 0.5); |
|
1412 |
} |
|
1413 |
|
|
1414 |
return SlopeType.None; |
|
1415 |
} |
|
1416 |
private void MoveSymbol(DrawingObjectBaseEx drawingObjectBase, Arrow arrow) |
|
1417 |
{ |
|
1418 |
if (drawingObjectBase == null) |
|
1419 |
return; |
|
1420 |
|
|
1421 |
GridSetting gridSetting = GridSetting.GetInstance(); |
|
1422 |
switch (arrow) |
|
1423 |
{ |
|
1424 |
case Arrow.Left: |
|
1425 |
drawingObjectBase.Move(0, 0, -gridSetting.Length, 0); |
|
1426 |
break; |
|
1427 |
case Arrow.Up: |
|
1428 |
drawingObjectBase.Move(0, 0, 0, gridSetting.Length); |
|
1429 |
break; |
|
1430 |
case Arrow.Right: |
|
1431 |
drawingObjectBase.Move(0, 0, gridSetting.Length, 0); |
|
1432 |
break; |
|
1433 |
case Arrow.Down: |
|
1434 |
drawingObjectBase.Move(0, 0, 0, -gridSetting.Length); |
|
1435 |
break; |
|
1436 |
default: |
|
1437 |
break; |
|
1438 |
} |
|
1439 |
} |
|
1440 |
private void SetTransform(Transform transform, Arrow arrow) |
|
1441 |
{ |
|
1442 |
GridSetting gridSetting = GridSetting.GetInstance(); |
|
1443 |
switch (arrow) |
|
1444 |
{ |
|
1445 |
case Arrow.Left: |
|
1446 |
transform.DefineByMove2d(-gridSetting.Length, 0); |
|
1447 |
break; |
|
1448 |
case Arrow.Up: |
|
1449 |
transform.DefineByMove2d(0, gridSetting.Length); |
|
1450 |
break; |
|
1451 |
case Arrow.Right: |
|
1452 |
transform.DefineByMove2d(gridSetting.Length, 0); |
|
1453 |
break; |
|
1454 |
case Arrow.Down: |
|
1455 |
transform.DefineByMove2d(0, -gridSetting.Length); |
|
1456 |
break; |
|
1457 |
default: |
|
1458 |
break; |
|
1459 |
} |
|
1460 |
} |
|
1461 |
#endregion |
|
1462 |
|
|
1117 | 1463 |
#endregion |
1118 | 1464 |
|
1119 | 1465 |
#region TEST |
DTI_PID/SPPIDConverter/Wrapper/SPPIDConverterWrapper.cs | ||
---|---|---|
221 | 221 |
if (dialogBar.Name == DialogBarName) |
222 | 222 |
{ |
223 | 223 |
bExist = true; |
224 |
ConverterDocking ui = (ConverterDocking)dialogBar.Controls[0].ControlDispatch; |
|
225 |
ui.ClearHotKey(); |
|
224 | 226 |
dialogBar.Delete(); |
225 | 227 |
break; |
226 | 228 |
} |
... | ... | |
229 | 231 |
{ |
230 | 232 |
DialogBar dlgBar = application.DialogBars.Add(DialogBarName, DockingFlagsConstants.igDockableOnLeft, DockingLocationConstants.igDockOnLeft, |
231 | 233 |
DialogBarStyleConstants.igDialogBarStyleShowCaption | DialogBarStyleConstants.igDialogBarStyleStretchToFitHorizontal | DialogBarStyleConstants.igDialogBarStyleStretchToFitVertical | DialogBarStyleConstants.igDialogBarStyleNoBorder, 0, 0); |
232 |
DialogbarControl dialogBarControl_UserControl = dlgBar.Controls.AddManaged(autoModelingDllPath, "Converter.SPPID.Wrapper.ConverterDocking", 250, 500);
|
|
234 |
DialogbarControl dialogBarControl_UserControl = dlgBar.Controls.AddManaged(autoModelingDllPath, "Converter.SPPID.Wrapper.ConverterDocking", 250, 650);
|
|
233 | 235 |
} |
234 | 236 |
} |
235 | 237 |
catch (Exception ex) |
내보내기 Unified diff