프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / KCOM / Events / Implementation / TopMenuEvent.cs @ e907328e

이력 | 보기 | 이력해설 | 다운로드 (120 KB)

1
using KCOM.Common;
2
using KCOM.Common.Converter;
3
using KCOM.Controls;
4
using KCOM.Events;
5
using MarkupToPDF.Common;
6
using System;
7
using System.Collections.Generic;
8
using System.Linq;
9
using System.Text;
10
using System.Windows;
11
using System.Windows.Controls;
12
using System.Windows.Input;
13
using System.Windows.Media;
14
using Telerik.Windows.Controls;
15

    
16
namespace KCOM.Views
17
{
18
    public partial class TopMenu : UserControl
19
    {
20
        public int rotateOffSet = 0;
21
        private double[] rotateValue = { 0, 90, 180, 270 };
22
        public System.Windows.Threading.DispatcherTimer SaveTimer { get; set; }
23
        public bool isClosed = true;
24
        public RadWindow CheckPop;
25
        public MarkupToPDF.Common.Undo_data UndoData;
26
        MarkupToPDF.Controls.Parsing.LayerControl.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.LayerControl.MarkupReturn();
27
        MarkupToPDF.Controls.Parsing.LayerControl layer = new MarkupToPDF.Controls.Parsing.LayerControl();
28

    
29
        //임시파일
30
        TempFile temp = new TempFile();
31
        /// <summary>
32
        /// TaskBar에 메시지를 입력합니다
33
        /// </summary>
34
        /// <param name="message"></param>
35
        /// <param name="type"></param>
36
        public void TaskMessage(string message, TaskMessageType type)
37
        {
38
            //if (taskBar != null)
39
            //{
40
            //    string color = "";
41
            //    taskBar.Content = message;
42
            //    DicTaskMessage.TryGetValue(type, out color);
43
            //    taskBar.Foreground = new SolidColorBrush(StringToColorConverter.Parse(color));
44
            //}
45
        }
46

    
47
        /// <summary>
48
        /// Task Type명을 Key값으로 지정합니다
49
        /// </summary>
50
        public enum TaskMessageType
51
        {
52
            Normal,
53
            Caption,
54
            Error,
55
        }
56

    
57
        private void CheckShapeState()
58
        {
59

    
60

    
61
            if (cbHatchShape.IsChecked == true)
62
            {
63
                cbFillShape.IsChecked = false;
64
                ViewerDataModel.Instance.paintSet = MarkupToPDF.Controls.Common.PaintSet.Hatch;
65
            }
66
            else if(cbFillShape.IsChecked == true)
67
            {
68
                cbHatchShape.IsChecked = false;
69
                ViewerDataModel.Instance.paintSet = MarkupToPDF.Controls.Common.PaintSet.Fill;
70
            }
71
            else
72
            {
73
                ViewerDataModel.Instance.paintSet = MarkupToPDF.Controls.Common.PaintSet.None;
74
            }
75
        }
76

    
77
        //강인구 추가(Undo End)
78
        private void SetPaintEvent()
79
        {
80
            List<AdornerMember> AdonerList = GetAdornerItem();
81

    
82
            if (AdonerList.Count > 0)
83
            {
84
                Undo_data UndoData = new Undo_data()
85
                {
86
                    IsUndo = false,
87
                    Event = Event_Type.Option,
88
                    EventTime = DateTime.Now,
89
                    paint = ViewerDataModel.Instance.paintSet,
90
                    Markup_List = new List<Multi_Undo_data>()
91
                };
92
                Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
93

    
94
                foreach (AdornerMember InnerItem in AdonerList)
95
                {
96
                    multi_Undo_Data.PointSet = new List<Point>();
97

    
98
                    if ((InnerItem.DrawingData as MarkupToPDF.Controls.Common.IShapeControl) != null)
99
                    {
100
                        (InnerItem.DrawingData as MarkupToPDF.Controls.Common.IShapeControl).Paint = ViewerDataModel.Instance.paintSet;
101
                    }
102

    
103
                    multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
104
                    UndoData.Markup_List.Add(multi_Undo_Data);
105
                    multi_Undo_Data = new Multi_Undo_data();
106
                }
107

    
108
                ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
109
                {
110
                    ViewerDataModel.Instance.UndoDataList.Remove(i);                    
111
                });
112
                ViewerDataModel.Instance.UndoDataList.Add(UndoData);
113
                
114

    
115
            }
116

    
117
        }
118

    
119
        private void SetHighlightEvent()
120
        {
121
            List<AdornerMember> AdonerList = GetAdornerItem();
122

    
123
            if (AdonerList.Count > 0)
124
            {
125
                foreach (AdornerMember InnerItem in AdonerList)
126
                {
127
                    switch (InnerItem.DrawingData.GetType().Name)
128
                    {
129
                        case ("TextControl"):
130
                            {
131
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).IsHighLight = ViewerDataModel.Instance.checkHighShape;
132
                            }
133
                            break;
134
                        case ("ArrowTextControl"):
135
                            {
136
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).isHighLight = ViewerDataModel.Instance.checkHighShape;
137
                            }
138
                            break;
139
                    }
140
                }
141
            }
142

    
143
        }
144

    
145
        private void FillShapeEvent(object sender, RoutedEventArgs e)
146
        {
147
            #region 주석
148
            //if ((sender as CheckBox).IsChecked.Value)
149
            //{
150
            //    cbHatchShape.IsChecked = false;
151
            //    imgShape_RectCloud.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/RectCloud_Fill.png", UriKind.Relative));
152
            //    imgShape_Cloud.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/Cloud_Fill.png", UriKind.Relative));
153
            //    imgShape_Rect.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/Rectangle_Fill.png", UriKind.Relative));
154
            //    imgShape_Tri.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/triangle-icon.png", UriKind.Relative));
155
            //    imgShape_Cicle.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/circle-icon.png", UriKind.Relative));
156
            //    imgShape_Poly.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/polygon_Fill.png", UriKind.Relative));
157
            //    TaskMessage("채우기 옵션이 적용되었습니다", TaskMessageType.Normal);
158
            //}
159
            //else
160
            //{
161

    
162
            //    imgShape_RectCloud.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/RectCloud.png", UriKind.Relative));
163
            //    imgShape_Cloud.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/Cloud.png", UriKind.Relative));
164
            //    imgShape_Rect.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/Rectangle.png", UriKind.Relative));
165
            //    imgShape_Tri.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/triangle-icon_None.png", UriKind.Relative));
166
            //    imgShape_Cicle.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/circle-icon_None.png", UriKind.Relative));
167
            //    imgShape_Poly.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/polygon.png", UriKind.Relative));
168
            //    TaskMessage("채우기 옵션이 해제되었습니다", TaskMessageType.Caption);
169
            //}
170
            #endregion
171
            ViewerDataModel.Instance.checkFillShape = (sender as CheckBox).IsChecked.Value;
172

    
173
            if (ViewerDataModel.Instance.checkFillShape)
174
            {
175
                cbHatchShape.IsChecked = false;
176
                ViewerDataModel.Instance.paintSet = MarkupToPDF.Controls.Common.PaintSet.Fill;
177
            }
178
            else
179
            {
180
                ViewerDataModel.Instance.paintSet = MarkupToPDF.Controls.Common.PaintSet.None;
181
            }
182
            SetPaintEvent();
183
        }
184

    
185
        /// <summary>
186
        /// 도형 빗금 처리
187
        /// </summary>
188
        /// <param name="sender"></param>
189
        /// <param name="e"></param>
190
        private void HatchShapeEvent(object sender, RoutedEventArgs e)
191
        {
192
			#region 주석
193
            //if ((sender as CheckBox).IsChecked.Value)
194
            //{
195
            //    cbFillShape.IsChecked = false;
196
            //    imgShape_RectCloud.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/RectCloud_Hatch.png", UriKind.Relative));
197
            //    imgShape_Cloud.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/Cloud_Hatch.png", UriKind.Relative));
198
            //    imgShape_Rect.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/rectangle-icon_Hatch.png", UriKind.Relative));
199
            //    imgShape_Tri.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/triangle-icon_Hatch.png", UriKind.Relative));
200
            //    imgShape_Cicle.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/circle-icon_Hatch.png", UriKind.Relative));
201
            //    imgShape_Poly.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/polygon_hatch.png", UriKind.Relative));
202
            //    TaskMessage("무늬 옵션이 적용되었습니다", TaskMessageType.Normal);
203
            //}
204
            //else
205
            //{
206
            //    imgShape_RectCloud.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/RectCloud.png", UriKind.Relative));
207
            //    imgShape_Cloud.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/Cloud.png", UriKind.Relative));
208
            //    imgShape_Rect.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/Rectangle.png", UriKind.Relative));
209
            //    imgShape_Tri.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/triangle-icon_None.png", UriKind.Relative));
210
            //    imgShape_Cicle.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/circle-icon_None.png", UriKind.Relative));
211
            //    imgShape_Poly.Source = new BitmapImage(new Uri("/DeepView;component/Images/MenuImage/polygon.png", UriKind.Relative));
212
            //    TaskMessage("무늬 옵션이 해제되었습니다", TaskMessageType.Caption);
213
            //} 
214
            #endregion
215

    
216
            //강인구 추가
217
            ViewerDataModel.Instance.checkHatchShape = (sender as CheckBox).IsChecked.Value;
218
            if (ViewerDataModel.Instance.checkHatchShape)
219
            {
220
                cbFillShape.IsChecked = false;
221
                ViewerDataModel.Instance.paintSet = MarkupToPDF.Controls.Common.PaintSet.Hatch;
222
            }
223
            else
224
            {
225
                ViewerDataModel.Instance.paintSet = MarkupToPDF.Controls.Common.PaintSet.None;  
226
            }
227
            SetPaintEvent();
228
        }
229

    
230
 		//강인구 추가
231
        private string SetColor(string ID)
232
        {
233
            try
234
            {
235
                return ViewerDataModel.Instance._markupInfoList.Where(info => info.MarkupInfoID == ID).First().DisplayColor;
236
            }
237
            catch (Exception)
238
            {
239
                return "#FFFFFF";
240
            }
241
        }
242

    
243
        void SaveTimer_Tick(object sender, EventArgs e)
244
        {
245
            //if (this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode != IKCOM.MouseHandlingMode.Drawing)
246
            if (this.ParentOfType<MainWindow>().dzMainMenu.currentControl == null && this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count == 0)
247
            {
248
                SaveEvent(null, null);
249
            }
250

    
251
        }
252

    
253
        private void SaveTime(bool IsRun)
254
        {
255
            if(SaveTimer == null)
256
            {
257
                SaveTimer = new System.Windows.Threading.DispatcherTimer();
258
                SaveTimer.Interval = new TimeSpan(0, 0, 5);
259
                SaveTimer.Tick += new EventHandler(SaveTimer_Tick);
260
            }
261

    
262
            if (IsRun)
263
            {
264
                SaveTimer.Start();
265
            }
266
            else
267
            {
268
                SaveTimer.Stop();
269
            }
270
        }
271
        private void SaveTime(bool IsRun,int timeinterval)
272
        {
273
            if (SaveTimer == null)
274
            {
275
                SaveTimer = new System.Windows.Threading.DispatcherTimer();
276
                SaveTimer.Interval = new TimeSpan(0, timeinterval, 0);
277
                SaveTimer.Tick += new EventHandler(SaveTimer_Tick);
278
            }
279
            else
280
            {
281
                SaveTimer.Stop();
282
                SaveTimer.Interval = new TimeSpan(0, timeinterval, 0);
283
            }
284

    
285
            if (IsRun)
286
            {
287
                SaveTimer.Start();
288
            }
289
            else
290
            {
291
                SaveTimer.Stop();
292
            }
293
        }
294
        /// <summary>
295
        /// enable busy indicator and then call _SaveEvent method.
296
        /// </summary>
297
        /// <param name="sender"></param>
298
        /// <param name="e"></param>
299
        public void SaveEvent(object sender, RoutedEventArgs e)
300
        {
301
            this.ParentOfType<MainWindow>().dzMainMenu.EmptyControlCheck();
302

    
303
            if (this.ParentOfType<MainWindow>().dzMainMenu.busyIndicator.IsBusy == true) return;
304

    
305
            this.ParentOfType<MainWindow>().dzMainMenu.busyIndicator.IsBusy = true;
306

    
307
            System.Threading.Tasks.Task SaveTask = System.Threading.Tasks.Task.Factory.StartNew(() =>
308
            {
309
                Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action<object, RoutedEventArgs>(_SaveEvent), sender, e);
310
            }).ContinueWith(task =>
311
            {
312
                Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate () { this.ParentOfType<MainWindow>().dzMainMenu.busyIndicator.IsBusy = false; }));
313
            });
314
        }
315

    
316
        /// <summary>
317
        /// save document
318
        /// </summary>
319
        /// <param name="sender"></param>
