프로젝트

일반

사용자정보

개정판 6db30942

ID6db309420f9f760cb5b696e48158b5ca290337d3
상위 2ea965f2
하위 026f394f

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

dev issue #000 : progress 변경

Change-Id: I4a74559dcaf3e3040880496282e5beda5a21a635

차이점 보기:

DTI_PID/SPPIDConverter/AutoModeling.cs
86 86
                    SplashScreenManager.ShowForm(typeof(SPPIDSplashScreen), true, true);
87 87
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetParent, (IntPtr)radApp.HWnd);
88 88
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetDocumentName, DocumentLabelText);
89
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Priority Symbol Modeling");
90
                    prioritySymbols = GetPrioritySymbol();
91
                    foreach (var item in prioritySymbols)
89

  
90
                    // Equipment Modeling
91
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Equipments Modeling");
92
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetAllProgress, document.Equipments.Count);
93
                    foreach (Equipment item in document.Equipments)
92 94
                    {
93 95
                        try
94 96
                        {
95
                            SymbolModelingBySymbol(item);
97
                            EquipmentModeling(item);
98
                            SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, document.Equipments.FindAll(x => !string.IsNullOrEmpty(x.SPPID.RepresentationId)).Count);
96 99
                        }
97 100
                        catch (Exception ex)
98 101
                        {
99
                            Log.Write("Error in SymbolModelingByPriority");
102
                            Log.Write("Error in EquipmentModeling");
100 103
                            Log.Write("UID : " + item.UID);
101 104
                            Log.Write(ex.Message);
102 105
                            Log.Write(ex.StackTrace);
103 106
                        }
104 107
                    }
105 108

  
106
                    // Equipment Modeling
107
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Equipments Modeling");
108
                    foreach (Equipment equipment in document.Equipments)
109
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Symbol Modeling");
110
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetAllProgress, document.SYMBOLS.Count);
111
                    prioritySymbols = GetPrioritySymbol();
112
                    foreach (var item in prioritySymbols)
109 113
                    {
110 114
                        try
111 115
                        {
112
                            EquipmentModeling(equipment);
116
                            SymbolModelingBySymbol(item);
113 117
                        }
114 118
                        catch (Exception ex)
115 119
                        {
116
                            Log.Write("Error in EquipmentModeling");
117
                            Log.Write("UID : " + equipment.UID);
120
                            Log.Write("Error in SymbolModelingByPriority");
121
                            Log.Write("UID : " + item.UID);
118 122
                            Log.Write(ex.Message);
119 123
                            Log.Write(ex.StackTrace);
120 124
                        }
121 125
                    }
122 126

  
123
                    SetPriorityLine();
124 127
                    // LineRun Line Modeling
128
                    SetPriorityLine();
125 129
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Lines Modeling");
130
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetAllProgress, document.LINES.Count);
126 131
                    foreach (var item in document.LINES)
127 132
                    {
128
                        NewLineModeling(item);
133
                        try
134
                        {
135
                            NewLineModeling(item);
136
                            SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, document.LINES.FindAll(x => !string.IsNullOrEmpty(x.SPPID.ModelItemId)).Count);
137
                        }
138
                        catch (Exception ex)
139
                        {
140
                            Log.Write("Error in NewLineModeling");
141
                            Log.Write("UID : " + item.UID);
142
                            Log.Write(ex.Message);
143
                            Log.Write(ex.StackTrace);
144
                        }
129 145
                    }
130 146

  
131 147
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Branch Lines Modeling");
148
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetAllProgress, NewBranchLines.Count);
149
                    int branchCount = NewBranchLines.Count;
132 150
                    while (NewBranchLines.Count > 0)
133 151
                    {
134
                        SortBranchLines();
135
                        NewLineModeling(NewBranchLines[0], true);
152
                        Line item = NewBranchLines[0];
153
                        try
154
                        {
155
                            SortBranchLines();
156
                            NewLineModeling(item, true);
157
                            SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, branchCount - NewBranchLines.Count);
158
                        }
159
                        catch (Exception ex)
160
                        {
161
                            Log.Write("Error in NewLineModeling");
162
                            Log.Write("UID : " + item.UID);
163
                            Log.Write(ex.Message);
164
                            Log.Write(ex.StackTrace);
165
                        }
136 166
                    }
137 167

  
138 168
                    #region Clear Nominal Diameter