320
        /// <param name="e"></param>
321
        public void _SaveEvent(object sender, RoutedEventArgs e)
322
        {
323
            try
324
            {
325
                this.ParentOfType<MainWindow>().dzMainMenu.ReleaseAdorner();
326

    
327
                this.ParentOfType<MainWindow>().dzMainMenu.InkControl_Convert();
328

    
329
                var menu = this.ParentOfType<MainWindow>().dzMainMenu;
330

    
331
                //콘솔리 데잇일 경우 
332
                //if (ViewerDataModel.Instance.IsConsolidate && menu.gridViewMarkup.SelectedItems.Count > 1)
333
                //if (ViewerDataModel.Instance.IsConsolidate)
334
                //{
335
                //    ViewerDataModel.Instance.IsConsolidate = false;
336
                //    return;
337
                //}
338

    
339
                //코멘트가 없을 경우
340
                //if (ViewerDataModel.Instance.MarkupControls_USER.Count == 0)
341
                //{
342
                //    foreach (var item in menu.gridViewMarkup.SelectedItems)
343
                //    {
344
                //        if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
345
                //        {
346
                //            this.ParentOfType<MainWindow>().dzMainMenu.DeleteItem((item as IKCOM.MarkupInfoItem));
347
                //            return;
348
                //        }
349
                //    }
350
                //}
351

    
352
                //코멘트가 없을 경우
353
                if (ViewerDataModel.Instance.MarkupList_USER.Count == 0)
354
                {
355
                    foreach (var item in menu.gridViewMarkup.SelectedItems)
356
                    {
357
                        if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
358
                        {
359
                            this.ParentOfType<MainWindow>().dzMainMenu.DeleteItem((item as IKCOM.MarkupInfoItem));
360
                            return;
361
                        }
362
                    }
363
                }
364

    
365
                if (ViewerDataModel.Instance.MarkupList_USER.Count > 0)
366
                {
367
                    foreach (var item in menu.gridViewMarkup.SelectedItems)
368
                    {
369
                        if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
370
                        {
371
                            /*
372
                            if (menu.UndoData.Markup_List[0].Markup..GetType().Name == "TextControl" && ((MarkupToPDF.Controls.Text.TextControl)(item as IKCOM.MarkupInfoItem).MarkupList[0].).OverViewText == null)
373
                            {
374
                            }
375

    
376
                            this.ParentOfType<MainWindow>().dzMainMenu.DeleteItem((item as IKCOM.MarkupInfoItem));
377
                            return;*/
378
                        }
379
                    }
380
                }
381
                
382

    
383
                    //코멘트가 없을 경우
384
                    //if (ViewerDataModel.Instance.MarkupControls_USER.Count == 0)
385
                    //if (ViewerDataModel.Instance.MarkupControls_USER.Count == 0 && menu.gridViewMarkup.SelectedItems.Count == 0)
386
                    //{
387
                    //    foreach (var item in menu.gridViewMarkup.SelectedItems)
388
                    //    {
389
                    //        if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
390
                    //        {
391
                    //            this.ParentOfType<MainWindow>().dzMainMenu.DeleteItem((item as IKCOM.MarkupInfoItem));
392
                    //            return;
393
                    //        }
394
                    //    }
395
                    //}
396

    
397
                    menu.ChangeCommentReact();
398

    
399
                if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true)
400
                {
401
                    RefactoryCommentReact(menu);
402
                }
403
                else if (menu.gridViewMarkup.SelectedItems.Count == 0 && menu.gridViewMarkup.Items.Count > 0)
404
                {
405
                    this.ParentOfType<MainWindow>().DialogMessage_Alert("Please Select Your Comment List Item", "Alert");
406
                    return;
407
                }
408
                //else if (menu.gridViewMarkup.SelectedItems.Count == 0 || (menu.gridViewMarkup.SelectedItems.FirstOrDefault() as  IKCOM.MarkupInfoItem).UserID != App.ViewInfo.UserID)
409
                //{
410
                //    this.ParentOfType<MainWindow>().DialogMessage_Alert("Please Select Your Comment List Item", "Alert");
411
                //    return;
412
                //}
413
                // 변경
414
                else
415
                {
416
                    foreach (var item in menu.gridViewMarkup.SelectedItems)
417
                    {
418
                        if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
419
                        {
420
                            RefactoryCommentReact(menu);
421
                            ViewerDataModel.Instance._markupInfoList.Where(data => data.MarkupInfoID == (item as IKCOM.MarkupInfoItem).MarkupInfoID).FirstOrDefault().UpdateTime = DateTime.Now;
422

    
423
                            if (ViewerDataModel.Instance.IsConsolidate)
424
                            {
425
                                return;
426
                            }
427
                            menu.gridViewMarkup.ItemsSource = null;
428
                            menu.gridViewMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoList;
429
                            menu.gridViewMarkup.SelectedItem = item;
430

    
431
                            if (sender != null)
432
                            {
433
                                if (ViewerDataModel.Instance.IsPressCtrl)
434
                                {
435
                                    ViewerDataModel.Instance.IsPressCtrl = false;
436
                                }
437
                                this.ParentOfType<MainWindow>().DialogMessage_Alert("Save 가 완료되었습니다.", "Alert");
438
                            }
439
                            return;
440
                        }
441
                    }
442
                    ////강인구 변경
443
                    //this.ParentOfType<MainWindow>().DialogMessage_Alert("Please Select Your Comment List Item", "Alert");
444
                }
445
                if (sender != null)
446
                {
447
                    if (ViewerDataModel.Instance.IsPressCtrl)
448
                    {
449
                        ViewerDataModel.Instance.IsPressCtrl = false;
450
                    }
451
                    this.ParentOfType<MainWindow>().DialogMessage_Alert("Save 가 완료되었습니다.", "Alert");
452
                }
453
            }
454
            finally
455
            {
456
            }
457
        }
458

    
459
		public void RefactoryCommentReact(MainMenu menu)
460
        {
461
            this.ParentOfType<MainWindow>().dzMainMenu.InkControl_Convert();
462

    
463
            Save save = new Save();
464

    
465
            //추가
466
            List<IKCOM.MarkupInfoItem> MySelectItem = new List<IKCOM.MarkupInfoItem>();
467

    
468
            foreach(var item in menu.gridViewMarkup.SelectedItems)
469
            {
470
                if ((item as IKCOM.MarkupInfoItem).UserID == App.ViewInfo.UserID)
471
                {
472
                    MySelectItem.Add(item as IKCOM.MarkupInfoItem);
473
                }
474
            }
475

    
476
            //MySelectItem = (menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem);
477

    
478

    
479
            save.Project_No = App.ViewInfo.ProjectNO;
480
            save.document_id = App.ViewInfo.DocumentItemID;
481
            save.user_id = App.ViewInfo.UserID;
482
            save.page_no = Convert.ToInt32(tlcurrentPage.Text);
483

    
484
            try
485
            {
486
                menu.ChangeCommentReact();
487
                if (menu.PreviewUserMarkupInfoItem != null) //신규 코멘트인지(MarkupInfo가 없는 경우)
488
                {
489
                    if (menu.gridViewMarkup.SelectedItems.FirstOrDefault() != null) //복수 페이지 혹은 저장한 경우
490
                    {
491
                        foreach(var item in MySelectItem)
492
                        {
493
                            save.MarkupSave(item);
494
                        }
495
                        //save.MarkupSave(menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem);
496
                    }
497
                    else  //단일 페이지인 경우
498
                    {
499
                        //menu.ChangeCommentReact();
500
                        foreach (var item in MySelectItem)
501
                        {
502
                            save.MarkupSave(item);
503
                        }
504
                        //save.MarkupSave(menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem);
505
                    }
506
                }
507
                else //기존 코멘트에 작업하는 경우
508
                {
509
                    if (menu.gridViewMarkup.SelectedItems.FirstOrDefault() != null)
510
                    {
511
                        foreach (var item in MySelectItem)
512
                        {
513
                            save.MarkupSave(item);
514
                        }
515
                        //save.MarkupSave(menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem);
516
                    }
517
                }
518
                save.PageAngleSave(App.ViewInfo.ProjectNO, ViewerDataModel.Instance.RotationDocs);
519

    
520
            }
521
            catch (Exception ex)
522
            {
523
                this.ParentOfType<MainWindow>().dzMainMenu.DialogMessage_Alert("세이브 실패", "Alert");
524
            }
525
        }
526

    
527
        //강인구 추가
528
        public void Print_Start(string Type)
529
        {
530
            if (ViewerDataModel.Instance.IsPressCtrl)
531
            {
532
                ViewerDataModel.Instance.IsPressCtrl = false;
533
            }
534
            if (ViewerDataModel.Instance.MarkupControls_USER.Count > 0 || this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0)
535
            {
536
                var menu = this.ParentOfType<MainWindow>().dzMainMenu;
537
                menu.ReleaseAdorner();
538
                if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true)
539
                {
540
                    RefactoryCommentReact(menu);
541
                }
542
                else if (menu.gridViewMarkup.SelectedItems.Count == 0 || (menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem).UserID != App.ViewInfo.UserID)
543
                {
544

    
545
                }
546
                else
547
                {
548
                    RefactoryCommentReact(menu);
549
                }
550
            }
551

    
552
            bool isprint = false;
553
            if (Type == "Print")
554
            {
555
                isprint = true;
556
            }
557

    
558
            RadWindow PrintWindow = new RadWindow();
559
            IKCOM.MarkupInfoItem _result = null;
560
            PrintWindow.Width = 850;
561
            PrintWindow.Height = 600;
562
            //PrintWindow.Width = 650;
563
            //PrintWindow.Height = 550;
564
            PrintWindow.Header = Type;
565

    
566
            List<IKCOM.MarkupInfoItem> markupinfo = new List<IKCOM.MarkupInfoItem>();
567

    
568
            Logger.sendReqLog("GetPrintDocItemList: ", App.ViewInfo.ProjectNO + "," + App.ViewInfo.DocumentItemID + "," + ViewerDataModel.Instance._markupInfoList.ToList(), 1);
569
            markupinfo = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetPrintDocItemList(App.ViewInfo.ProjectNO, App.ViewInfo.DocumentItemID, ViewerDataModel.Instance._markupInfoList.ToList());
570

    
571
            if (markupinfo.Count() > 0)
572
            {
573
                Logger.sendResLog("GetPrintDocItemList", "TRUE", 1);
574
            }
575
            else
576
            {
577
                Logger.sendResLog("GetPrintDocItemList", "FALSE", 1);
578
            }
579

    
580
            var Tile_Url = string.Format(@"{0}/TileSource/{1}_Tile/{2}/{3}/",
581
                App.SystemInfo.HostName,
582
                App.ViewInfo.ProjectNO,
583
                (Convert.ToInt64(App.ViewInfo.DocumentItemID) / 100).ToString(),
584
                App.ViewInfo.DocumentItemID
585
                );
586

    
587
            PrintWindow.Content = new KCOM.Control.PrintControl(
588
                      Tile_Url,
589
                      App.ViewInfo.ProjectNO,
590
                      this.ParentOfType<MainWindow>().dzMainMenu._DocInfo, markupinfo,
591
                      this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber,
592
                      App.ViewInfo.DocumentItemID,
593
                      this.ParentOfType<MainWindow>().dzMainMenu._DocItem.DOCUMENT_NO,
594
                      this.ParentOfType<MainWindow>().dzMainMenu._DocItem.ORIGINAL_FILE, isprint);
595

    
596
            //프린트 팝업 옵션
597
            //PrintWindow.BorderThickness = new Thickness(3);
598
            //PrintWindow.BorderBrush = new SolidColorBrush(Color.FromArgb(255, 37, 160, 218));
599
            PrintWindow.ResizeMode = System.Windows.ResizeMode.NoResize;
600
            PrintWindow.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
601
            PrintWindow.Background = new SolidColorBrush(Colors.Black);
602
            PrintWindow.Background.Opacity = 0.6;
603

    
604
            Telerik.Windows.Controls.StyleManager.SetTheme(PrintWindow, new Telerik.Windows.Controls.VisualStudio2013Theme());
605
            PrintWindow.ShowDialog();
606
        }
607

    
608
        //강인구 추가
609
        private void PrintEvent(object sender, RoutedEventArgs e)
610
        {
611
            RadRibbonButton button = sender as RadRibbonButton;
612
            Print_Start(button.Content.ToString());
613
        }
614

    
615
        private List<AdornerMember> GetAdornerItem()
616
        {
617
            List<AdornerMember> AdonerList = new List<AdornerMember>();
618

    
619
            if (this.ParentOfType<MainWindow>() != null)
620
            {
621
                if (this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0)
622
                {
623
                    foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children)
624
                    {
625
                        if (item.GetType().Name == "AdornerFinal")
626
                        {
627
                            foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
628
                            {
629
                                AdonerList.Add(InnerItem);
630
                            }
631
                        }
632
                    }
633
                }
634
            }