169
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetAllProgress, document.SYMBOLS.Count + document.LINES.Count);
139 170
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Clear Attribute");
140 171
                    SetSystemEditingCommand(false);
141
                    foreach (var item in radApp.ActiveDocument.ActiveSheet.Symbols)
172
                    for (int i = 0; i < document.SYMBOLS.Count; i++)
142 173
                    {
143
                        string modelItemID = string.Empty;
144
                        foreach (var attributes in item.AttributeSets)
145
                        {
146
                            if (!string.IsNullOrEmpty(modelItemID))
147
                                break;
148

  
149
                            foreach (var attribute in attributes)
150
                            {
151
                                if (attribute.Name == "ModelID")
152
                                {
153
                                    modelItemID = attribute.GetValue().ToString();
154
                                    break;
155
                                }
156
                            }
157
                        }
158

  
174
                        Symbol item = document.SYMBOLS[i];
175
                        string modelItemID = item.SPPID.ModelItemID;
159 176
                        if (!string.IsNullOrEmpty(modelItemID))
160 177
                        {
161 178
                            LMModelItem modelItem = dataSource.GetModelItem(modelItemID);
......
175 192
                                ReleaseCOMObjects(modelItem);
176 193
                            }
177 194
                        }
195
                        SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, i + 1);
178 196
                    }
179
                    foreach (var item in radApp.ActiveDocument.ActiveSheet.AllDependencyObjects)
197
                    for (int i = 0; i < document.LINES.Count; i++)
180 198
                    {
181
                        string modelItemID = string.Empty;
182
                        foreach (var attributes in item.AttributeSets)
183
                        {
184
                            if (!string.IsNullOrEmpty(modelItemID))
185
                                break;
186

  
187
                            foreach (var attribute in attributes)
188
                            {
189
                                if (attribute.Name == "ModelID")
190
                                {
191
                                    modelItemID = attribute.GetValue().ToString();
192
                                    break;
193
                                }
194
                            }
195
                        }
196

  
199
                        Line item = document.LINES[i];
200
                        string modelItemID = item.SPPID.ModelItemId;
197 201
                        if (!string.IsNullOrEmpty(modelItemID))
198 202
                        {
199 203
                            LMModelItem modelItem = dataSource.GetModelItem(modelItemID);
......
207 211
                                ReleaseCOMObjects(modelItem);
208 212
                            }
209 213
                        }
210
                    }
214

  
215
                        SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, document.SYMBOLS.Count + i + 1);
216
                    }
217
                    #region RadApp 방식
218
                    //SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetAllProgress, radApp.ActiveDocument.ActiveSheet.Symbols.Count + radApp.ActiveDocument.ActiveSheet.AllDependencyObjects.Count);
219
                    //SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Clear Attribute");
220
                    //foreach (var item in radApp.ActiveDocument.ActiveSheet.Symbols)
221
                    //{
222
                    //    string modelItemID = string.Empty;
223
                    //    foreach (var attributes in item.AttributeSets)
224
                    //    {
225
                    //        if (!string.IsNullOrEmpty(modelItemID))
226
                    //            break;
227

  
228
                    //        foreach (var attribute in attributes)
229
                    //        {
230
                    //            if (attribute.Name == "ModelID")
231
                    //            {
232
                    //                modelItemID = attribute.GetValue().ToString();
233
                    //                break;
234
                    //            }
235
                    //        }
236
                    //    }
237

  
238
                    //    if (!string.IsNullOrEmpty(modelItemID))
239
                    //    {
240
                    //        LMModelItem modelItem = dataSource.GetModelItem(modelItemID);
241
                    //        if (modelItem != null)
242
                    //        {
243
                    //            LMAAttribute attribute = modelItem.Attributes["NominalDiameter"];
244
                    //            if (attribute != null)
245
                    //                attribute.set_Value(DBNull.Value);
246
                    //            attribute = modelItem.Attributes["PipingPoint1.NominalDiameter"];
247
                    //            if (attribute != null)
248
                    //                attribute.set_Value(DBNull.Value);
249
                    //            attribute = modelItem.Attributes["PipingPoint2.NominalDiameter"];
250
                    //            if (attribute != null)
251
                    //                attribute.set_Value(DBNull.Value);
252

  
253
                    //            modelItem.Commit();
254
                    //            ReleaseCOMObjects(modelItem);
255
                    //        }
256
                    //    }
257

  
258
                    //}
259
                    //foreach (var item in radApp.ActiveDocument.ActiveSheet.AllDependencyObjects)