635
            return AdonerList;
636
        }
637
        /// <summary>
638
        /// 투명도
639
        /// </summary>
640
        /// <param name="sender"></param>
641
        /// <param name="e"></param>
642
        //강인구 추가(Undo End)
643
        private void sdOpacity_ValueChanged(object sender, RoutedEventArgs e)
644
        {
645
            List<AdornerMember> AdonerList = GetAdornerItem();
646
            if(AdonerList.Count > 0)
647
            {
648
                Undo_data UndoData = new Undo_data()
649
                {
650
                    IsUndo = false,
651
                    Event = Event_Type.Option,
652
                    EventTime = DateTime.Now,
653
                    Opacity = ViewerDataModel.Instance.ControlOpacity,
654
                    Markup_List = new List<Multi_Undo_data>()
655
                };
656
                Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
657

    
658
                foreach (AdornerMember InnerItem in AdonerList)
659
                {
660
                    InnerItem.DrawingData.Opacity = ViewerDataModel.Instance.ControlOpacity;
661
                  
662
                    multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
663
                    UndoData.Markup_List.Add(multi_Undo_Data);
664
                    multi_Undo_Data = new Multi_Undo_data();
665
                }
666

    
667
                ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
668
                {
669
                    ViewerDataModel.Instance.UndoDataList.Remove(i);
670
                });
671
                ViewerDataModel.Instance.UndoDataList.Add(UndoData);
672
            }
673
        }
674

    
675
        //강인구 추가(Undo End)
676
        private void cbLineSize_ValueChanged(object sender, RadRangeBaseValueChangedEventArgs e)
677
        {
678
            if (string.IsNullOrEmpty(cbLineSize.Value.ToString()))
679
            {
680
                cbLineSize.Value = cbLineSize.Minimum;
681
            }
682
            List<AdornerMember> AdonerList = GetAdornerItem();
683
            if (AdonerList.Count > 0)
684
            {
685
                Undo_data UndoData = new Undo_data()
686
                {
687
                    IsUndo = false,
688
                    Event = Event_Type.Option,
689
                    EventTime = DateTime.Now,
690
                    LineSize = ViewerDataModel.Instance.LineSize,
691
                    Markup_List = new List<Multi_Undo_data>()
692
                };
693
                Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
694

    
695
                foreach (AdornerMember InnerItem in AdonerList)
696
                {
697
                    switch (InnerItem.DrawingData.GetType().Name)
698
                    {
699
                        case ("LineControl"):
700
                            {
701
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Line.LineControl).LineSize = ViewerDataModel.Instance.LineSize;
702
                            }
703
                            break;
704
                        case ("ArcControl"):
705
                            {
706
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Line.ArcControl).LineSize = ViewerDataModel.Instance.LineSize;
707
                            }
708
                            break;
709
                        case ("ArrowArcControl"):
710
                            {
711
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Line.ArrowArcControl).LineSize = ViewerDataModel.Instance.LineSize;
712
                            }
713
                            break;
714
                        case ("ArrowControl_Multi"):
715
                            {
716
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Line.ArrowControl_Multi).LineSize = ViewerDataModel.Instance.LineSize;
717
                            }
718
                            break;
719
                        case ("CloudControl"):
720
                            {
721
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Polygon.CloudControl).LineSize = ViewerDataModel.Instance.LineSize;
722
                            }
723
                            break;
724
                        case ("PolygonControl"):
725
                            {
726
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Polygon.PolygonControl).LineSize = ViewerDataModel.Instance.LineSize;
727
                            }
728
                            break;
729
                        case ("RectangleControl"):
730
                            {
731
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Shape.RectangleControl).LineSize = ViewerDataModel.Instance.LineSize;
732
                            }
733
                            break;
734
                        case ("RectCloudControl"):
735
                            {
736
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Shape.RectCloudControl).LineSize = ViewerDataModel.Instance.LineSize;
737
                            }
738
                            break;
739
                        case ("TriControl"):
740
                            {
741
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Shape.TriControl).LineSize = ViewerDataModel.Instance.LineSize;
742
                            }
743
                            break;
744
                        case ("CircleControl"):
745
                            {
746
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Shape.CircleControl).LineSize = ViewerDataModel.Instance.LineSize;
747
                            }
748
                            break;
749
                        case ("ArrowTextControl"):
750
                            {
751
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).LineSize = ViewerDataModel.Instance.LineSize;
752
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).BorderSize = new Thickness(ViewerDataModel.Instance.LineSize);
753
                            }
754
                            break;
755
                        case ("TextControl"):
756
                            {
757
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).LineSize = new Thickness(ViewerDataModel.Instance.LineSize);
758
                            }
759
                            break;
760
                    }
761
                    
762

    
763
                    multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
764
                    UndoData.Markup_List.Add(multi_Undo_Data);
765
                    multi_Undo_Data = new Multi_Undo_data();
766
                }
767

    
768
                ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
769
                {
770
                    ViewerDataModel.Instance.UndoDataList.Remove(i);
771
                });
772
                ViewerDataModel.Instance.UndoDataList.Add(UndoData);
773

    
774
                
775
            }
776
            KCOM.Properties.Settings.Default.LineSize = (double)cbLineSize.Value;
777
            Properties.Settings.Default.Save();
778
        }
779

    
780

    
781
        private void cbIntervalSize_ValueChanged(object sender, RadRangeBaseValueChangedEventArgs e)
782
        {
783
            if (string.IsNullOrEmpty(cbIntervalSize.Value.ToString()))
784
            {
785
                cbIntervalSize.Value = cbIntervalSize.Minimum;
786
            }
787
            List<AdornerMember> AdonerList = GetAdornerItem();
788
            if (AdonerList.Count > 0)
789
            {
790

    
791
                Undo_data UndoData = new Undo_data()
792
                {
793
                    IsUndo = false,
794
                    Event = Event_Type.Option,
795
                    EventTime = DateTime.Now,
796
                    Interval = ViewerDataModel.Instance.Interval,
797
                    Markup_List = new List<Multi_Undo_data>()
798
                };
799
                Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
800

    
801
                foreach (AdornerMember InnerItem in AdonerList)
802
                {
803
                    switch (InnerItem.DrawingData.GetType().Name)
804
                    {
805
                        case ("LineControl"):
806
                            {
807
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Line.LineControl).Interval = ViewerDataModel.Instance.Interval;
808

    
809
                                multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
810
                                UndoData.Markup_List.Add(multi_Undo_Data);
811
                                multi_Undo_Data = new Multi_Undo_data();
812
                            }
813
                            break;
814
                    }
815
                }
816

    
817
                ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
818
                {
819
                    ViewerDataModel.Instance.UndoDataList.Remove(i);
820
                });
821
                ViewerDataModel.Instance.UndoDataList.Add(UndoData);
822
            }
823
            KCOM.Properties.Settings.Default.Interval = (double)cbIntervalSize.Value;
824
            Properties.Settings.Default.Save();
825
        }
826
        
827
        private void cbArcLength_ValueChanged(object sender, RadRangeBaseValueChangedEventArgs e)
828
        {
829
            if (string.IsNullOrEmpty(cbArcLength.Value.ToString()))
830
            {
831
                cbArcLength.Value = cbArcLength.Minimum;
832
            }
833
            List<AdornerMember> AdonerList = GetAdornerItem();
834
            if (AdonerList.Count > 0)
835
            {
836

    
837
                //Undo_data UndoData = new Undo_data()
838
                //{
839
                //    IsUndo = false,
840
                //    Event = Event_Type.Option,
841
                //    EventTime = DateTime.Now,
842
                //    Interval = ViewerDataModel.Instance.Interval,
843
                //    Markup_List = new List<Multi_Undo_data>()
844
                //};
845
                Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
846

    
847
                foreach (AdornerMember InnerItem in AdonerList)
848
                {
849
                    switch (InnerItem.DrawingData.GetType().Name)
850
                    {
851
                        case ("RectCloudControl"):
852
                            {
853
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Shape.RectCloudControl).ArcLength = ViewerDataModel.Instance.ArcLength;
854

    
855
                                //multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
856
                                //UndoData.Markup_List.Add(multi_Undo_Data);
857
                                //multi_Undo_Data = new Multi_Undo_data();
858
                            }
859
                            break;
860
                        case ("CloudControl"):
861
                            {
862
                                (InnerItem.DrawingData as MarkupToPDF.Controls.Polygon.CloudControl).ArcLength = ViewerDataModel.Instance.ArcLength;
863

    
864
                                //multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
865
                                //UndoData.Markup_List.Add(multi_Undo_Data);
866
                                //multi_Undo_Data = new Multi_Undo_data();
867
                            }
868
                            break;
869
                    }
870
                }
871

    
872
                //ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
873
                //{
874
                //    ViewerDataModel.Instance.UndoDataList.Remove(i);
875
                //});
876
                //ViewerDataModel.Instance.UndoDataList.Add(UndoData);
877
            }
878

    
879
            KCOM.Properties.Settings.Default.ArcLength = (double)cbArcLength.Value;
880
            Properties.Settings.Default.Save();
881
        }
882

    
883
        //강인구 추가(Undo End)
884
        private void cbDashStyle_SelectionChanged(object sender, SelectionChangedEventArgs e)
885
        {
886
            //강인구 추가
887
            if (this.ParentOfType<MainWindow>() != null)
888
            {
889
                ViewerDataModel.Instance.DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData;
890
                if (this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0)
891
                {
892
                    Undo_data UndoData = new Undo_data()
893
                    {
894
                        IsUndo = false,
895
                        Event = Event_Type.Option,
896
                        EventTime = DateTime.Now,
897
                        DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData,
898
                        Markup_List = new List<Multi_Undo_data>()
899
                    };
900
                    Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
901

    
902
                    foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children)
903
                    {
904
                        if (item.GetType().Name == "AdornerFinal")
905
                        {
906
                            foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
907
                            {
908
                                switch (InnerItem.DrawingData.GetType().Name)
909
                                {
910
                                    case ("LineControl"):
911
                                        {
912
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Line.LineControl).DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData;
913
                                        }
914
                                        break;
915
                                    case ("ArcControl"):
916
                                        {
917
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Line.ArcControl).DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData;
918
                                        }
919
                                        break;
920
                                    case ("ArrowArcControl"):
921
                                        {
922
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Line.ArrowArcControl).DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData;
923
                                        }
924
                                        break;
925
                                    case ("ArrowControl_Multi"):
926
                                        {
927
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Line.ArrowControl_Multi).DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData;
928
                                        }
929
                                        break;
930
                                    case ("CloudControl"):
931
                                        {
932
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Polygon.CloudControl).DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData;
933
                                        }
934
                                        break;
935
                                    case ("PolygonControl"):
936
                                        {
937
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Polygon.PolygonControl).DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData;
938
                                        }
939
                                        break;
940
                                    case ("RectangleControl"):
941
                                        {
942
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Shape.RectangleControl).DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData;
943
                                        }
944
                                        break;
945
                                    case ("RectCloudControl"):
946
                                        {
947
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Shape.RectCloudControl).DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData;
948
                                        }
949
                                        break;
950
                                    case ("TriControl"):
951
                                        {
952
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Shape.TriControl).DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData;
953
                                        }
954
                                        break;
955
                                    case ("CircleControl"):
956
                                        {
957
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Shape.CircleControl).DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData;
958
                                        }
959
                                        break;                                    
960
                                }
961

    
962
                                multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
963
                                UndoData.Markup_List.Add(multi_Undo_Data);
964
                                multi_Undo_Data = new Multi_Undo_data();
965
                            }
966

    
967
                            ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
968
                            {
969
                                ViewerDataModel.Instance.UndoDataList.Remove(i);
970
                            });
971
                            ViewerDataModel.Instance.UndoDataList.Add(UndoData);
972
                        }
973
                    }
974
                }
975
            }
976
        }
977

    
978
        //강인구 추가
979
        private void comboFontSize_SelectionChanged(object sender, SelectionChangedEventArgs e)
980
        {
981
            //if (this.ParentOfType<MainWindow>() != null)
982
            //{
983
            //    if (this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0)
984
            //    {
985
            //        foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children)
986
            //        {
987
            //            if (item.GetType().Name == "AdornerFinal")
988
            //            {
989
            //                foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
990
            //                {
991
            //                    switch (InnerItem.DrawingData.GetType().Name)
992
            //                    {
993
            //                        case ("TextControl"):
994
            //                            {
995
            //                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).TextSize = int.Parse(comboFontSize.Text);
996
            //                            }
997
            //                            break;
998
            //                        case ("ArrowTextControl"):
999
            //                            {
1000
            //                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).TextSize = int.Parse(comboFontSize.Text);
1001
            //                            }
1002
            //                            break;
1003
            //                    }
1004
            //                }
1005
            //            }
1006
            //        }
1007
            //    }
1008
            //}
1009
        }