260
                    //{
261
                    //    string modelItemID = string.Empty;
262
                    //    foreach (var attributes in item.AttributeSets)
263
                    //    {
264
                    //        if (!string.IsNullOrEmpty(modelItemID))
265
                    //            break;
266

  
267
                    //        foreach (var attribute in attributes)
268
                    //        {
269
                    //            if (attribute.Name == "ModelID")
270
                    //            {
271
                    //                modelItemID = attribute.GetValue().ToString();
272
                    //                break;
273
                    //            }
274
                    //        }
275
                    //    }
276

  
277
                    //    if (!string.IsNullOrEmpty(modelItemID))
278
                    //    {
279
                    //        LMModelItem modelItem = dataSource.GetModelItem(modelItemID);
280
                    //        if (modelItem != null)
281
                    //        {
282
                    //            LMAAttribute attribute = modelItem.Attributes["NominalDiameter"];
283
                    //            if (attribute != null)
284
                    //                attribute.set_Value(DBNull.Value);
285

  
286
                    //            modelItem.Commit();
287
                    //            ReleaseCOMObjects(modelItem);
288
                    //        }
289
                    //    }
290
                    //}
291
                    #endregion 
211 292
                    SetSystemEditingCommand(true);
212 293
                    #endregion
213 294

  
214
                    // EndBreak Modeling
215
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "EndBreaks Modeling");
216
                    foreach (var item in document.EndBreaks)
217
                        try
218
                        {
219
                            EndBreakModeling(item);
220
                        }
221
                        catch (Exception ex)
222
                        {
223
                            Log.Write("Error in EndBreakModeling");
224
                            Log.Write("UID : " + item.UID);
225
                            Log.Write(ex.Message);
226
                            Log.Write(ex.StackTrace);
227
                        }
228

  
229

  
230
                    // SpecBreak Modeling
231
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "SpecBreaks Modeling");
232
                    foreach (var item in document.SpecBreaks)
233
                        try
234
                        {
235
                            SpecBreakModeling(item);
236
                        }
237
                        catch (Exception ex)
238
                        {
239
                            Log.Write("Error in SpecBreakModeling");
240
                            Log.Write("UID : " + item.UID);
241
                            Log.Write(ex.Message);
242
                            Log.Write(ex.StackTrace);
243
                        }
244

  
245

  
246
                    // LineNumber Modeling
247
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "LineNumbers Modeling");
248
                    foreach (var item in document.LINENUMBERS)
249
                        try
250
                        {
251
                            LineNumberModeling(item);
252
                        }
253
                        catch (Exception ex)
254
                        {
255
                            Log.Write("Error in LineNumberModeling");
256
                            Log.Write("UID : " + item.UID);
257
                            Log.Write(ex.Message);
258
                            Log.Write(ex.StackTrace);
259
                        }
260

  
261

  
262
                    // FlowMark Modeling
263
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Flow Mark Modeling");
264
                    foreach (var item in document.LINES)
265
                        try
266
                        {
267
                            FlowMarkModeling(item);
268
                        }
269
                        catch (Exception ex)
270
                        {
271
                            Log.Write("Error in FlowMarkModeling");
272
                            Log.Write("UID : " + item.UID);
273
                            Log.Write(ex.Message);
274
                            Log.Write(ex.StackTrace);
275
                        }
276

  
277

  
278
                    // Note Symbol Modeling
279
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Note Symbol Modeling");
280
                    foreach (var item in document.SYMBOLS)
281
                        try
282
                        {
283
                            NoteSymbolModeling(item);
284
                        }
285
                        catch (Exception ex)
286
                        {
287
                            Log.Write("Error in NoteSymbolModeling");
288
                            Log.Write("UID : " + item.UID);
289
                            Log.Write(ex.Message);
290
                            Log.Write(ex.StackTrace);
291
                        }
292

  
293

  
294
                    // Note Modeling
295
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Notes Modeling");
296
                    foreach (var item in document.NOTES)
297
                        try
298
                        {
299
                            NoteModeling(item);
300
                        }
301
                        catch (Exception ex)
302
                        {
303
                            Log.Write("Error in NoteModeling");
304
                            Log.Write("UID : " + item.UID);
305
                            Log.Write(ex.Message);
306
                            Log.Write(ex.StackTrace);
307
                        }
308

  
309
                    // Text Modeling
310
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Texts Modeling");
311
                    foreach (var item in document.TEXTINFOS)
312
                        try
313
                        {
314
                            TextModeling(item);
315
                        }
316
                        catch (Exception ex)
317
                        {
318
                            Log.Write("Error in TextModeling");
319
                            Log.Write("UID : " + item.UID);
320
                            Log.Write(ex.Message);
321
                            Log.Write(ex.StackTrace);
322
                        }
323

  
324
                    // Input LineNumber Attribute
325
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set LineNumbers Attribute");
326
                    foreach (var item in document.LINENUMBERS)
327
                        try
328
                        {
329
                            InputLineNumberAttribute(item);
330
                        }
331
                        catch (Exception ex)
332
                        {
333
                            Log.Write("Error in InputLineNumberAttribute");
334
                            Log.Write("UID : " + item.UID);
335
                            Log.Write(ex.Message);
336
                            Log.Write(ex.StackTrace);
337
                        }
338

  
339
                    // Input Symbol Attribute
340
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set Symbols Attribute");
341
                    foreach (var item in document.SYMBOLS)
342
                        try
343
                        {
344
                            InputSymbolAttribute(item, item.ATTRIBUTES);
345
                        }
346
                        catch (Exception ex)
347
                        {
348
                            Log.Write("Error in InputSymbolAttribute");
349
                            Log.Write("UID : " + item.UID);
350
                            Log.Write(ex.Message);
351
                            Log.Write(ex.StackTrace);
352
                        }
353

  
354
                    // Input SpecBreak Attribute
355
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set Symbols Attribute");
356
                    foreach (var item in document.SpecBreaks)
357
                        try
358
                        {
359
                            InputSpecBreakAttribute(item);
360
                        }
361
                        catch (Exception ex)
362
                        {
363
                            Log.Write("Error in InputSpecBreakAttribute");
364
                            Log.Write("UID : " + item.UID);
365
                            Log.Write(ex.Message);
366
                            Log.Write(ex.StackTrace);
367
                        }
368

  
369
                    // Label Symbol Modeling
370
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Labels Modeling");
371
                    foreach (var item in document.SYMBOLS)
372
                        try
373
                        {
374
                            LabelSymbolModeling(item);
375
                        }
376
                        catch (Exception ex)
377
                        {
378
                            Log.Write("Error in LabelSymbolModeling");
379
                            Log.Write("UID : " + item.UID);
380
                            Log.Write(ex.Message);
381
                            Log.Write(ex.StackTrace);
382
                        }
383

  
384
                    // LineRun Line Join
385
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Join LineRuns");
386
                    foreach (LineNumber lineNumber in document.LINENUMBERS)
387
                        try
388
                        {
389
                            foreach (LineRun run in lineNumber.RUNS)
390
                                JoinRunLine(run);
391
                        }
392
                        catch (Exception ex)
393
                        {
394
                            Log.Write("Error in JoinRunLine");
395
                            Log.Write("UID : " + lineNumber.UID);
396
                            Log.Write(ex.Message);
397
                            Log.Write(ex.StackTrace);
398
                        }
399

  
400
                    // TrimLineRun Line Join
401
                    foreach (TrimLine trimLine in document.TRIMLINES)
402
                        try
403
                        {
404
                            foreach (LineRun run in trimLine.RUNS)
405
                                JoinRunLine(run);
406
                        }
407
                        catch (Exception ex)
408
                        {
409
                            Log.Write("Error in JoinRunLine");
410
                            Log.Write("UID : " + trimLine.UID);
411
                            Log.Write(ex.Message);
412
                            Log.Write(ex.StackTrace);
413
                        }
295
                    //// EndBreak Modeling
296
                    //SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "EndBreaks Modeling");
297
                    //foreach (var item in document.EndBreaks)
298
                    //    try
299
                    //    {
300
                    //        EndBreakModeling(item);
301
                    //    }
302
                    //    catch (Exception ex)
303
                    //    {
304
                    //        Log.Write("Error in EndBreakModeling");
305
                    //        Log.Write("UID : " + item.UID);
306
                    //        Log.Write(ex.Message);
307
                    //        Log.Write(ex.StackTrace);
308
                    //    }
309

  
310

  
311
                    //// SpecBreak Modeling
312
                    //SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "SpecBreaks Modeling");
313
                    //foreach (var item in document.SpecBreaks)
314
                    //    try
315
                    //    {
316
                    //        SpecBreakModeling(item);
317
                    //    }
318
                    //    catch (Exception ex)
319
                    //    {