1010

    
1011
        //강인구 추가
1012
        private void btnBold_Checked(object sender, RoutedEventArgs e)
1013
        {
1014
            if (this.ParentOfType<MainWindow>() != null)
1015
            {
1016
                if (this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0)
1017
                {
1018
                    foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children)
1019
                    {
1020
                        if (item.GetType().Name == "AdornerFinal")
1021
                        {
1022
                            foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
1023
                            {
1024
                                switch (InnerItem.DrawingData.GetType().Name)
1025
                                {
1026
                                    case ("TextControl"):
1027
                                        {
1028
                                            if((InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).TextWeight == FontWeights.Bold)
1029
                                            {
1030
                                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).TextWeight = FontWeights.Normal;
1031
                                            }
1032
                                            else
1033
                                            {
1034
                                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).TextWeight = FontWeights.Bold;
1035
                                            }
1036

    
1037
                                        }
1038
                                        break;
1039
                                    case ("ArrowTextControl"):
1040
                                        {
1041
                                            if ((InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).TextWeight == FontWeights.Bold)
1042
                                            {
1043
                                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).TextWeight = FontWeights.Normal;
1044
                                            }
1045
                                            else
1046
                                            {
1047
                                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).TextWeight = FontWeights.Bold;
1048
                                            }
1049
                                        }
1050
                                        break;
1051
                                }
1052
                            }
1053
                        }
1054
                    }
1055
                }
1056
            }
1057
        }
1058

    
1059
        //강인구 추가
1060
        private void btnItalic_Checked(object sender, RoutedEventArgs e)
1061
        {
1062
            if (this.ParentOfType<MainWindow>() != null)
1063
            {
1064
                if (this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0)
1065
                {
1066
                    foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children)
1067
                    {
1068
                        if (item.GetType().Name == "AdornerFinal")
1069
                        {
1070
                            foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
1071
                            {
1072
                                switch (InnerItem.DrawingData.GetType().Name)
1073
                                {
1074
                                    case ("TextControl"):
1075
                                        {
1076
                                            if((InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).TextStyle == FontStyles.Italic)
1077
                                            {
1078
                                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).TextStyle = System.Windows.FontStyles.Normal;
1079
                                            }
1080
                                            else
1081
                                            {
1082
                                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).TextStyle = FontStyles.Italic;
1083
                                            }
1084

    
1085
                                        }
1086
                                        break;
1087
                                    case ("ArrowTextControl"):
1088
                                        {
1089
                                            if((InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).TextStyle == FontStyles.Italic)
1090
                                            {
1091
                                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).TextStyle = FontStyles.Normal;
1092
                                            }
1093
                                            else
1094
                                            {
1095
                                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).TextStyle = FontStyles.Italic;
1096
                                            }
1097
                                        }
1098
                                        break;
1099
                                }
1100
                            }
1101
                        }
1102
                    }
1103
                }
1104
            }
1105
        }
1106

    
1107
        //강인구 추가
1108
        private void btnUnderLine_Checked(object sender, RoutedEventArgs e)
1109
        {
1110
            if (this.ParentOfType<MainWindow>() != null)
1111
            {
1112
                if (this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0)
1113
                {
1114
                    foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children)
1115
                    {
1116
                        if (item.GetType().Name == "AdornerFinal")
1117
                        {
1118
                            foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
1119
                            {
1120
                                switch (InnerItem.DrawingData.GetType().Name)
1121
                                {
1122
                                    case ("TextControl"):
1123
                                        {
1124
                                            if ((InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).UnderLine == TextDecorations.Underline)
1125
                                            {
1126
                                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).UnderLine = null;
1127
                                            }
1128
                                            else
1129
                                            {
1130
                                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).UnderLine = TextDecorations.Underline;
1131
                                            }
1132
                                        }
1133
                                        break;
1134
                                    case ("ArrowTextControl"):
1135
                                        {
1136
                                            if ((InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).UnderLine == TextDecorations.Underline)
1137
                                            {
1138
                                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).UnderLine = null;
1139
                                            }
1140
                                            else
1141
                                            {
1142
                                                (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).UnderLine = TextDecorations.Underline;
1143
                                            }
1144
                                        }
1145
                                        break;
1146
                                }
1147
                            }
1148
                        }
1149
                    }
1150
                }
1151
            }
1152
        }
1153

    
1154
        private void AxisLockEvent(object sender, RoutedEventArgs e)
1155
        {
1156
            ViewerDataModel.Instance.checkAxis = cbAxisLock.IsChecked.Value;
1157
        }
1158

    
1159
        private void comboFontSize_ValueChanged(object sender, RadRangeBaseValueChangedEventArgs e)
1160
        {
1161
            if (string.IsNullOrEmpty(comboFontSize.Value.ToString()))
1162
            {
1163
                comboFontSize.Value = comboFontSize.Minimum;
1164
            }
1165
            if (this.ParentOfType<MainWindow>() != null)
1166
            {
1167
                if (this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0)
1168
                {
1169
                    foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children)
1170
                    {
1171
                        if (item.GetType().Name == "AdornerFinal")
1172
                        {
1173
                            foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
1174
                            {
1175
                                switch (InnerItem.DrawingData.GetType().Name)
1176
                                {
1177
                                    case ("TextControl"):
1178
                                        {
1179
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).TextSize = int.Parse(comboFontSize.Value.ToString());
1180
                                        }
1181
                                        break;
1182
                                    case ("ArrowTextControl"):
1183
                                        {
1184
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).TextSize = int.Parse(comboFontSize.Value.ToString());
1185
                                        }
1186
                                        break;
1187
                                }
1188
                            }
1189
                        }
1190
                    }
1191
                }
1192
            }
1193
            KCOM.Properties.Settings.Default.TextSize = (double)comboFontSize.Value;
1194
            Properties.Settings.Default.Save();
1195
        }
1196

    
1197
        //강인구 추가
1198
        private void RadRibbonComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
1199
        {
1200
            if (this.ParentOfType<MainWindow>() != null)
1201
            {
1202
                if (this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0)
1203
                {
1204
                    foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children)
1205
                    {
1206
                        if (item.GetType().Name == "AdornerFinal")
1207
                        {
1208
                            foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
1209
                            {
1210
                                switch (InnerItem.DrawingData.GetType().Name)
1211
                                {
1212
                                    case ("TextControl"):
1213
                                        {
1214
                                            //if ((InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).FontFamily == TextDecorations.Underline)
1215
                                            //{
1216
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).FontFamily = new FontFamily(comboFontFamily.Text);
1217
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).Base_TextBlock.FontFamily = new FontFamily(comboFontFamily.Text);
1218
                                            (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).Base_TextBox.FontFamily = new FontFamily(comboFontFamily.Text);
1219
                                            //}
1220
                                            //else
1221
                                            //{
1222
                                            //    (InnerItem.DrawingData as MarkupToPDF.Controls.Text.TextControl).UnderLine = TextDecorations.Underline;
1223
                                            //}
1224
                                        }
1225
                                        break;
1226
                                    case ("ArrowTextControl"):
1227
                                        {
1228
                                            //if ((InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).UnderLine == TextDecorations.Underline)
1229
                                            //{
1230
                                            //    (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).UnderLine = null;
1231
                                            //}
1232
                                            //else
1233
                                            //{
1234
                                            //    (InnerItem.DrawingData as MarkupToPDF.Controls.Text.ArrowTextControl).UnderLine = TextDecorations.Underline;
1235
                                            //}
1236
                                        }
1237
                                        break;
1238
                                }
1239
                            }
1240
                        }
1241
                    }
1242
                }
1243
            }
1244
        }
1245

    
1246
        /// <summary>
1247
        /// 텍스트 컨트롤 하일라이트 처리
1248
        /// </summary>
1249
        /// <param name="sender"></param>
1250
        /// <param name="e"></param>
1251
        private void HighlightEvent(object sender, RoutedEventArgs e)
1252
        {
1253

    
1254
            ViewerDataModel.Instance.checkHighShape = (sender as CheckBox).IsChecked.Value;
1255
            SetHighlightEvent();
1256
            //if ((sender as CheckBox).IsChecked.Value)
1257
            //{
1258
            //    TaskMessage("HighLight가 설정되었습니다", TaskMessageType.Normal);
1259
            //}
1260
            //else
1261
            //{
1262
            //    TaskMessage("HighLight가 해제되었습니다", TaskMessageType.Caption);
1263
            //}
1264
            //if (ViewerDataModel.Instance.SelectedEditor as MarkupToPDF.Controls.Text.TextControl != null)
1265
            //{
1266
            //    MarkupToPDF.Controls.Text.TextControl instance = (ViewerDataModel.Instance.SelectedEditor as MarkupToPDF.Controls.Text.TextControl);
1267
            //    instance.IsHighLight = ViewerDataModel.Instance.checkHighShape;
1268
            //    instance.SetText();
1269
            //}
1270
        }
1271

    
1272
        //추가페이지 이동 엔터
1273
        private void tlcurrentPage_KeyDown(object sender, KeyEventArgs e)
1274
        {
1275
            //강인구 추가 tlcurrentPage을 이상하게 입력할수 있기때문에 Try Catch
1276
            if (e.Key == Key.Enter)
1277
            {
1278
                try
1279
                {
1280
                    var instanceMain = this.ParentOfType<MainWindow>();
1281
                    instanceMain.dzMainMenu.pageNavigator.GotoPage(Convert.ToInt32(tlcurrentPage.Text));
1282
                }
1283
                catch (Exception)
1284
                {
1285
                    RadWindow.Alert(new DialogParameters
1286
                    {
1287
                        Theme = new VisualStudio2013Theme(),
1288
                        Header = "안내",
1289
                        Content = "페이지 번호를 정확하게 입력해 주세요",
1290
                    });
1291
                }
1292
                
1293
            }
1294
        }
1295

    
1296
        private void tlcurrentPage_readonly_KeyDown(object sender, KeyEventArgs e)
1297
        {
1298
            //강인구 추가 tlcurrentPage을 이상하게 입력할수 있기때문에 Try Catch
1299
            if (e.Key == Key.Enter)
1300
            {
1301
                try
1302
                {
1303
                    var instanceMain = this.ParentOfType<MainWindow>();
1304
                    instanceMain.dzMainMenu.pageNavigator.GotoPage(Convert.ToInt32(tlcurrentPage_readonly.Text));
1305
                }
1306
                catch (Exception)
1307
                {
1308
                    RadWindow.Alert(new DialogParameters
1309
                    {
1310
                        Theme = new VisualStudio2013Theme(),
1311
                        Header = "안내",
1312
                        Content = "페이지 번호를 정확하게 입력해 주세요",
1313
                    });
1314
                }
1315

    
1316
            }
1317
        }
1318

    
1319
        public event EventHandler<WindowClosedEventArgs> Closed;
1320

    
1321
        //private void CheckEvent(object sender, RoutedEventArgs e)
1322
        //{
1323
        //    RadWindow CheckPop = new RadWindow();
1324
        //    test check = new test();
1325

    
1326
        //    CheckPop = new RadWindow
1327
        //    {
1328
        //        Width = 1700,
1329
        //        Height = 510,
1330
        //        Header = "My Check List",
1331
        //        Content = check,
1332
        //        Owner = this,
1333
        //        ResizeMode = System.Windows.ResizeMode.NoResize,
1334
        //        WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen,
1335
        //    };
1336
        //    StyleManager.SetTheme(CheckPop, new VisualStudio2013Theme());
1337

    
1338
        //    CheckPop.Closed += CheckPop_Closed;
1339
        //    CheckPop.ShowDialog();
1340
        //}
1341

    
1342
        private void PanoramaEvent(object sender, RoutedEventArgs e)
1343
        {
1344
            PanoramaShow();
1345
        }
1346

    
1347
        public void PanoramaShow()
1348
        {
1349
            Panorama check = new Panorama();
1350
            double screenWidth = System.Windows.SystemParameters.PrimaryScreenWidth;
1351
            double screenHeight = System.Windows.SystemParameters.PrimaryScreenHeight;
1352
            //double windowWidth = this.Width;
1353
            //double windowHeight = this.Height;
1354

    
1355
            var PanoramaPop = new RadWindow
1356
            {
1357
                //MinWidth = 600,
1358
                //MinHeight = 400,
1359
                //Header = "My Check List",
1360
                Header = "Document No : " + this.ParentOfType<MainWindow>().dzMainMenu._DocItem.DOCUMENT_NO + " / Revision :" + this.ParentOfType<MainWindow>().dzMainMenu._DocItem.REVISION,
1361
                Content = check,
1362
                Owner = this,
1363
                ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip,
1364
                //ResizeMode = System.Windows.ResizeMode.NoResize,
1365
                WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen,
1366
                IsTopmost = false,
1367
                //Left = (screenWidth / 2) - (windowWidth / 2),
1368
                //Top = (screenHeight / 2) - (windowHeight / 2),
1369
                //Left = (screenWidth / 2),
1370
                //Top = (screenHeight / 2),
1371
                Width = screenWidth * 0.4,
1372
                Height = screenHeight * 0.4,
1373
            };
1374
            StyleManager.SetTheme(PanoramaPop, new VisualStudio2013Theme());
1375
            //CheckPop.ShowDialog();
1376
            PanoramaPop.Show();
1377
        }