320
                    //        Log.Write("Error in SpecBreakModeling");
321
                    //        Log.Write("UID : " + item.UID);
322
                    //        Log.Write(ex.Message);
323
                    //        Log.Write(ex.StackTrace);
324
                    //    }
325

  
326

  
327
                    //// LineNumber Modeling
328
                    //SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "LineNumbers Modeling");
329
                    //foreach (var item in document.LINENUMBERS)
330
                    //    try
331
                    //    {
332
                    //        LineNumberModeling(item);
333
                    //    }
334
                    //    catch (Exception ex)
335
                    //    {
336
                    //        Log.Write("Error in LineNumberModeling");
337
                    //        Log.Write("UID : " + item.UID);
338
                    //        Log.Write(ex.Message);
339
                    //        Log.Write(ex.StackTrace);
340
                    //    }
341

  
342

  
343
                    //// FlowMark Modeling
344
                    //SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Flow Mark Modeling");
345
                    //foreach (var item in document.LINES)
346
                    //    try
347
                    //    {
348
                    //        FlowMarkModeling(item);
349
                    //    }
350
                    //    catch (Exception ex)
351
                    //    {
352
                    //        Log.Write("Error in FlowMarkModeling");
353
                    //        Log.Write("UID : " + item.UID);
354
                    //        Log.Write(ex.Message);
355
                    //        Log.Write(ex.StackTrace);
356
                    //    }
357

  
358

  
359
                    //// Note Symbol Modeling
360
                    //SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Note Symbol Modeling");
361
                    //foreach (var item in document.SYMBOLS)
362
                    //    try
363
                    //    {
364
                    //        NoteSymbolModeling(item);
365
                    //    }
366
                    //    catch (Exception ex)
367
                    //    {
368
                    //        Log.Write("Error in NoteSymbolModeling");
369
                    //        Log.Write("UID : " + item.UID);
370
                    //        Log.Write(ex.Message);
371
                    //        Log.Write(ex.StackTrace);
372
                    //    }
373

  
374

  
375
                    //// Note Modeling
376
                    //SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Notes Modeling");
377
                    //foreach (var item in document.NOTES)
378
                    //    try
379
                    //    {
380
                    //        NoteModeling(item);
381
                    //    }
382
                    //    catch (Exception ex)
383
                    //    {
384
                    //        Log.Write("Error in NoteModeling");
385
                    //        Log.Write("UID : " + item.UID);
386
                    //        Log.Write(ex.Message);
387
                    //        Log.Write(ex.StackTrace);
388
                    //    }
389

  
390
                    //// Text Modeling
391
                    //SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Texts Modeling");
392
                    //foreach (var item in document.TEXTINFOS)
393
                    //    try
394
                    //    {
395
                    //        TextModeling(item);
396
                    //    }
397
                    //    catch (Exception ex)
398
                    //    {
399
                    //        Log.Write("Error in TextModeling");
400
                    //        Log.Write("UID : " + item.UID);
401
                    //        Log.Write(ex.Message);
402
                    //        Log.Write(ex.StackTrace);
403
                    //    }
404

  
405
                    //// Input LineNumber Attribute
406
                    //SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set LineNumbers Attribute");
407
                    //foreach (var item in document.LINENUMBERS)
408
                    //    try
409
                    //    {
410
                    //        InputLineNumberAttribute(item);
411
                    //    }
412
                    //    catch (Exception ex)
413
                    //    {
414
                    //        Log.Write("Error in InputLineNumberAttribute");
415
                    //        Log.Write("UID : " + item.UID);
416
                    //        Log.Write(ex.Message);
417
                    //        Log.Write(ex.StackTrace);
418
                    //    }
419

  
420
                    //// Input Symbol Attribute
421
                    //SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set Symbols Attribute");
422
                    //foreach (var item in document.SYMBOLS)
423
                    //    try
424
                    //    {
425
                    //        InputSymbolAttribute(item, item.ATTRIBUTES);
426
                    //    }
427
                    //    catch (Exception ex)
428
                    //    {
429
                    //        Log.Write("Error in InputSymbolAttribute");
430
                    //        Log.Write("UID : " + item.UID);
431
                    //        Log.Write(ex.Message);
432
                    //        Log.Write(ex.StackTrace);
433
                    //    }
434

  
435
                    //// Input SpecBreak Attribute
436
                    //SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set Symbols Attribute");
437
                    //foreach (var item in document.SpecBreaks)
438
                    //    try
439
                    //    {
440
                    //        InputSpecBreakAttribute(item);
441
                    //    }
442
                    //    catch (Exception ex)
443
                    //    {
444
                    //        Log.Write("Error in InputSpecBreakAttribute");
445
                    //        Log.Write("UID : " + item.UID);
446
                    //        Log.Write(ex.Message);
447
                    //        Log.Write(ex.StackTrace);
448
                    //    }
449

  
450
                    //// Label Symbol Modeling
451
                    //SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Labels Modeling");
452
                    //foreach (var item in document.SYMBOLS)
453
                    //    try
454
                    //    {
455
                    //        LabelSymbolModeling(item);
456
                    //    }
457
                    //    catch (Exception ex)
458
                    //    {
459
                    //        Log.Write("Error in LabelSymbolModeling");
460
                    //        Log.Write("UID : " + item.UID);
461
                    //        Log.Write(ex.Message);
462
                    //        Log.Write(ex.StackTrace);
463
                    //    }
464

  
465
                    //// LineRun Line Join
466
                    //SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Join LineRuns");
467
                    //foreach (LineNumber lineNumber in document.LINENUMBERS)
468
                    //    try
469
                    //    {
470
                    //        foreach (LineRun run in lineNumber.RUNS)
471
                    //            JoinRunLine(run);
472
                    //    }
473
                    //    catch (Exception ex)
474
                    //    {
475
                    //        Log.Write("Error in JoinRunLine");
476
                    //        Log.Write("UID : " + lineNumber.UID);
477
                    //        Log.Write(ex.Message);
478
                    //        Log.Write(ex.StackTrace);
479
                    //    }
480

  
481
                    //// TrimLineRun Line Join
482
                    //foreach (TrimLine trimLine in document.TRIMLINES)
483
                    //    try
484
                    //    {
485
                    //        foreach (LineRun run in trimLine.RUNS)
486
                    //            JoinRunLine(run);
487
                    //    }
488
                    //    catch (Exception ex)
489
                    //    {
490
                    //        Log.Write("Error in JoinRunLine");
491
                    //        Log.Write("UID : " + trimLine.UID);
492
                    //        Log.Write(ex.Message);
493
                    //        Log.Write(ex.StackTrace);
494
                    //    }
414 495
                }
415 496
            }
416 497
            catch (Exception ex)
......
1081 1162
                        {
1082 1163
                            SymbolModeling(connSymbol, symbol);
1083 1164
                        }
1165
                        SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, document.SYMBOLS.FindAll(x => !string.IsNullOrEmpty(x.SPPID.RepresentationId)).Count);
1084 1166
                        SymbolModelingByNeerSymbolLoop(connSymbol, endObjects);
1085 1167
                    }
1086 1168
                    else if (connItem.GetType() == typeof(Line))
......
1109 1191
                            {
1110 1192
                                SymbolModeling(connSymbol, symbol);
1111 1193
                            }
1194
                            SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, document.SYMBOLS.FindAll(x => !string.IsNullOrEmpty(x.SPPID.RepresentationId)).Count);
1112 1195
                            SymbolModelingByNeerSymbolLoop(connSymbol, endObjects);
1113 1196
                        }
1114 1197
                        else if (connItem.GetType() == typeof(Line))
......
1191 1274
                                    }
1192 1275
                                }
1193 1276
                            }
1277
                            SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, document.SYMBOLS.FindAll(x => !string.IsNullOrEmpty(x.SPPID.RepresentationId)).Count);
1194 1278
                            SymbolModelingByNeerSymbolLoop(connSymbol, endObjects);
1195 1279
                        }
1196 1280
                        else if (connItem.GetType() == typeof(Line))
DTI_PID/SPPIDConverter/Form/SPPIDSplashScreen.cs
42 42
                string stepText = (string)arg;
43 43
                labelStep.Text = "Step : " + stepText;
44 44
            }
45
            else if (command == SplashScreenCommand.SetAllStep)
45
            else if (command == SplashScreenCommand.SetAllProgress)
46 46
            {
47 47
                int pos = (int)arg;
48 48
                progressBarControl.Properties.Maximum = pos;
......
82 82
        public enum SplashScreenCommand
83 83
        {
84 84
            SetProgress,
85
            SetAllStep,
85
            SetAllProgress,
86 86
            SetStep,
87 87
            SetDocumentName,
88 88
            SetParent,

내보내기 Unified diff

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