1378

    
1379
        private void CheckEvent(object sender, RoutedEventArgs e)
1380
        {
1381
            //창이 떠있을 경우 재 실행 방지
1382
            if (isClosed)
1383
            {
1384
                //토글 및 마우스 상태 초기화
1385
                var toggleList = this.Parent.ChildrenOfType<RadToggleButton>();
1386
                foreach(var togle in toggleList)
1387
                {
1388
                    togle.IsChecked = false;
1389
                }
1390
                this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;
1391

    
1392
                isClosed = false;
1393

    
1394
                
1395
                CheckList check = new CheckList();
1396

    
1397
                CheckPop = new RadWindow
1398
                {
1399
                    MinWidth = 1200,
1400
                    MinHeight = 500,
1401
                    //Header = "My Check List",
1402
                    Header = "Document No : " + this.ParentOfType<MainWindow>().dzMainMenu._DocItem.DOCUMENT_NO + " / Revision :" + this.ParentOfType<MainWindow>().dzMainMenu._DocItem.REVISION,
1403
                    Content = check,
1404
                    //Owner = this,
1405
                    //ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip,
1406
                    ResizeMode = System.Windows.ResizeMode.NoResize,
1407
                    WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen,
1408
                    IsTopmost = true,
1409
                };
1410
                StyleManager.SetTheme(CheckPop, new Office2013Theme());
1411
                CheckPop.Closed += CheckPop_Closed;
1412
                
1413
                //CheckPop.ShowDialog();
1414
                CheckPop.Show();
1415
            }
1416
        }
1417

    
1418
        private void CheckPop_Closed(object sender, WindowClosedEventArgs e)
1419
        {
1420
            isClosed = true;
1421
            //this.ParentOfType<MainWindow>().dzMainMenu.PN_Navi.IsEnabled = true;
1422
            this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;
1423
            ViewerDataModel.Instance.Capture_Opacity = 0;
1424
        }
1425

    
1426
        /// <summary>
1427
        /// 사용자가 선택한 페이지로 이동(썸네일 동기화 시킴)
1428
        /// </summary>
1429
        /// <param name="sender"></param>
1430
        /// <param name="e"></param>
1431
        private void PageGoEvent(object sender, RoutedEventArgs e)
1432
        {
1433
            RadButton button = sender as RadButton;
1434
            var instanceMain = this.ParentOfType<MainWindow>();
1435
            
1436
            //강인구 추가 tlcurrentPage을 이상하게 입력할수 있기때문에 Try Catch
1437
            try
1438
            {
1439
                switch (button.CommandParameter.ToString())
1440
                {
1441
                    case "Down":
1442
                        {
1443
                            instanceMain.dzMainMenu.pageNavigator.GotoPage(Convert.ToInt32(tlcurrentPage.Text) + 1);
1444
                        }
1445
                        break;
1446
                    case "Up":
1447
                        {
1448
                            instanceMain.dzMainMenu.pageNavigator.GotoPage(Convert.ToInt32(tlcurrentPage.Text) - 1);
1449
                        }
1450
                        break;
1451
                }
1452
            }
1453
            catch (Exception)
1454
            {
1455
                RadWindow.Alert(new DialogParameters
1456
                {
1457
                    Theme = new VisualStudio2013Theme(),
1458
                    Header = "안내",
1459
                    Content = "페이지 번호를 정확하게 입력해 주세요",
1460
                });
1461
            }
1462
        }
1463

    
1464
        private void viewEvent(object sender, RoutedEventArgs e)
1465
        {
1466
            RadRibbonToggleButton viewButton = sender as RadRibbonToggleButton;
1467
            var instanceMain = this.ParentOfType<MainWindow>();
1468

    
1469
            Point point = new Point(instanceMain.dzMainMenu.zoomAndPanCanvas.Width / 2, instanceMain.dzMainMenu.zoomAndPanCanvas.Height / 2);
1470

    
1471
            //if ((sender as RadRibbonToggleButton) != null)
1472
            //{
1473
            //    Common.ViewerDataModel.Instance.ControlTag = (sender as RadRibbonToggleButton).Tag.ToString();
1474
            //    instanceToggle = (sender as RadRibbonToggleButton);
1475
            //}
1476

    
1477
            //instanceToggle.IsChecked = false;
1478

    
1479
            switch (viewButton.CommandParameter.ToString())
1480
            {
1481
                case "zoomout":
1482
                    {
1483
                        //장원
1484
                        //instanceMain.dzMainMenu.zoomAndPanControl.ZoomTo(new Rect(0, 0, instanceMain.dzMainMenu.zoomAndPanCanvas.ActualWidth, instanceMain.dzMainMenu.zoomAndPanCanvas.ActualHeight));
1485
                        instanceMain.dzMainMenu.zoomAndPanControl.ZoomPointToViewportCenter(ViewerDataModel.Instance.ContentScale -= 0.1, point);
1486
                        viewButton.IsChecked = false;
1487
                        //Common.ViewerDataModel.Instance.zom
1488
                    }
1489
                    break;
1490
                case "zoomin":
1491
                    {
1492
                        instanceMain.dzMainMenu.zoomAndPanControl.ZoomPointToViewportCenter(ViewerDataModel.Instance.ContentScale += 0.1, point);
1493
                        viewButton.IsChecked = false;
1494
                    }
1495
                    break;
1496
                case "fullscreen":
1497
                    {
1498
                        instanceMain.WindowState = WindowState.Maximized;
1499
                        //Sizemode 대기(강인구)
1500
                        //instanceMain.dzMainMenu.imageViewer.SizeMode = Leadtools.Windows.Controls.SizeMode.Fit;
1501
                        instanceMain.dzMainMenu.zoomAndPanControl.ScaleToFit();
1502
                        viewButton.IsChecked = false;
1503
                    }
1504
                    break;
1505
                case "fitWidth":
1506
                    {
1507
                        instanceMain.dzMainMenu.zoomAndPanControl.ScaleToFit();
1508
                        viewButton.IsChecked = false;
1509
                    }
1510
                    break;
1511
                case "fitHeight":
1512
                    {
1513
                        instanceMain.dzMainMenu.zoomAndPanControl.ScaleToFit();
1514
                        viewButton.IsChecked = false;
1515
                    }
1516
                    break;
1517
                case "boundzoom":
1518
                    {
1519

    
1520
                    }
1521
                    break;
1522
                case "Rotate_M":
1523
                    {
1524
                        drawingPannelRotate(false);
1525
                        viewButton.IsChecked = false;
1526
                    }
1527
                    break;
1528
                case "Rotate_P":
1529
                    {
1530
                        drawingPannelRotate(true);
1531
                        viewButton.IsChecked = false;
1532
                    }
1533
                    break;
1534
                case "Rotate_half":
1535
                    {
1536
                        drawingPannelRotate(true);
1537
                        drawingPannelRotate(true);
1538
                        viewButton.IsChecked = false;
1539
                    }
1540
                    break;
1541
            }
1542
        }
1543

    
1544
        private void Control_Event(object sender, RoutedEventArgs e)
1545
        {
1546

    
1547
        }
1548

    
1549
        #region 대기
1550

    
1551
        public void drawingPannelRotate(bool Flag)
1552
        {
1553
            var instanceMain = this.ParentOfType<MainWindow>();
1554

    
1555
            //if (rotateOffSet > 3)
1556
            //    rotateOffSet = 0;
1557

    
1558
            //if (rotateOffSet < 0)
1559
            //    rotateOffSet = 3;
1560

    
1561
            if(Flag)
1562
            {
1563
                if (instanceMain.dzMainMenu.rotate.Angle == 270)
1564
                {
1565
                    instanceMain.dzMainMenu.rotate.Angle = 0;
1566
                }
1567
                else
1568
                {
1569
                    instanceMain.dzMainMenu.rotate.Angle += 90;
1570
                }
1571
            }
1572
            else
1573
            {
1574
                if(instanceMain.dzMainMenu.rotate.Angle == 0)
1575
                {
1576
                    instanceMain.dzMainMenu.rotate.Angle = 270;
1577
                }
1578
                else
1579
                {
1580
                    instanceMain.dzMainMenu.rotate.Angle -= 90;
1581
                }
1582
            }
1583
            //double angle = (double)rotateValue.GetValue(rotateOffSet);
1584
            //instanceMain.dzMainMenu.rotate.Angle = angle;
1585
            var rotationNum = Math.Abs((instanceMain.dzMainMenu.rotate.Angle / 90));
1586

    
1587
            if (instanceMain.dzMainMenu.zoomAndPanCanvas.Width == ViewerDataModel.Instance.ContentWidth)
1588
            {
1589
                double emptySize = instanceMain.dzMainMenu.zoomAndPanCanvas.Width;
1590
                instanceMain.dzMainMenu.zoomAndPanCanvas.Width = instanceMain.dzMainMenu.zoomAndPanCanvas.Height;
1591
                instanceMain.dzMainMenu.zoomAndPanCanvas.Height = emptySize;
1592
            }
1593
            if (instanceMain.dzMainMenu.rotate.Angle == 0)
1594
            {
1595
                instanceMain.dzMainMenu.translate.X = 0;
1596
                instanceMain.dzMainMenu.translate.Y = 0;
1597
            }
1598
            else if (instanceMain.dzMainMenu.rotate.Angle == 90)
1599
            {
1600
                instanceMain.dzMainMenu.translate.X = instanceMain.dzMainMenu.zoomAndPanCanvas.Width;
1601
                instanceMain.dzMainMenu.translate.Y = 0;
1602
            }
1603
            else if (instanceMain.dzMainMenu.rotate.Angle == 180)
1604
            {
1605
                instanceMain.dzMainMenu.translate.X = instanceMain.dzMainMenu.zoomAndPanCanvas.Width;
1606
                instanceMain.dzMainMenu.translate.Y = instanceMain.dzMainMenu.zoomAndPanCanvas.Height;
1607
            }
1608
            else
1609
            {
1610
                instanceMain.dzMainMenu.translate.X = 0;
1611
                instanceMain.dzMainMenu.translate.Y = instanceMain.dzMainMenu.zoomAndPanCanvas.Height;
1612
            }
1613

    
1614
            //instanceMain.dzMainMenu.zoomAndPanControl.RenderTransformOrigin = new Point(0.5, 0.5);
1615
            instanceMain.dzMainMenu.zoomAndPanControl.RotationAngle = instanceMain.dzMainMenu.rotate.Angle;
1616
            //대기(강인구)
1617
            //instanceMain.dzMainMenu.imageViewer.RotateAngle = instanceMain.dzMainMenu.rotate.Angle;
1618

    
1619

    
1620
            //instanceMain.dzMainMenu.imageViewer.RenderTransformOrigin = new Point(0.5, 0.5);
1621
            //RotateTransform rotateTransform = new RotateTransform(instanceMain.dzMainMenu.rotate.Angle);
1622
            //instanceMain.dzMainMenu.imageViewer.RenderTransform = rotateTransform;
1623

    
1624

    
1625
            ViewerDataModel.Instance.ContentWidth = instanceMain.dzMainMenu.zoomAndPanCanvas.Width;
1626
            ViewerDataModel.Instance.ContentHeight = instanceMain.dzMainMenu.zoomAndPanCanvas.Height;
1627
            ViewerDataModel.Instance.AngleOffsetX = instanceMain.dzMainMenu.translate.X;
1628
            ViewerDataModel.Instance.AngleOffsetY = instanceMain.dzMainMenu.translate.Y;
1629
            ViewerDataModel.Instance.Angle = instanceMain.dzMainMenu.rotate.Angle;
1630
            //ViewerDataModel.Instance.Document_Info.Clear();
1631
            //ViewerDataModel.Instance.Document_Info.Where(i => i.PAGE_NUMBER == instanceMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber).ToList().ForEach(value =>
1632
            //{
1633
            //    value.PAGE_ANGLE = int.Parse(instanceMain.dzMainMenu.rotate.Angle.ToString());
1634
            //});
1635

    
1636

    
1637
            //이미지 각도 변경 시 실시간 Thumbnail 각도 변경(강인구 추가)
1638
            instanceMain.dzMainMenu.pageNavigator._thumbnailItems.Where(info => info.PageNumber == instanceMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber).ToList().ForEach(data =>
1639
            {
1640
                data.Angle = int.Parse(instanceMain.dzMainMenu.rotate.Angle.ToString());
1641

    
1642
                instanceMain.dzMainMenu.pageNavigator.ImgListbox.ItemsSource = instanceMain.dzMainMenu.pageNavigator._thumbnailItems;
1643
                var instance = instanceMain.dzMainMenu.CurrentDoc.docInfo.DOCPAGE.Where(p => p.PAGE_NUMBER == instanceMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber).FirstOrDefault();
1644
                instance.PAGE_ANGLE = int.Parse(instanceMain.dzMainMenu.rotate.Angle.ToString());
1645

    
1646
                instanceMain.dzMainMenu.pageNavigator.setPageChange(data);
1647

    
1648
                //rotation page add or update
1649
                var rotationdoc = ViewerDataModel.Instance.RotationDocs.Where(d => d.ID == instance.ID).FirstOrDefault();
1650
                if (rotationdoc != null)
1651
                {
1652
                    rotationdoc.PAGE_ANGLE = instance.PAGE_ANGLE;
1653
                }
1654
                else
1655
                {
1656
                    ViewerDataModel.Instance.RotationDocs.Add(instance);
1657
                }
1658
            });
1659
        }
1660
        #endregion
1661

    
1662
        private void ImageConverter()
1663
        {
1664
            var instanceMain = this.ParentOfType<MainWindow>();
1665
            //http://cloud.devdoftech.co.kr:5977/ImageUpload/FileUpload.asmx
1666

    
1667

    
1668
            Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
1669
            dlg.Filter = "All files (*.*)|*.*|PNG Images (*.png)|*.png";
1670
            Nullable<bool> result = dlg.ShowDialog();
1671
            if (result == true)
1672
            {
1673
                instanceMain.dzMainMenu.filename = dlg.FileName;
1674
                instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ImgControl;
1675

    
1676
                System.IO.FileInfo fileInfo = new System.IO.FileInfo(instanceMain.dzMainMenu.filename);
1677
                String strFile = System.IO.Path.GetFileName(instanceMain.dzMainMenu.filename);
1678
                long numByte = fileInfo.Length;
1679
                double dLen = Convert.ToDouble(fileInfo.Length / 1000000);
1680
                kr.co.devdoftech.cloud.FileUpload fileUploader = new kr.co.devdoftech.cloud.FileUpload();
1681

    
1682
                if (dLen < 4)
1683
                {
1684
                    System.IO.FileStream fStream = new System.IO.FileStream(instanceMain.dzMainMenu.filename, System.IO.FileMode.Open, System.IO.FileAccess.Read);
1685
                    System.IO.BinaryReader br = new System.IO.BinaryReader(fStream);
1686
                    byte[] data = br.ReadBytes((int)numByte);
1687
                    br.Close();
1688

    
1689
                    instanceMain.dzMainMenu.filename = fileUploader.Run(App.ViewInfo.ProjectNO, instanceMain.dzMainMenu._DocItem.DOCUMENT_NO, App.ViewInfo.UserID, strFile, data);
1690
                    fStream.Close();
1691
                    fStream.Dispose();
1692
                }
1693
                else
1694
                {
1695
                    this.ParentOfType<MainWindow>().DialogMessage_Alert("Available Memory less than 4 mega byte", "Alert");
1696
                }
1697
            }
1698
        }
1699

    
1700
        private void Control_Init(RadToggleButton instanceToggle, object sender)
1701
        {
1702

    
1703
        }
1704

    
1705
        private void ControlEvent(object sender, RoutedEventArgs e)
1706
        {
1707
            RadToggleButton instanceToggle = sender as RadToggleButton;
1708
            var instanceMain = this.ParentOfType<MainWindow>();
1709

    
1710
            #region Ctrl + A 눌렀을 때 대처 방법 
1711
            //원인 : Ctrl + A를 누르면 UIElementSet에 등록을 시키지 않는다(이유는 한꺼번에 많은 양의 컨트롤의 동작이 유입되기 때문에
1712
            //       시스템의 성능저하를 불러올 수 있기 때문이다. 그래서 선택 후 다른 컨트롤을 누르면 등록되지 않은 컨트롤이기 때문에 삭제된다
1713
            //       이를 대처하는 방법으로 아래 코드를 사용한다.
1714
            if (Common.ViewerDataModel.Instance.MarkupControls.Count == 0 && Common.ViewerDataModel.Instance.MarkupControls.Count >= 1)
1715
            {
1716
                //var lstItem = instanceMain.DeepLayer._SelectLayer.ChildrenOfType<AdornerFinal>().ToList();
1717
                //foreach (var item in lstItem)
1718
                //{
1719
                //    foreach (var member in item.MemberSet)
1720
                //    {
1721
                //        if (!instanceMain.DeepLayer.UIElementSet.Contains(member.DrawingData))
1722
                //        {
1723
                //            instanceMain.DeepLayer.UIElementSet.Add(member.DrawingData);
1724
                //        }
1725
                //    }
1726
                //}
1727
            }
1728
            #endregion
1729

    
1730
            //if (!instanceMain.IsFreeSelectionMode)
1731
            //{
1732
            //    instanceMain.IsSwingMode = true;
1733
            //}
1734

    
1735
            #region 다른 컨트롤 버튼 선택 해제
1736
            System.Reactive.Linq.Observable2.FromPropertyChangedPattern(Common.ViewerDataModel.Instance, temp => temp.SelectedControl).Subscribe(ControlState =>
1737
            {
1738
                if (ControlState == null)
1739
                {
1740
                    instanceToggle.IsChecked = false;
1741
                    HiddenControlHide();
1742
                }
1743
            });
1744
            #endregion
1745

    
1746
            Release_ToggleButton(sender); //-> 해당 컨트롤을 제외한 모든 컨트롤에 대해 해제 처리
1747

    
1748
            if (instanceToggle != null)
1749
            {
1750
                Common.ViewerDataModel.Instance.ControlTag = instanceToggle.Tag.ToString();
1751
            }
1752
            else if ((sender as RadRibbonToggleButton) != null)
1753
            {
1754
                Common.ViewerDataModel.Instance.ControlTag = (sender as RadRibbonToggleButton).Tag.ToString();
1755
                instanceToggle = (sender as RadRibbonToggleButton);
1756
            }
1757
            else if ((sender as RadRibbonButton) != null)
1758
            {
1759
                RadRibbonButton instanceButton = sender as RadRibbonButton;
1760
                Common.ViewerDataModel.Instance.ControlTag = instanceButton.Tag.ToString();
1761
            }
1762
            else
1763
            {
1764
                RadButton instanceButton = sender as RadButton;
1765
                Common.ViewerDataModel.Instance.ControlTag = instanceButton.Tag.ToString();
1766
            }
1767

    
1768

    
1769

    
1770
            System.Reactive.Linq.Observable2.FromPropertyChangedPattern(Common.ViewerDataModel.Instance, temp => temp.AngleVisibility).Subscribe(isSee =>
1771
            {
1772
                instanceMain.dzMainMenu.MainAngle.Visibility = isSee;
1773
                System.Reactive.Linq.Observable2.FromPropertyChangedPattern(Common.ViewerDataModel.Instance, temp => temp.AngleValue).Subscribe(p =>
1774
                {
1775
                    instanceMain.dzMainMenu.MainAngle.AngleValue = p;
1776
                });
1777
            });
1778
            instanceMain.dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Drawing;
1779

    
1780
            instanceMain.dzMainMenu.inkDrawingCanvas.IsEnabled = false;
1781

    
1782
            if (instanceToggle.IsChecked != false)
1783
            {
1784
                #region 컨트롤이 체크되었다면
1785
                switch (instanceToggle.CommandParameter.ToString())
1786
                {
1787
                    #region Line
1788
                    case "Line":
1789
                        Common.ViewerDataModel.Instance.SelectedControl = "Line";
1790
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1791
                        if (instanceToggle.Tag.ToString() == "LineDelete")
1792
                        {
1793
                            //HiddenInterval.Visibility = Visibility.Visible;
1794
                        }
1795
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.SingleLine;
1796
                        break;
1797
                    #endregion
1798
                    #region ChainLine
1799
                    case "ChainLine":
1800
                        Common.ViewerDataModel.Instance.SelectedControl = "ChainLine";
1801
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1802
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ChainLine;
1803
                        break;
1804
                    #endregion
1805
                    #region DimLine
1806
                    case "DimLine":
1807
                        Common.ViewerDataModel.Instance.SelectedControl = "DimLine";
1808
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1809
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.DimLine;
1810
                        break;
1811
                    #endregion
1812
                    #region TwinLine
1813
                    case "TwinLine":
1814
                        Common.ViewerDataModel.Instance.SelectedControl = "TwinLine";
1815
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1816
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.TwinLine;
1817
                        break;
1818
                    #endregion
1819
                    #region CancelLine
1820
                    case "CancelLine":
1821
                        Common.ViewerDataModel.Instance.SelectedControl = "CancelLine";
1822
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1823
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.CancelLine;
1824
                        break;
1825
                    #endregion
1826
                    #region PolygonCloud
1827
                    case "PolygonCloud":
1828
                        Common.ViewerDataModel.Instance.SelectedControl = "PolygonCloud";
1829
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1830
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.PolygonCloud;
1831
                        break;
1832
                    #endregion
1833
                    #region RectCloud
1834
                    case "RectCloud":
1835
                        Common.ViewerDataModel.Instance.SelectedControl = "RectCloud";
1836
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1837
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.RectCloud;
1838
                        break;
1839
                    #endregion
1840
                    #region Rectangle
1841
                    case "Rectangle":
1842
                        Common.ViewerDataModel.Instance.SelectedControl = "Rectangle";
1843
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1844
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.Rectangle;
1845
                        break;
1846
                    #endregion
1847
                    #region Triangle
1848
                    case "Triangle":
1849
                        Common.ViewerDataModel.Instance.SelectedControl = "Triangle";
1850
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1851
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.Triangle;
1852
                        break;
1853
                    #endregion
1854
                    #region RectCloud
1855
                    case "Circle":
1856
                        Common.ViewerDataModel.Instance.SelectedControl = "Circle";
1857
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1858
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.Circle;
1859
                        break;
1860
                    #endregion
1861
                    #region Symbol
1862
                    case "Symbol":
1863
                        Common.ViewerDataModel.Instance.SelectedControl = "Symbol";
1864
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.None;
1865
                        break;
1866
                    #endregion
1867
                    #region SymbolN
1868
                    case "SymbolN":
1869
                        Common.ViewerDataModel.Instance.SelectedControl = "SymbolN";
1870
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.Stamp;
1871
                        break;
1872
                    #endregion
1873
                    #region Text
1874
                    case "Text":
1875
                        Common.ViewerDataModel.Instance.SelectedControl = "Text";
1876
                        TaskMessage("Text 도구는 텍스트 영역을 더블 클릭하여 텍스트를 재 편집 할 수 있습니다", TaskMessageType.Normal);
1877
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.TextControl;
1878
                        break;
1879
                    #endregion
1880
                    #region TextBorder
1881
                    case "TextBorder":
1882
                        Common.ViewerDataModel.Instance.SelectedControl = "TextBorder";
1883
                        TaskMessage("Text 도구는 텍스트 영역을 더블 클릭하여 텍스트를 재 편집 할 수 있습니다", TaskMessageType.Normal);
1884
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.TextBorder;
1885
                        break;
1886
                    #endregion
1887
                    #region TextCloud
1888
                    case "TextCloud":
1889
                        Common.ViewerDataModel.Instance.SelectedControl = "TextCloud";
1890
                        TaskMessage("Text 도구는 텍스트 영역을 더블 클릭하여 텍스트를 재 편집 할 수 있습니다", TaskMessageType.Normal);
1891
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.TextCloud;
1892
                        break;
1893
                    #endregion
1894
                    #region Date
1895
                    case "Date":
1896
                        Common.ViewerDataModel.Instance.SelectedControl = "Date";
1897
                        TaskMessage("날짜 컨트롤을 더블 클릭하면 날짜를 변경할 수 있습니다", TaskMessageType.Normal);
1898
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.Date;
1899
                        break;
1900
                    #endregion
1901
                    #region ArrowText
1902
                    case "ArrowText":
1903
                        TaskMessage("ArrowText 컨트롤은 그린 후 컨트롤을 선택하였을 시 중간점을 조정할 수 있습니다", TaskMessageType.Normal);
1904
                        if (instanceToggle.Tag.ToString() == "ArrowText_Cloud")
1905
                        {
1906
                            Common.ViewerDataModel.Instance.SelectedControl = "ArrowText_Cloud";
1907
                            instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ArrowTextCloudControl;
1908
                        }
1909
                        else if (instanceToggle.Tag.ToString() == "ArrowText_Border")
1910
                        {
1911
                            Common.ViewerDataModel.Instance.SelectedControl = "ArrowTextBorderControl";
1912
                            instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ArrowTextBorderControl;
1913
                        }
1914
                        else if (instanceToggle.Tag.ToString() == "ArrowTextFix_Normal")
1915
                        {
1916
                            Common.ViewerDataModel.Instance.SelectedControl = "ArrowTransTextControl";
1917
                            instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ArrowTransTextControl;
1918
                        }
1919
                        else if (instanceToggle.Tag.ToString() == "ArrowTextFix_Border")
1920
                        {
1921
                            Common.ViewerDataModel.Instance.SelectedControl = "ArrowTransTextBorderControl";
1922
                            instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ArrowTransTextBorderControl;
1923
                        }
1924
                        else if (instanceToggle.Tag.ToString() == "ArrowTextFix_Cloud")
1925
                        {
1926
                            Common.ViewerDataModel.Instance.SelectedControl = "ArrowTransTextCloudControl";
1927
                            instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ArrowTransTextCloudControl;
1928
                        }
1929
                        else
1930
                        {
1931
                            Common.ViewerDataModel.Instance.SelectedControl = "ArrowText";
1932
                            instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ArrowTextControl;
1933
                            //HiddenAxisLock.Visibility = Visibility.Visible;
1934
                        }
1935
                        break;
1936
                    #endregion
1937
                    #region Arrow
1938
                    case "Arrow":
1939
                        Common.ViewerDataModel.Instance.SelectedControl = "Arrow";
1940
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1941
                        //HiddenDimSize.Visibility = Visibility.Visible;
1942
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ArrowLine;
1943
                        break;
1944
                    #endregion
1945
                    #region Shape
1946
                    case "Shape":
1947
                        Common.ViewerDataModel.Instance.SelectedControl = "Shape";
1948
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.Mark;
1949
                        break;
1950
                    #endregion
1951
                    #region Polygon
1952
                    case "Polygon":
1953
                        Common.ViewerDataModel.Instance.SelectedControl = "Polygon";
1954
                        TaskMessage("자유형 코멘트 도구는 오른쪽 마우스 클릭을 통해 그리기를 마칠 수 있습니다", TaskMessageType.Normal);
1955
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1956
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.PolygonControl;
1957
                        break;
1958
                    #endregion
1959
                    #region Arc
1960
                    case "Arc":
1961
                        Common.ViewerDataModel.Instance.SelectedControl = "Arc";
1962
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ArcLine;
1963
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1964
                        TaskMessage("Arc 코멘트 도구는 오른쪽 마우스를 사용해 좌우 반전을 사용하실 수 있습니다", TaskMessageType.Normal);
1965
                        break;
1966
                    #endregion
1967
                    #region ArrowArc
1968
                    case "ArrowArc":
1969
                        Common.ViewerDataModel.Instance.SelectedControl = "ArrowArc";
1970
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ArcArrow;
1971
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1972
                        TaskMessage("ArcArrow 코멘트 도구는 오른쪽 마우스를 사용해 좌우 반전을 사용하실 수 있습니다", TaskMessageType.Normal);
1973
                        break;
1974
                    #endregion
1975
                    #region ArrowMulti
1976
                    case "ArrowMulti":
1977
                        Common.ViewerDataModel.Instance.SelectedControl = "ArrowMulti";
1978
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ArrowMultiLine;
1979
                        //HiddenAxisLock.Visibility = Visibility.Visible;
1980
                        break;
1981
                    #endregion
1982
                    #region Etc
1983
                    case "Etc":
1984
                        Common.ViewerDataModel.Instance.SelectedControl = "Etc";
1985
                        break;
1986
                    #endregion
1987
                    #region Ink
1988
                    case "Ink":
1989
                        if (instanceToggle.Tag.ToString() == "EraserClear")
1990
                        {
1991
                            TaskMessage("해당 컨트롤은 점 단위로 그려진 펜을 지웁니다", TaskMessageType.Normal);
1992
                            //instanceMain.dzMainMenu.inkDrawingCanvas.EditingMode = InkCanvasEditingMode.EraseByPoint;
1993
                            instanceMain.dzMainMenu.inkBoard.Tag = "EraseByPoint";
1994
                        }
1995
                        else if (instanceToggle.Tag.ToString() == "Eraser")
1996
                        {
1997
                            TaskMessage("해당 컨트롤은 선 단위로 그려진 펜을 지웁니다", TaskMessageType.Normal);
1998
                            instanceMain.dzMainMenu.inkBoard.Tag = "EraseByStroke";
1999
                            //instanceMain.dzMainMenu.inkDrawingCanvas.EditingMode = InkCanvasEditingMode.EraseByStroke;
2000
                        }
2001
                        else
2002
                        {
2003
                            instanceMain.dzMainMenu.inkBoard.Tag = "Ink";
2004
                            //instanceMain.dzMainMenu.inkDrawingCanvas.EditingMode = InkCanvasEditingMode.Ink;
2005
                        }
2006

    
2007
                        //instanceMain.dzMainMenu.inkDrawingCanvas.IsEnabled = true;
2008

    
2009
                        Common.ViewerDataModel.Instance.SelectedControl = "Ink";
2010
                        Common.ViewerDataModel.Instance.LineSize = (double)cbLineSize.Value;
2011
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.PenControl;
2012
                        break;
2013
                    #endregion
2014
                    #region Select
2015
                    case "Select":
2016
                        if(this.ParentOfType<MainWindow>().dzMainMenu.currentControl != null)
2017
                        {
2018
                            ViewerDataModel.Instance.MarkupControls_USER.Remove(this.ParentOfType<MainWindow>().dzMainMenu.currentControl);
2019
                            this.ParentOfType<MainWindow>().dzMainMenu.currentControl = null;
2020
                        }
2021
                        this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Selecting;
2022
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.None;
2023
                        instanceMain.dzMainMenu.isLeftMouseButtonDownOnWindow = false;
2024
                        break;
2025
                    #endregion
2026
                    #region Image
2027
                    case "Image":
2028
                        Common.ViewerDataModel.Instance.SelectedControl = "ImgControl";
2029
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ImgControl;
2030
                        ImageConverter();
2031
                        break;
2032
                    #endregion
2033
                    #region Sign
2034
                    case "Sign":
2035
                        Common.ViewerDataModel.Instance.SelectedControl = "Sign";
2036
                        Common.ViewerDataModel.Instance.ControlTag = instanceMain.dzMainMenu._ViewInfo.UserID; //사번
2037
                        //강인구 추가
2038
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.Sign;
2039
                        //instanceMain.BaseClient.GetUserSignCompleted += (sen, ea) =>
2040
                        //{
2041
                        //    if (ea.Result == null)
2042
                        //    {
2043

    
2044
                        //        this.ParentOfType<MainPage>().DialogMessage_Alert("You Don't Have Sign Data", "Alert");
2045
                        //    }
2046
                        //    else
2047
                        //    {
2048
                        //        byte[] imageBytes = System.Convert.FromBase64String(ea.Result);
2049
                        //        using (MemoryStream ms = new MemoryStream(imageBytes))
2050
                        //        {
2051
                        //            BitmapImage im = new BitmapImage();
2052
                        //            im.SetSource(ms);
2053
                        //            instanceMain.DeepLayer.SignImage = im;
2054
                        //            ms.Close();
2055
                        //        }
2056
                        //    }
2057
                        //};
2058
                        //instanceMain.BaseClient.GetUserSignAsync(instanceMain._ViewInfo.UserID);
2059
                        break;
2060
                    #endregion
2061
                    #region Check
2062
                    case "Check":
2063
                        Common.ViewerDataModel.Instance.SelectedControl = "Check";
2064
                        Common.ViewerDataModel.Instance.ControlTag = instanceMain.dzMainMenu._ViewInfo.UserID; //사번
2065
                        //강인구 추가
2066
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.Symbol;
2067
                        break;
2068
                    #endregion
2069
                    #region Batch
2070
                    case "Batch":
2071
                        Common.ViewerDataModel.Instance.SelectedControl = "Batch";
2072
                        Common.ViewerDataModel.Instance.ControlTag = instanceMain.dzMainMenu._ViewInfo.UserID; //사번
2073
                        //강인구 추가
2074
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.Mark;
2075
                        instanceMain.dzMainMenu.txtBatch.Visibility = Visibility.Visible;
2076
                        instanceMain.dzMainMenu.txtBatch.Text = "Place Mark";
2077
                        break;
2078
                    #endregion
2079
                    #region Copy
2080
                    case "Copy":
2081
                        Copy_Start();
2082
                        instanceToggle.IsChecked = false;
2083
                        ViewerDataModel.Instance.SelectedControl = "";
2084
                        ViewerDataModel.Instance.ControlTag = null;
2085
                        this.ParentOfType<MainWindow>().dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.None;
2086
                        this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;
2087
                        break;
2088
                    #endregion
2089
                    #region Cut
2090
                    case "Cut":
2091
                        Cut_Start();
2092
                        instanceToggle.IsChecked = false;
2093
                        ViewerDataModel.Instance.SelectedControl = "";
2094
                        ViewerDataModel.Instance.ControlTag = null;
2095
                        this.ParentOfType<MainWindow>().dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.None;
2096
                        this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;
2097
                        break;
2098
                    #endregion
2099
                    #region Paste
2100
                    case "Paste":
2101
                        Paste_Start();
2102
                        instanceToggle.IsChecked = false;
2103
                        ViewerDataModel.Instance.SelectedControl = "";
2104
                        ViewerDataModel.Instance.ControlTag = null;
2105
                        this.ParentOfType<MainWindow>().dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.None;
2106
                        this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;                        
2107
                        break;
2108
                    #endregion
2109
                    #region Delete
2110
                    case "Delete":
2111
                        Delete_Start();
2112
                        instanceToggle.IsChecked = false;
2113
                        ViewerDataModel.Instance.SelectedControl = "";
2114
                        ViewerDataModel.Instance.ControlTag = null;
2115
                        this.ParentOfType<MainWindow>().dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.None;
2116
                        this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;
2117
                        break;
2118
                    #endregion
2119
                    #region Undo
2120
                    case "Undo":
2121
                        this.ParentOfType<MainWindow>().dzMainMenu.Undo();
2122
                        instanceToggle.IsChecked = false;
2123
                        ViewerDataModel.Instance.SelectedControl = "";
2124
                        ViewerDataModel.Instance.ControlTag = null;
2125
                        this.ParentOfType<MainWindow>().dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.None;
2126
                        this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;
2127
                        break;
2128
                    #endregion
2129
                    #region Redo
2130
                    case "Redo":
2131
                        this.ParentOfType<MainWindow>().dzMainMenu.Redo();
2132
                        instanceToggle.IsChecked = false;
2133
                        ViewerDataModel.Instance.SelectedControl = "";
2134
                        ViewerDataModel.Instance.ControlTag = null;
2135
                        this.ParentOfType<MainWindow>().dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.None;
2136
                        this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;
2137
                        break;
2138
                    #endregion
2139
                    #region DragZoom
2140
                    case "DragZoom":
2141
                        this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.DragZoom;
2142
                        instanceMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.None;
2143
                        instanceMain.dzMainMenu.isLeftMouseButtonDownOnWindow = false;
2144
                        break;
2145
                    #endregion
2146

    
2147
                    default:
2148
                        break;
2149
                }
2150
                #endregion
2151
            }
2152
            else
2153
            {
2154

    
2155
                if (!instanceMain.dzMainMenu.IsFreeSelectionMode)
2156
                {
2157
                    instanceMain.dzMainMenu.IsSwingMode = false;
2158
                    Common.ViewerDataModel.Instance.SelectedControl = "";
2159
                    Common.ViewerDataModel.Instance.ControlTag = null;
2160
                    this.ParentOfType<MainWindow>().dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.None;
2161
                    this.ParentOfType<MainWindow>().dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.None;
2162
                }
2163
            }
2164
        }
2165

    
2166
        private void cbAutoSave_Checked(object sender, RoutedEventArgs e)
2167
        {            
2168
            if (cbAutoSave.IsChecked == true)
2169
            {
2170
                SaveTime(true, (int)cbSaveInterval.Value);
2171
            }
2172
            else
2173
            {
2174
                SaveTime(false, (int)cbSaveInterval.Value);
2175
            }
2176
        }
2177
        private void cbSaveInterval_ValueChanged(object sender, RadRangeBaseValueChangedEventArgs e)
2178
        {
2179
            if(string.IsNullOrEmpty(cbSaveInterval.Value.ToString()))
2180
            {
2181
                cbSaveInterval.Value = cbSaveInterval.Minimum;
2182
            }
2183
            if (cbAutoSave.IsChecked == true)
2184
            {
2185
                SaveTime(true, (int)cbSaveInterval.Value);
2186
            }
2187

    
2188
            KCOM.Properties.Settings.Default.SaveInterval = (double)cbSaveInterval.Value;
2189
            Properties.Settings.Default.Save();
2190
        }
2191
        //강인구 자동 저장 추가
2192
        private void AutoSave(object sender, RoutedEventArgs e)
2193
        {
2194
            RadToggleButton instanceToggle = sender as RadToggleButton;
2195

    
2196
            if(instanceToggle.IsChecked == true)
2197
            {
2198
                SaveTime(true);
2199
            }
2200
            else
2201
            {
2202
                SaveTime(false);
2203
            }
2204
        }
2205

    
2206
        public void Copy_Start()
2207
        {
2208
            if (this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0)
2209
            {
2210
                string MarkupData = "";
2211

    
2212
                foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children)
2213
                {
2214
                    if (item.GetType().Name == "AdornerFinal")
2215
                    {
2216
                        foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
2217

    
2218
                        {
2219
                            if (!ViewerDataModel.Instance.MarkupControls.Contains(InnerItem.DrawingData))
2220
                            {
2221
                                markupReturn = layer.MarkupToString(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo, App.ViewInfo.UserID);
2222
                                MarkupData += "|OR|" + markupReturn.ConvertData;
2223
                            }
2224
                        }
2225
                        Clipboard.SetText(MarkupData);
2226
                    }
2227
                }
2228
            }
2229
        }
2230

    
2231
        public void Cut_Start()
2232
        {
2233
            if (this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0)
2234
            {
2235
                foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children)
2236
                {
2237
                    string MarkupData = "";
2238

    
2239
                    if (item.GetType().Name == "AdornerFinal")
2240
                    {
2241
                        foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
2242
                        {
2243
                            if (!ViewerDataModel.Instance.MarkupControls.Contains(InnerItem.DrawingData))
2244
                            {
2245
                                markupReturn = layer.MarkupToString(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo, App.ViewInfo.UserID);
2246
                                MarkupData += "|OR|" + markupReturn.ConvertData;
2247
                            }
2248
                        }
2249
                        //클립보드에 넣음
2250
                        Clipboard.SetText(MarkupData);
2251
                    }
2252
                }
2253
                this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Clear();
2254
            }
2255
        }
2256

    
2257
        public void Paste_Start()
2258
        {
2259
            //마크업 붙여넣기
2260
            //if (Clipboard.GetText().Contains("|DZ|"))
2261
            if (Clipboard.GetText().Contains("|OR||DZ|"))
2262
            {
2263
                List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>();
2264

    
2265
                string[] delimiterChars = { "|OR|" };
2266
                string[] data = Clipboard.GetText().Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries);
2267

    
2268
                this.ParentOfType<MainWindow>().dzMainMenu.ReleaseAdorner();
2269

    
2270
                Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
2271

    
2272
                //강인구 Undo/Redo 보류
2273
                UndoData = new Undo_data()
2274
                {
2275
                    IsUndo = false,
2276
                    Event = Event_Type.Create,
2277
                    EventTime = DateTime.Now,
2278
                    Markup_List = new List<Multi_Undo_data>()
2279
                };
2280

    
2281
                ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i =>
2282
                {
2283
                    ViewerDataModel.Instance.UndoDataList.Remove(i);
2284
                });
2285

    
2286
                foreach (string parse in data)
2287
                {
2288
                    if (parse != "")
2289
                    {
2290
                        System.Windows.Controls.Control item = layer.markupParse_Paste(parse, ViewerDataModel.Instance.MarkupControls_USER);
2291
                        (item as MarkupToPDF.Common.CommentUserInfo).CommentID = Events.Save.shortGuid();
2292

    
2293
                        ViewerDataModel.Instance.MarkupControls.Remove(item as MarkupToPDF.Common.CommentUserInfo);
2294
                        ViewerDataModel.Instance.MarkupControls_USER.Remove(item as MarkupToPDF.Common.CommentUserInfo);
2295

    
2296
                        adornerSet.Add(item as MarkupToPDF.Common.CommentUserInfo);
2297

    
2298
                        //Controls.AdornerFinal final = new Controls.AdornerFinal(item as MarkupToPDF.Common.CommentUserInfo);
2299
                        //this.dzMainMenu.SelectLayer.Children.Add(final);
2300

    
2301
                        multi_Undo_Data = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo);
2302

    
2303
                        UndoData.Markup_List.Add(multi_Undo_Data);
2304
                        ViewerDataModel.Instance.UndoDataList.Add(UndoData);                        
2305
                    }
2306
                }
2307
                Controls.AdornerFinal final = new Controls.AdornerFinal(adornerSet);
2308

    
2309
                if(this.ParentOfType<MainWindow>().dzMainMenu.getCurrentPoint.X < 0)
2310
                {
2311
                    Canvas.SetLeft(final, 0);
2312
                    Canvas.SetTop(final, 0);
2313
                }
2314
                else
2315
                {
2316
                    double realPointX = this.ParentOfType<MainWindow>().dzMainMenu.getCurrentPoint.X - final.BorderSize.X - (final.BorderSize.Width / 2);
2317
                    double realPointY = this.ParentOfType<MainWindow>().dzMainMenu.getCurrentPoint.Y - final.BorderSize.Y - (final.BorderSize.Height / 2);
2318
                    final.MoveAdorner(new System.Windows.Controls.Primitives.DragDeltaEventArgs(realPointX, realPointY));
2319

    
2320
                    if (final.MemberSet.Where(type => type.Drawingtype == MarkupToPDF.Controls.Common.ControlType.TextControl).FirstOrDefault() != null)
2321
                    {
2322
                        final.MoveAdorner(new System.Windows.Controls.Primitives.DragDeltaEventArgs(0.001, 0.001)); //dummy
2323
                    }
2324

    
2325
                }
2326
                
2327

    
2328
                this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Add(final);
2329

    
2330
                //붙여 넣을때 원본 컨트롤과 겹치지 않도록 설정
2331
                //Canvas.SetLeft(final, 50);
2332
                //Canvas.SetTop(final, 50);
2333
            }
2334
            //외부 이미지 붙여넣기
2335
            else if (Clipboard.GetImage() != null)
2336
            {
2337
                Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
2338

    
2339
                //강인구 Undo/Redo 보류
2340
                UndoData = new Undo_data()
2341
                {
2342
                    IsUndo = false,
2343
                    Event = Event_Type.Create,
2344
                    EventTime = DateTime.Now,
2345
                    Markup_List = new List<Multi_Undo_data>()
2346
                };
2347

    
2348

    
2349
                string temppath = System.IO.Path.GetTempPath();
2350
                //string filename = KCOM.Events.Save.shortCommentKey();
2351
                string filename = KCOM.Events.Save.shortFileKey();
2352

    
2353
                System.Drawing.Image clipboardImage = System.Windows.Forms.Clipboard.GetImage();
2354
                clipboardImage.Save(temppath + "\\" + filename);
2355

    
2356
                System.IO.FileInfo fileInfo = new System.IO.FileInfo(temppath + "\\" + filename);
2357
                String strFile = System.IO.Path.GetFileName(fileInfo.FullName);
2358
                long numByte = fileInfo.Length;
2359
                double dLen = Convert.ToDouble(fileInfo.Length / 1000000);
2360
                kr.co.devdoftech.cloud.FileUpload fileUploader = new kr.co.devdoftech.cloud.FileUpload();
2361

    
2362
                if (dLen < 4)
2363
                {
2364
                    System.IO.FileStream fStream = new System.IO.FileStream(fileInfo.FullName,
2365
                    System.IO.FileMode.Open, System.IO.FileAccess.Read);
2366
                    System.IO.BinaryReader br = new System.IO.BinaryReader(fStream);
2367
                    byte[] data = br.ReadBytes((int)numByte);
2368

    
2369
                    filename = fileUploader.Run(App.ViewInfo.ProjectNO, this.ParentOfType<MainWindow>().dzMainMenu._DocItem.DOCUMENT_NO, App.ViewInfo.UserID, strFile + ".png", data);
2370
                    br.Close();
2371
                    fStream.Close();
2372
                    fStream.Dispose();
2373
                }
2374
                else
2375
                {
2376
                    this.ParentOfType<MainWindow>().dzMainMenu.DialogMessage_Alert("Available Memory less than 4 mega byte", "Alert");
2377
                    return;
2378
                }
2379

    
2380
                fileInfo.Delete();
2381

    
2382
                //System.Drawing.Image clipboardImage = System.Windows.Forms.Clipboard.GetImage();
2383
                System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(clipboardImage);
2384
                IntPtr hBitmap = bmp.GetHbitmap();
2385
                System.Windows.Media.ImageSource WpfBitmap = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(hBitmap, IntPtr.Zero, Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
2386
                Image img = new Image();
2387
                img.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri(filename));
2388

    
2389

    
2390

    
2391

    
2392

    
2393
                var currentControl = new MarkupToPDF.Controls.Etc.ImgControl
2394
                {
2395
                    PointSet = new List<Point>(),
2396
                    FilePath = img.Source.ToString(),
2397
                    ImageData = img.Source,
2398
                    StartPoint = new Point(100, 100),
2399
                    EndPoint = new Point(200, 200),
2400
                    TopRightPoint = new Point(100, 200),
2401
                    LeftBottomPoint = new Point(200, 100)
2402
                };
2403

    
2404
                currentControl.TopRightPoint = new Point(currentControl.StartPoint.X + clipboardImage.Width, currentControl.StartPoint.Y);
2405
                currentControl.LeftBottomPoint = new Point(currentControl.StartPoint.X, currentControl.StartPoint.Y + clipboardImage.Height);
2406
                currentControl.EndPoint = new Point(currentControl.StartPoint.X + clipboardImage.Width, currentControl.StartPoint.Y + clipboardImage.Height);
2407

    
2408
                currentControl.PointSet = new List<Point>
2409
                                        {
2410
                                            currentControl.StartPoint,
2411
                                            currentControl.LeftBottomPoint,
2412
                                            currentControl.EndPoint,
2413
                                            currentControl.TopRightPoint,
2414
                                        };
2415

    
2416
                multi_Undo_Data = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(currentControl as MarkupToPDF.Common.CommentUserInfo);
2417
                UndoData.Markup_List.Add(multi_Undo_Data);
2418
                ViewerDataModel.Instance.UndoDataList.Add(UndoData);
2419

    
2420
                ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl as MarkupToPDF.Common.CommentUserInfo);
2421
                currentControl.CommentID = Events.Save.shortGuid();
2422

    
2423
                currentControl.ApplyTemplate();
2424
                currentControl.SetImage();
2425

    
2426
                ViewerDataModel.Instance.MarkupControls_USER.Remove(currentControl as MarkupToPDF.Common.CommentUserInfo);
2427
                Controls.AdornerFinal final = new Controls.AdornerFinal(currentControl as MarkupToPDF.Common.CommentUserInfo);
2428
                this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Add(final);
2429

    
2430
                double realPointX = this.ParentOfType<MainWindow>().dzMainMenu.getCurrentPoint.X - final.BorderSize.X - (final.BorderSize.Width / 2);
2431
                double realPointY = this.ParentOfType<MainWindow>().dzMainMenu.getCurrentPoint.Y - final.BorderSize.Y - (final.BorderSize.Height / 2);
2432
                final.MoveAdorner(new System.Windows.Controls.Primitives.DragDeltaEventArgs(realPointX, realPointY));
2433

    
2434
            }
2435
        }
2436

    
2437
        public void Delete_Start()
2438
        {
2439
            if (this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0)
2440
            {
2441
                Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
2442

    
2443
                UndoData = new Undo_data()
2444
                {
2445
                    IsUndo = false,
2446
                    Event = Event_Type.Delete,
2447
                    EventTime = DateTime.Now,
2448
                    Markup_List = new List<Multi_Undo_data>()
2449
                };
2450

    
2451
                foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children)
2452
                {
2453
                    if (item.GetType().Name == "AdornerFinal")
2454
                    {
2455
                        (item as Controls.AdornerFinal).unRegister();
2456

    
2457
                        foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
2458
                        {
2459
                            //if (!ViewerDataModel.Instance.MarkupControls.Contains(InnerItem.DrawingData))
2460
                            if (!ViewerDataModel.Instance.MarkupControls_USER.Contains(InnerItem.DrawingData))
2461
                            {
2462

    
2463
                                multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
2464
                                UndoData.Markup_List.Add(multi_Undo_Data);
2465
                                multi_Undo_Data = new Multi_Undo_data();
2466

    
2467
                                ViewerDataModel.Instance.MarkupControls.Remove(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo);
2468

    
2469
                                var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
2470

    
2471
                                ViewerDataModel.Instance.MarkupList_USER.Remove(Item_);
2472

    
2473
                                //임시파일에서도 삭제한다.
2474
                                temp.DelTemp((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString());
2475
                                
2476
                            }
2477
                        }
2478
                    }
2479

    
2480
                    ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
2481
                    {
2482
                        ViewerDataModel.Instance.UndoDataList.Remove(i);
2483
                    });
2484
                    ViewerDataModel.Instance.UndoDataList.Add(UndoData);
2485
                }
2486
            }
2487
            this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Clear();
2488
        }
2489

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