프로젝트

일반

사용자정보

개정판 233ef333

ID233ef33394c1947626c9a73cd37782b45ac9e28b
상위 b643fcca
하위 a342d378

김태성이(가) 4년 이상 전에 추가함

- markus control angle 기능 수정
- axis 기능

Change-Id: I0e34fe08407dca77c9ccc668595489a99b981065

차이점 보기:

KCOM/App.xaml
29 29
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
30 30
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
31 31
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Docking.xaml"/>
32

  
33 32
                <ResourceDictionary Source="Resources\DragAndDropListBoxStyle.xaml"/>
34 33
                <!--<ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.RibbonView.xaml"/>-->
35 34
                <!--<ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Docking.xaml"/>-->
KCOM/Common/ViewerDataModel.cs
692 692
        /// <summary>
693 693
        /// 상단 Axis 버튼이 클릭 되어있는지
694 694
        /// </summary>
695
        private bool _checkAxis { get; set; }
696
        public bool checkAxis
695
        private bool _IsAxisLock { get; set; }
696
        public bool IsAxisLock
697 697
        {
698 698
            get
699 699
            {
700
                return _checkAxis;
700
                return _IsAxisLock;
701 701
            }
702 702
            set
703 703
            {
704
                _checkAxis = value;
705
                OnPropertyChanged("checkAxis");
704
                _IsAxisLock = value;
705
                OnPropertyChanged("IsAxisLock");
706 706
            }
707 707
        }
708 708

  
KCOM/Controls/AdornerFinal.xaml
143 143
                        			HorizontalAlignment="Center" Width="16"  Height="15" Margin="0,5,0,0" Canvas.ZIndex="99">
144 144
                                    <i:Interaction.Behaviors>
145 145
                                        <behavior:ExpandingMouseOver ScaleFactor="1.5"/>
146
                                    </i:Interaction.Behaviors>
147
                                </Ellipse>
146
                                    </i:Interaction.Behaviors></Ellipse>
148 147
                                <Rectangle Fill="#ff2e3436" Width="2"  Height="40" HorizontalAlignment="Center" Canvas.ZIndex="99"/>
149 148
                            </StackPanel>
150 149
                        </ControlTemplate>
KCOM/Controls/AdornerFinal.xaml.cs
1033 1033
                System.Diagnostics.Debug.WriteLine($"2. GetPoint : {GetPosition(thumb).X},{GetPosition(thumb).Y}");
1034 1034

  
1035 1035
                //System.Diagnostics.Debug.WriteLine($"ResizeTm_DragDelta setPoint : {setPoint.X},{setPoint.Y} - {e.HorizontalChange},{e.VerticalChange}");
1036
                ((control.DrawingData) as CommentUserInfo).OnMoveCtrlPoint(setPoint, e.HorizontalChange, e.VerticalChange);
1036

  
1037
                var commentInfo = (control.DrawingData) as CommentUserInfo;
1038
                commentInfo.OnMoveCtrlPoint(setPoint, e.HorizontalChange, e.VerticalChange,ViewerDataModel.Instance.IsAxisLock || ViewerDataModel.Instance.IsPressShift);
1039

  
1037 1040
                System.Diagnostics.Debug.WriteLine($"3. GetPoint : {GetPosition(thumb).X},{GetPosition(thumb).Y}");
1038 1041
                control.UpdateThumb();
1039 1042

  
KCOM/Events/Implementation/TopMenuEvent.cs
1112 1112
            }
1113 1113
        }
1114 1114

  
1115
        private void AxisLockEvent(object sender, RoutedEventArgs e)
1116
        {
1117
            ViewerDataModel.Instance.checkAxis = cbAxisLock.IsChecked.Value;
1118
        }
1119

  
1120 1115
        private void comboFontSize_ValueChanged(object sender, RadRangeBaseValueChangedEventArgs e)
1121 1116
        {
1122 1117
            if (string.IsNullOrEmpty(comboFontSize.Value.ToString()))
KCOM/Views/MainMenu.xaml.cs
1

2
using IKCOM;
1
using IKCOM;
3 2
using KCOM.Common;
4 3
using KCOM.Controls;
5 4
using KCOM.Events;
......
63 62
    {
64 63
        private readonly System.Threading.ManualResetEvent _readLineSignal;
65 64
        private string _lastLine;
65

  
66 66
        public MyConsole()
67 67
        {
68 68
            _readLineSignal = new System.Threading.ManualResetEvent(false);
......
116 116
    public partial class MainMenu : UserControl
117 117
    {
118 118
        #region 프로퍼티
119

  
119 120
        public CommentUserInfo currentControl { get; set; }
120 121
        public ControlType controlType { get; set; }
121 122
        private Move move = new Move();
......
133 134
        private Point canvasZoomPanningMouseDownPoint;
134 135
        public Point getCurrentPoint;
135 136
        private Point canvasZoommovingMouseDownPoint;
136
        List<object> ControlList = new List<object>();
137
        private List<object> ControlList = new List<object>();
137 138
        private ListBox listBox = new ListBox();
138 139
        private Dictionary<Geometry, string> selected_item = new Dictionary<Geometry, string>();
139 140
        private bool isDraggingSelectionRect = false;
140
        DrawingAttributes inkDA = new DrawingAttributes();
141
        private DrawingAttributes inkDA = new DrawingAttributes();
141 142
        private VPRevision CurrentRev { get; set; }
142 143
        public RadRibbonButton btnConsolidate { get; set; }
143 144
        public RadRibbonButton btnFinalPDF { get; set; }
......
149 150
        public AdornerFinal adorner_;
150 151
        public Multi_Undo_data multi_Undo_Data;
151 152
        public string Symbol_ID = "";
153

  
152 154
        /// <summary>
153 155
        /// Set to 'true' when the left mouse-button is down.
154 156
        /// </summary>
155 157
        public bool isLeftMouseButtonDownOnWindow = false;
156 158

  
157 159
        public InkPresenter _InkBoard = null;
158
        Stroke stroke;
159
        Boolean IsDrawing = false;
160
        StylusPointCollection strokePoints;
160
        private Stroke stroke;
161
        private Boolean IsDrawing = false;
162
        private StylusPointCollection strokePoints;
163

  
161 164
        //StylusPointCollection erasePoints;
162
        RenderTargetBitmap canvasImage;
163
        Point Sync_Offset_Point;
165
        private RenderTargetBitmap canvasImage;
166

  
167
        private Point Sync_Offset_Point;
164 168

  
165 169
        //강인구 테스트
166 170
        private Path _SelectionPath { get; set; }
171

  
167 172
        public Path SelectionPath
168 173
        {
169 174
            get
......
176 181
                {
177 182
                    _SelectionPath = value;
178 183
                    RaisePropertyChanged("SelectionPath");
179

  
180 184
                }
181 185
            }
182 186
        }
183 187

  
184 188
        private System.Windows.Controls.Image _imageViewer { get; set; }
189

  
185 190
        public System.Windows.Controls.Image imageViewer
186 191
        {
187 192
            get
......
208 213
        public bool IsSyncPDFMode { get; set; }
209 214

  
210 215
        private System.Windows.Controls.Image _imageViewer_Compare { get; set; }
216

  
211 217
        public System.Windows.Controls.Image imageViewer_Compare
212 218
        {
213 219
            get
......
231 237
            }
232 238
        }
233 239

  
234
        #endregion
240
        #endregion 프로퍼티
235 241

  
236 242
        public MainMenu()
237 243
        {
238
            //App.splashString(ISplashMessage.MAINMENU_0);            
239
           InitializeComponent();
244
            //App.splashString(ISplashMessage.MAINMENU_0);
245
            InitializeComponent();
240 246

  
241 247
            //List<testItem> testItems = new List<testItem>
242 248
            //{
......
261 267
            public int IsUpdate { get; set; }
262 268
        }
263 269

  
264
        List<TempDt> tempDtList = new List<TempDt>();
270
        private List<TempDt> tempDtList = new List<TempDt>();
265 271

  
266 272
        private void SetCursor()
267 273
        {
......
365 371
        {
366 372
            if (PreviewUserMarkupInfoItem != null && item.Consolidate == 1 && item.AvoidConsolidate == 0)
367 373
            {
368
                App.Custom_ViewInfoId = PreviewUserMarkupInfoItem.MarkupInfoID;           }
374
                App.Custom_ViewInfoId = PreviewUserMarkupInfoItem.MarkupInfoID;
375
            }
369 376

  
370
            
371 377
            ViewerDataModel.Instance._markupInfoList.Remove(item);
372 378

  
373 379
            ViewerDataModel.Instance.MarkupControls.Where(data => data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(a =>
......
386 392
            {
387 393
                ViewerDataModel.Instance.MyMarkupList.Remove(a);
388 394
                //임시파일에서도 삭제
389
                TempFile.DelTemp(a.ID, this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString());                
395
                TempFile.DelTemp(a.ID, this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString());
390 396
            });
391 397

  
392 398
            gridViewMarkup.ItemsSource = ViewerDataModel.Instance._markupInfoList;
......
419 425
                }
420 426
            }
421 427
            Logger.sendReqLog("DeleteMarkupAsync", App.ViewInfo.ProjectNO + "," + item.MarkupInfoID, 1);
422
            BaseClient.DeleteMarkupAsync(App.ViewInfo.ProjectNO, item.MarkupInfoID);    
428
            BaseClient.DeleteMarkupAsync(App.ViewInfo.ProjectNO, item.MarkupInfoID);
423 429
        }
424 430

  
425 431
        /// <summary>
......
434 440
            {
435 441
                Owner = Application.Current.MainWindow,
436 442
                Content = new TextBlock()
437
                { 
443
                {
438 444
                    MinWidth = 400,
439 445
                    FontSize = 11,
440 446
                    Text = "Are you sure you want to delete?",
......
447 453
                CancelButtonContent = "No",
448 454
                Closed = delegate (object windowSender, WindowClosedEventArgs wc)
449 455
                {
450
                    if(wc.DialogResult == true)
456
                    if (wc.DialogResult == true)
451 457
                    {
452 458
                        //선택된 어도너가 있을시 삭제가 되지 않음
453 459
                        SelectionSet.Instance.UnSelect(this);
......
462 468
            RadWindow.Confirm(parameters);
463 469
        }
464 470

  
465
        System.Windows.Media.Animation.DoubleAnimation da = new System.Windows.Media.Animation.DoubleAnimation();
471
        private System.Windows.Media.Animation.DoubleAnimation da = new System.Windows.Media.Animation.DoubleAnimation();
466 472

  
467 473
        private static Timer timer;
468 474
        private int InitInterval = KCOM.Properties.Settings.Default.InitInterval;
475

  
469 476
        private void MainMenu_Loaded(object sender, RoutedEventArgs e)
470 477
        {
471
            //InitializeComponent();            
478
            //InitializeComponent();
472 479
            //System.Diagnostics.Debug.WriteLine("MainMenu() : " + sw.ElapsedMilliseconds.ToString() + "ms");
473 480

  
474 481
            if (App.ParameterMode)
......
495 502
            }
496 503

  
497 504
            timer = new Timer(timercallback, null, 0, InitInterval * 60000);
498

  
499 505
        }
500 506

  
501 507
        private async Task DownloadOriginalFileAsync()
......
506 512
                {
507 513
                    string instnaceFile = System.IO.Path.GetTempFileName().Replace(".pdf", ".tmp");
508 514
                    string downloadurl = GetOriginalPDFURL();
509
                    
515

  
510 516
                    // canceltoken을 위해서 상위에 선언
511 517
                    var task = client.DownloadFileTaskAsync(new Uri(downloadurl), instnaceFile);
512 518

  
......
539 545

  
540 546
            Dispatcher.InvokeAsync(new Action(delegate
541 547
            {
542
               if (this.ParentOfType<MainWindow>().dzTopMenu.cbAutoSave.IsChecked == true) //Auto Save Checked?
548
                if (this.ParentOfType<MainWindow>().dzTopMenu.cbAutoSave.IsChecked == true) //Auto Save Checked?
543 549
                {
544 550
                    timer.Change(((int)this.ParentOfType<MainWindow>().dzTopMenu.cbSaveInterval.Value * 60000) / 2, sw.ElapsedMilliseconds); //Timer Setting
545 551
                }
......
547 553

  
548 554
            ////GC.Collect();
549 555
        }
550
        
556

  
551 557
        /// <summary>
552 558
        /// update my markuplist
553 559
        ///  - update existing markup data if already exist
......
586 592
                }
587 593
            }
588 594

  
589
            if(this.pageNavigator.CurrentPage != null)
590
            { 
595
            if (this.pageNavigator.CurrentPage != null)
596
            {
591 597
                /// delete markup list
592 598
                int iPageNo = this.pageNavigator.CurrentPage.PageNumber;
593 599

  
594 600
                var deleted = (from markup in ViewerDataModel.Instance.MyMarkupList
595
                              where (markup.PageNumber == iPageNo) 
596
                              && (null == ViewerDataModel.Instance.MarkupControls_USER.Where(control => control.CommentID == markup.ID).FirstOrDefault())
597
                              select markup).ToList();
601
                               where (markup.PageNumber == iPageNo)
602
                               && (null == ViewerDataModel.Instance.MarkupControls_USER.Where(control => control.CommentID == markup.ID).FirstOrDefault())
603
                               select markup).ToList();
598 604

  
599 605
                foreach (var markup in deleted)
600 606
                {
......
628 634
            //}
629 635
        }
630 636

  
631
        DispatcherTimer renderTesttimer;
637
        private DispatcherTimer renderTesttimer;
632 638

  
633 639
        /// <summary>
634 640
        /// start page changing
......
650 656
        }
651 657

  
652 658
        private async Task PageChangingAsync(DOCPAGE currentPage, int changePageNumber)
653
        { 
659
        {
654 660
            CompareMode.IsChecked = false;
655 661
            var BalancePoint = ViewerDataModel.Instance.PageBalanceMode == true ? changePageNumber + ViewerDataModel.Instance.PageBalanceNumber : changePageNumber;
656
           
662

  
657 663
            #region 페이지가 벗어난 경우
658 664

  
659 665
            if (BalancePoint < 1)
......
668 674
                ViewerDataModel.Instance.PageBalanceNumber = 0;
669 675
            }
670 676

  
671
            #endregion
677
            #endregion 페이지가 벗어난 경우
672 678

  
673 679
            ViewerDataModel.Instance.PageNumber = BalancePoint;
674 680

  
......
679 685
            #region 페이지 이미지 로딩 수정
680 686

  
681 687
            ViewerDataModel.Instance.ImageViewPath = await App.PageStorage.GetPageImageAsync(changePageNumber);
682
       
688

  
683 689
            ScaleImage(pageWidth, pageHeight);
684 690

  
685 691
            ViewerDataModel.Instance.ImageViewWidth = pageWidth;
......
694 700
            inkBoard.Width = pageWidth;
695 701
            inkBoard.Height = pageHeight;
696 702

  
697
            #endregion
703
            #endregion 페이지 이미지 로딩 수정
698 704

  
699 705
            if (!testPanel2.IsHidden)
700 706
            {
......
744 750
                    //defaultBitmapImage_Compare.DecodePixelHeight = Int32.Parse(e.CurrentPage.PAGE_HEIGHT);
745 751
                    defaultBitmapImage_Compare.EndInit();
746 752

  
747
                    ViewerDataModel.Instance.ImageViewPath_C = null;                    
753
                    ViewerDataModel.Instance.ImageViewPath_C = null;
748 754

  
749 755
                    Logger.sendCheckLog("pageNavigator_PageChanging_zoomAndPanControl ZoomTo 설정", 1);
750 756
                    zoomAndPanControl.ZoomTo(new Rect
......
799 805
        {
800 806
            //if (zoomAndPanCanvas.Width.IsNaN())
801 807
            //{
802

  
803 808
            await zoomAndPanControl.Dispatcher.InvokeAsync(() =>
804 809
                zoomAndPanControl.ZoomTo(new Rect { X = 0, Y = 0, Width = zoomAndPanCanvas.Width, Height = zoomAndPanCanvas.Height })
805 810
                );
806 811
            //}
807
            
812

  
808 813
            var instanceMain = ViewerDataModel.Instance.SystemMain;
809 814

  
810 815
            instanceMain.dzMainMenu.CanvasDrawingMouseDownPoint = new Point(ViewerDataModel.Instance.ImageViewWidth / 2, ViewerDataModel.Instance.ImageViewHeight / 2);
......
822 827

  
823 828
            //Point startPoint = new Point(15, 15);
824 829

  
825
            
826 830
            //var markupinfo = ViewerDataModel.Instance._markupInfoList.Where(x => x.UserID == App.ViewInfo.UserID).First();
827 831

  
828 832
            ////var rect = GetRectControl(Convert.ToDouble(pageinfo.PAGE_WIDTH), Convert.ToDouble(pageinfo.PAGE_HEIGHT), markupinfo.UserID, markupinfo.MarkupInfoID, startPoint);
......
901 905
            textControl.Base_TextBlock.Margin = new Thickness(0, 0, 10, 0);
902 906
            textControl.Base_TextBox.Visibility = Visibility.Collapsed;
903 907
            textControl.Base_TextBlock.Visibility = Visibility.Visible;
904

  
905 908
        }
906 909

  
907 910
        private SymControlN GetSymNControl(double PageWidth, double PageHeight, string userId, string markupInfoId, Point startPosition)
......
933 936
                    PathXathData = "eJy1Ul1PwjAU/SvN9c3EdY5g1FAShyIxRgygxsemu7AbupZ0Vae/3g42/Azxxfuw9Z7Tnpx72t6lo4zdyAIFyHUBqwptSgG596tTzkuVYyHLqCDlbGnnPlK24C9k5hVP4viIV7LQfOWwROOlJ2ug36tVo1Sq5cLZJ5P1e1OrKRtYbV3qnsqcrZcC9oZNARuvpCL/KiCODoHxfo//EJmg8tIsNLKpd+hVLmBIWkPd2iU2cnGoFprlpJYGyzBOt8WuyeCVJSNgUstCM/1WHNgDZT5oJ3E4M0Ja5F7A8QmwgTTPIYlrnAfgIIm6W2hmVy3CN9M3GUzsyznOyVAdTBlG+NxvxffXx37nOlF3Fx3vppNd5P6nnL8bnWHlU23VktUrAWe3t5Px/cU5sKE1/qFRuKi8k6nV2Qae0ltIshPXncPNtX25lZF19BY2Sn2maWGK8GQEDMIXHbB7dJ7Ur1RrUcDmbXx3l76y0eN4endz+Qd/yX/663xk2v7eAQ==",
934 937
                    Memo = null
935 938
                };
936

  
937 939
            }
938 940
            catch (Exception ex)
939 941
            {
......
943 945
            return result;
944 946
        }
945 947

  
946
        private RectangleControl GetRectControl(double PageWidth, double PageHeight, string userId,string markupInfoId, Point startPosition)
948
        private RectangleControl GetRectControl(double PageWidth, double PageHeight, string userId, string markupInfoId, Point startPosition)
947 949
        {
948 950
            RectangleControl result = null;
949 951

  
......
973 975
                    Opacity = 1,
974 976
                    LeftBottomPoint = leftBottomPoint,
975 977
                    TopRightPoint = topRightPoint,
976
                    PointSet = new List<Point> { startPoint,leftBottomPoint,endPoint,topRightPoint },
978
                    PointSet = new List<Point> { startPoint, leftBottomPoint, endPoint, topRightPoint },
977 979
                    UserID = userId,
978 980
                    Memo = null
979 981
                };
980

  
981 982
            }
982 983
            catch (Exception ex)
983 984
            {
......
987 988
            return result;
988 989
        }
989 990

  
990

  
991

  
992
        private TextControl GetTextControl(double PageWidth, double PageHeight, string userId, string markupInfoId, string Text,double fontSize, FontWeight fontWeight,TextAlignment textAlignment, Rect parentRect,double positionY)
991
        private TextControl GetTextControl(double PageWidth, double PageHeight, string userId, string markupInfoId, string Text, double fontSize, FontWeight fontWeight, TextAlignment textAlignment, Rect parentRect, double positionY)
993 992
        {
994 993
            TextControl result = null;
995 994

  
996 995
            try
997 996
            {
998

  
999
                var txtSize = ShapeMeasure(new TextBlock { Text = Text, FontSize = fontSize, FontWeight = fontWeight,FontFamily = new FontFamily("Tahoma") });
997
                var txtSize = ShapeMeasure(new TextBlock { Text = Text, FontSize = fontSize, FontWeight = fontWeight, FontFamily = new FontFamily("Tahoma") });
1000 998

  
1001 999
                double startPositionX = parentRect.X;
1002 1000

  
......
1005 1003
                    case TextAlignment.Right:
1006 1004
                        startPositionX = parentRect.X + parentRect.Width - txtSize.Width;
1007 1005
                        break;
1006

  
1008 1007
                    case TextAlignment.Center:
1009 1008
                        startPositionX = parentRect.X + parentRect.Width / 2 - txtSize.Width / 2 - 3;
1010 1009
                        break;
......
1015 1014
                    X = startPositionX,
1016 1015
                    Y = positionY
1017 1016
                };
1018
                
1017

  
1019 1018
                System.Windows.Point startPoint = new System.Windows.Point(startPosition.X, startPosition.Y);
1020 1019
                System.Windows.Point endPoint = new System.Windows.Point(startPosition.X + txtSize.Width, startPosition.Y + txtSize.Height);
1021 1020
                System.Windows.Point leftBottomPoint = new System.Windows.Point(startPosition.X, startPosition.Y + txtSize.Height);
......
1047 1046
                    TextStyle = FontStyles.Normal,
1048 1047
                    TextWeight = FontWeights.Bold
1049 1048
                };
1050
          
1051 1049
            }
1052 1050
            catch (Exception ex)
1053 1051
            {
1054

  
1055 1052
            }
1056 1053

  
1057 1054
            return result;
1058 1055
        }
1056

  
1059 1057
        public static Size ShapeMeasure(UIElement e)
1060 1058
        {
1061 1059
            // Measured Size is bounded to be less than maxSize
......
1078 1076
            System.Diagnostics.Debug.WriteLine("MarkupLoad - Clear " + new TimeSpan(stopwatch.ElapsedTicks).ToString());
1079 1077

  
1080 1078
            foreach (var markup in ViewerDataModel.Instance.MyMarkupList.Where(param => param.PageNumber == pageNumber))
1081
            { 
1079
            {
1082 1080
                var info = ViewerDataModel.Instance._markupInfoList.Where(param => param.MarkupInfoID == markup.MarkupInfoID).FirstOrDefault();
1083 1081
                if (info != null)
1084 1082
                {
......
1115 1113
                Common.ViewerDataModel.Instance.MarkupControls_Sync.Clear();
1116 1114
                List<MarkupInfoItem> gridSelectionRevItem = gridViewRevMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList();
1117 1115

  
1118

  
1119 1116
                foreach (var item in gridSelectionRevItem)
1120 1117
                {
1121 1118
                    var markupitems = item.MarkupList.Where(pageItem => pageItem.PageNumber == pageNumber).ToList();
......
1137 1134
            foreach (var item in ViewerDataModel.Instance._markupInfoList)
1138 1135
            {
1139 1136
                //Comment 가 존재할 경우에만 Thumbnail 에 추가
1140
                if(item.MarkupList != null)
1137
                if (item.MarkupList != null)
1141 1138
                {
1142 1139
                    UsersCommentPagesMember instance = new UsersCommentPagesMember();
1143 1140
                    instance.UserName = item.UserName;
......
1155 1152
                        instance.PageNumber = ViewerDataModel.Instance.MarkupList_Pre.Where(data => data.MarkupInfoID == item.MarkupInfoID).Select(d => d.PageNumber).ToList();
1156 1153
                    }
1157 1154
                    _pages.Add(instance);
1158
                }                   
1155
                }
1159 1156
            }
1160
            
1161
           this.pageNavigator.SetCommentList(_pages.ToList());
1157

  
1158
            this.pageNavigator.SetCommentList(_pages.ToList());
1162 1159
        }
1163 1160

  
1164 1161
        public void MarkupitemViewUpdate(string markupinfo_id)
......
1187 1184
        {
1188 1185
            var instance = ViewerDataModel.Instance;
1189 1186

  
1190
            if(instance.IsWheelPageChanage)
1187
            if (instance.IsWheelPageChanage)
1191 1188
            {
1192 1189
                return;
1193 1190
            }
1194 1191

  
1195 1192
            if (instance.IsPressCtrl) // && !instance.IsWheelPageChanage)
1196 1193
            {
1197
       
1198 1194
                int changePage = 0;
1199
                
1195

  
1200 1196
                if (e.Delta > 0)
1201 1197
                {
1202 1198
                    if (0 < instance.ContentOffsetY)
......
1213 1209
                    //    }
1214 1210
                    //}
1215 1211
                }
1216
                else if(e.Delta < 0)
1212
                else if (e.Delta < 0)
1217 1213
                {
1218 1214
                    if (instance.ContentHeight > instance.ContentOffsetY + instance.ContentViewportHeight)
1219 1215
                    {
1220
                        Vector dragOffset = new Vector(0,e.Delta);
1216
                        Vector dragOffset = new Vector(0, e.Delta);
1221 1217
                        MoveZoomAndPanControl(dragOffset);
1222 1218
                    }
1223 1219
                    //else
......
1251 1247

  
1252 1248
                //        pageNavigator.GotoPage(Convert.ToInt32(instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber) + changePage);
1253 1249
                //    });
1254
                    
1255 1250

  
1256 1251
                //}
1257 1252
            }
......
1300 1295
                zoomAndPanControl.ContentZoomFocusY));
1301 1296
        }
1302 1297

  
1303

  
1304 1298
        //강인구 추가 (줌 인아웃 수치 변경)
1305 1299
        //큰해상도의 문서일 경우 줌 인 아웃시 사이즈 변동이 큼
1306 1300
        private void ZoomOut(Point contentZoomCenter)
......
1335 1329
            {
1336 1330
                zoomAndPanControl2.ZoomAboutPoint(zoomAndPanControl.ContentScale, contentZoomCenter);
1337 1331
            }
1338

  
1339 1332
        }
1340 1333

  
1341 1334
        private void ZoomOut_Sync(Point contentZoomCenter)
......
1390 1383
            //}
1391 1384
        }
1392 1385

  
1393
        #endregion
1386
        #endregion ZoomIn & ZoomOut
1394 1387

  
1395 1388
        private void init()
1396 1389
        {
1397 1390
            foreach (var item in ViewerDataModel.Instance.MarkupControls)
1398 1391
            {
1399

  
1400 1392
                ControlList.Clear();
1401 1393
                listBox.Items.Clear();
1402 1394
                selected_item.Clear();
1403 1395

  
1404 1396
                (item as IMarkupCommonData).IsSelected = false;
1405 1397
            }
1406

  
1407 1398
        }
1408 1399

  
1409 1400
        private HitTestResultBehavior MyCallback(HitTestResult result)
......
1450 1441
            SelectionPath.RenderTransformOrigin = new Point(0, 0);
1451 1442
        }
1452 1443

  
1453
        #region 컨트롤 초기화 
1444
        #region 컨트롤 초기화
1445

  
1454 1446
        public void Control_Init(object control)
1455 1447
        {
1456 1448
            if (L_Size != 0 && (control as IPath) != null)
......
1466 1458
                        (control as RectangleControl).StrokeColor = Brushes.Red;
1467 1459
                    }
1468 1460
                    break;
1461

  
1469 1462
                case "CircleControl":
1470 1463
                    {
1471 1464
                        (control as CircleControl).StrokeColor = Brushes.Red;
1472 1465
                    }
1473 1466
                    break;
1467

  
1474 1468
                case "TriControl":
1475 1469
                    {
1476 1470
                        (control as TriControl).StrokeColor = Brushes.Red;
1477 1471
                    }
1478 1472
                    break;
1473

  
1479 1474
                case "RectCloudControl":
1480 1475
                    {
1481 1476
                        (control as RectCloudControl).StrokeColor = Brushes.Red;
1482 1477
                    }
1483 1478
                    break;
1479

  
1484 1480
                case "CloudControl":
1485 1481
                    {
1486 1482
                        (control as CloudControl).StrokeColor = Brushes.Red;
1487 1483
                    }
1488 1484
                    break;
1485

  
1489 1486
                case "PolygonControl":
1490 1487
                    {
1491 1488
                        (control as PolygonControl).StrokeColor = Brushes.Red;
1492 1489
                    }
1493 1490
                    break;
1491

  
1494 1492
                case "ArcControl":
1495 1493
                    {
1496 1494
                        (control as ArcControl).StrokeColor = Brushes.Red;
1497 1495
                    }
1498 1496
                    break;
1497

  
1499 1498
                case "ArrowArcControl":
1500 1499
                    {
1501 1500
                        (control as ArrowArcControl).StrokeColor = Brushes.Red;
1502 1501
                    }
1503 1502
                    break;
1503

  
1504 1504
                case "LineControl":
1505 1505
                    {
1506 1506
                        (control as LineControl).StrokeColor = Brushes.Red;
1507 1507
                    }
1508 1508
                    break;
1509

  
1509 1510
                case "ArrowControl_Multi":
1510 1511
                    {
1511 1512
                        (control as ArrowControl_Multi).StrokeColor = Brushes.Red;
1512 1513
                    }
1513 1514
                    break;
1515

  
1514 1516
                case "TextControl":
1515 1517
                    {
1516 1518
                        (control as TextControl).BackInnerColor = new SolidColorBrush(Color.FromArgb(Convert.ToByte(255 * 0.6), Colors.White.R, Colors.White.G, Colors.White.B));
1517 1519
                    }
1518 1520
                    break;
1521

  
1519 1522
                case "ArrowTextControl":
1520 1523
                    {
1521 1524
                        (control as ArrowTextControl).BackInnerColor = new SolidColorBrush(Color.FromArgb(Convert.ToByte(255 * 0.6), Colors.White.R, Colors.White.G, Colors.White.B));
1522 1525
                    }
1523 1526
                    break;
1527

  
1524 1528
                case "InsideWhiteControl":
1525 1529
                    {
1526 1530
                        (control as InsideWhiteControl).StrokeColor = Brushes.White;
1527 1531
                    }
1528 1532
                    break;
1533

  
1529 1534
                case "OverlapWhiteControl":
1530 1535
                    {
1531 1536
                        (control as OverlapWhiteControl).StrokeColor = Brushes.White;
1532 1537
                    }
1533 1538
                    break;
1539

  
1534 1540
                case "ClipWhiteControl":
1535 1541
                    {
1536 1542
                        (control as ClipWhiteControl).StrokeColor = Brushes.White;
1537 1543
                    }
1538 1544
                    break;
1545

  
1539 1546
                case "CoordinateControl":
1540 1547
                    {
1541 1548
                        (control as CoordinateControl).StrokeColor = Brushes.Black;
......
1543 1550
                    break;
1544 1551
            }
1545 1552
        }
1546
        #endregion
1553

  
1554
        #endregion 컨트롤 초기화
1547 1555

  
1548 1556
        public void firstCondition_MouseLeave(object sender, MouseEventArgs e)
1549 1557
        {
1550 1558
            //Control_Init(e.Source);
1551 1559
        }
1560

  
1552 1561
        //private Window _dragdropWindow = null;
1553 1562

  
1554 1563
        [DllImport("user32.dll")]
......
1561 1570
            public Int32 X;
1562 1571
            public Int32 Y;
1563 1572
        };
1573

  
1564 1574
        /*
1565 1575
       public string symbol_id = null;
1566 1576
       public long symbol_group_id;
......
1572 1582
           PlaceImageSymbol(symbol_id, symbol_group_id, symbol_SelectedIndex, new Point(zoomAndPanCanvas.ActualWidth / 2,
1573 1583
               zoomAndPanCanvas.ActualHeight / 2));
1574 1584

  
1575

  
1576 1585
               if (this._dragdropWindow != null)
1577 1586
               {
1578 1587
                   this._dragdropWindow.Close();
......
1585 1594
               symbol_Data = Data_;
1586 1595
               symbol_img = img;
1587 1596

  
1588

  
1589 1597
               CreateDragDropWindow2(img);
1590
              
1591 1598
    }
1592 1599

  
1593 1600
    private void CreateDragDropWindow2(ImageSource image)
......
1595 1602
            this._dragdropWindow = new Window();
1596 1603
            _dragdropWindow.Cursor = new Cursor(MainWindow.CursorChange().StreamSource);
1597 1604
            _dragdropWindow.WindowStyle = WindowStyle.None;
1598
            _dragdropWindow.AllowsTransparency = true;           
1605
            _dragdropWindow.AllowsTransparency = true;
1599 1606
            _dragdropWindow.AllowDrop = false;
1600 1607
            _dragdropWindow.Background = null;
1601 1608
            _dragdropWindow.IsHitTestVisible = false;
1602 1609
            _dragdropWindow.SizeToContent = SizeToContent.WidthAndHeight;
1603 1610
            _dragdropWindow.Topmost = true;
1604 1611
            _dragdropWindow.ShowInTaskbar = false;
1605
            
1612

  
1606 1613
            Rectangle r = new Rectangle();
1607 1614
            r.Width = image.Width;
1608 1615
            r.Height = image.Height;
1609
            r.Opacity = 0.5;            
1616
            r.Opacity = 0.5;
1610 1617
            r.Fill = new ImageBrush(image);
1611 1618
            this._dragdropWindow.Content = r;
1612 1619

  
......
1615 1622

  
1616 1623
            //w32Mouse.X = getCurrentPoint.X;
1617 1624
            this._dragdropWindow.Left = w32Mouse.X - (image.Width / 2);
1618
            this._dragdropWindow.Top = w32Mouse.Y - (image.Height / 2); 
1625
            this._dragdropWindow.Top = w32Mouse.Y - (image.Height / 2);
1619 1626
            this._dragdropWindow.Show();
1620 1627
        }
1621 1628

  
1622
        
1623

  
1624 1629
         */
1625 1630

  
1626 1631
        public void MoveZoomAndPanControl(Vector dragOffset)
1627 1632
        {
1628
   
1629 1633
            zoomAndPanControl.ContentOffsetX -= dragOffset.X;
1630 1634
            zoomAndPanControl.ContentOffsetY -= dragOffset.Y;
1631 1635

  
......
1649 1653
            }
1650 1654

  
1651 1655
            getCurrentPoint = e.GetPosition(drawingRotateCanvas);
1652
            
1656

  
1653 1657
            if ((e.MiddleButton == MouseButtonState.Pressed) || (e.RightButton == MouseButtonState.Pressed))
1654 1658
            {
1655 1659
                SetCursor();
......
1726 1730
                        (currentControl as CloudControl).ArcLength = ViewerDataModel.Instance.ArcLength;
1727 1731
                    }
1728 1732

  
1729

  
1730 1733
                    #region // 모든 컨트롤의 공통기능 제어
1734

  
1731 1735
                    if (controlType != ControlType.PenControl)
1732 1736
                    {
1733
                        currentControl.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1737
                        currentControl.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.IsAxisLock || ViewerDataModel.Instance.IsPressShift);
1734 1738
                    }
1735 1739

  
1736

  
1737
                    #endregion
1740
                    #endregion // 모든 컨트롤의 공통기능 제어
1738 1741

  
1739 1742
                    #region // 각 컨트롤의 특별한 기능을 제어한다.
1740 1743

  
......
1751 1754
                                }
1752 1755
                            }
1753 1756
                            break;
1757

  
1754 1758
                        case (ControlType.InsideWhite):
1755 1759
                            {
1756 1760
                                var control = currentControl as InsideWhiteControl;
......
1763 1767
                                }
1764 1768
                            }
1765 1769
                            break;
1770

  
1766 1771
                        case ControlType.OverlapWhite:
1767 1772
                            {
1768 1773
                                var control = currentControl as OverlapWhiteControl;
......
1775 1780
                                }
1776 1781
                            }
1777 1782
                            break;
1783

  
1778 1784
                        case ControlType.ClipWhite:
1779 1785
                            {
1780 1786
                                var control = currentControl as ClipWhiteControl;
......
1787 1793
                                }
1788 1794
                            }
1789 1795
                            break;
1796

  
1790 1797
                        case ControlType.RectCloud:
1791 1798
                            {
1792 1799
                                var control = currentControl as RectCloudControl;
......
1798 1805
                                }
1799 1806
                            }
1800 1807
                            break;
1808

  
1801 1809
                        case ControlType.SingleLine:
1802 1810
                        case ControlType.CancelLine:
1803 1811
                        case ControlType.ArrowLine:
......
1810 1818
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1811 1819
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1812 1820
                                }
1813

  
1814 1821
                            }
1815 1822
                            break;
1816 1823

  
......
1918 1925
                                }
1919 1926
                            }
1920 1927
                            break;
1928

  
1921 1929
                        case ControlType.PolygonControl:
1922 1930
                        case ControlType.ChainLine:
1923 1931
                            {
......
1930 1938
                                }
1931 1939
                            }
1932 1940
                            break;
1941

  
1933 1942
                        case ControlType.Sign:
1934 1943
                            {
1935 1944
                                var control = currentControl as SignControl;
......
1939 1948
                                }
1940 1949
                            }
1941 1950
                            break;
1951

  
1942 1952
                        case ControlType.Symbol:
1943 1953
                            {
1944 1954
                                var control = currentControl as SymControl;
......
1948 1958
                                }
1949 1959
                            }
1950 1960
                            break;
1961

  
1951 1962
                        case ControlType.Stamp:
1952 1963
                            {
1953 1964
                                var control = currentControl as SymControlN;
......
1966 1977
                                }
1967 1978
                            }
1968 1979
                            break;
1980

  
1969 1981
                        case ControlType.Rectangle:
1970 1982
                        case ControlType.Mark:
1971 1983
                            {
......
1978 1990
                                }
1979 1991
                            }
1980 1992
                            break;
1993

  
1981 1994
                        case ControlType.PenControl:
1982 1995
                            {
1983 1996
                                stroke.StylusPoints.Add(new StylusPoint(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y));
1984 1997
                                //inkBoard.Strokes.Add(stroke);
1985 1998
                            }
1986 1999
                            break;
2000

  
1987 2001
                        default:
1988 2002
                            break;
1989 2003
                    }
1990 2004

  
1991
                    #endregion
2005
                    #endregion // 각 컨트롤의 특별한 기능을 제어한다.
2006

  
1992 2007
                    if (ViewerDataModel.Instance.AngleVisibility == Visibility.Visible)
1993 2008
                    {
1994 2009
                        ViewerDataModel.Instance.Angle = currentControl.CommentAngle;
1995 2010
                    }
1996

  
1997 2011
                }
1998 2012
            }
1999
            else if(mouseHandlingMode == MouseHandlingMode.Drawing && e.LeftButton == MouseButtonState.Pressed)
2013
            else if (mouseHandlingMode == MouseHandlingMode.Drawing && e.LeftButton == MouseButtonState.Pressed)
2000 2014
            {
2001 2015
                Point currentCanvasDrawingMouseMovePoint = e.GetPosition(drawingRotateCanvas);
2002 2016
                Point currentCanvasZoomPanningMouseMovePoint = e.GetPosition(zoomAndPanCanvas);
......
2027 2041
                    return;
2028 2042
                }
2029 2043
            }
2030
            else if (((e.LeftButton == MouseButtonState.Pressed) && mouseHandlingMode == MouseHandlingMode.Selecting) || 
2031
                ((e.LeftButton == MouseButtonState.Pressed) && mouseHandlingMode == MouseHandlingMode.Capture) || 
2044
            else if (((e.LeftButton == MouseButtonState.Pressed) && mouseHandlingMode == MouseHandlingMode.Selecting) ||
2045
                ((e.LeftButton == MouseButtonState.Pressed) && mouseHandlingMode == MouseHandlingMode.Capture) ||
2032 2046
                ((e.LeftButton == MouseButtonState.Pressed) && mouseHandlingMode == MouseHandlingMode.DragZoom))
2033 2047
            {
2034 2048
                Point curMouseDownPoint = e.GetPosition(drawingRotateCanvas);
......
2062 2076
            }
2063 2077
            /*
2064 2078
            else if ((e.LeftButton == MouseButtonState.Pressed) && mouseHandlingMode == MouseHandlingMode.DragSymbol)
2065
            { //symbol      
2079
            { //symbol
2066 2080
                if(_dragdropWindow != null)
2067 2081
                {
2068 2082
                    Win32Point w32Mouse = new Win32Point();
......
2070 2084

  
2071 2085
                    this._dragdropWindow.Left = w32Mouse.X - (symbol_img.Width / 2);
2072 2086
                    this._dragdropWindow.Top = w32Mouse.Y - (symbol_img.Height / 2);
2073
                }                
2087
                }
2074 2088
            }
2075 2089
            */
2076
            else if ((e.LeftButton == MouseButtonState.Released) && (e.MiddleButton == MouseButtonState.Released) && 
2090
            else if ((e.LeftButton == MouseButtonState.Released) && (e.MiddleButton == MouseButtonState.Released) &&
2077 2091
                (e.RightButton == MouseButtonState.Released) && ViewerDataModel.Instance.MarkupControls_USER.Count > 0)
2078 2092
            {
2079 2093
                var control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.IsMouseOver).FirstOrDefault();
2080
                if(control != null)
2094
                if (control != null)
2081 2095
                {
2082 2096
                    this.cursor = Cursors.Hand;
2083 2097
                    SetCursor();
......
2121 2135
        private void zoomAndPanControl_MouseUp(object sender, MouseButtonEventArgs e)
2122 2136
        {
2123 2137
            IsDrawing = false;
2124
    
2138

  
2125 2139
            if (mouseHandlingMode != MouseHandlingMode.None)
2126 2140
            {
2127 2141
                if (mouseHandlingMode == MouseHandlingMode.Drawing)
......
2134 2148
                    {
2135 2149
                        case ControlType.None:
2136 2150
                            break;
2151

  
2137 2152
                        case ControlType.Rectangle:
2138 2153
                            {
2139

  
2140 2154
                            }
2141 2155
                            break;
2156

  
2142 2157
                        case ControlType.PenControl:
2143 2158
                            {
2144

  
2145 2159
                            }
2146 2160
                            break;
2161

  
2147 2162
                        default:
2148 2163
                            break;
2149
                    }                    
2164
                    }
2150 2165
                }
2151 2166
                else if (mouseHandlingMode == MouseHandlingMode.Selecting && e.ChangedButton == MouseButton.Left || mouseHandlingMode == MouseHandlingMode.Capture && e.ChangedButton == MouseButton.Left || mouseHandlingMode == MouseHandlingMode.DragZoom && e.ChangedButton == MouseButton.Left)
2152 2167
                {
2153
                  
2154 2168
                    if (isLeftMouseButtonDownOnWindow)
2155 2169
                    {
2156 2170
                        bool wasDragSelectionApplied = false;
......
2165 2179
                                symbolselectindex = symbolPanel_Instance.RadTab.SelectedIndex;
2166 2180
                                Set_Symbol_Capture(endPoint);
2167 2181
                                ViewerDataModel.Instance.ViewVisible = Visibility.Collapsed;
2168
                                ViewerDataModel.Instance.ViewVisible = Visibility.Visible;                                
2182
                                ViewerDataModel.Instance.ViewVisible = Visibility.Visible;
2169 2183
                                ViewerDataModel.Instance.Capture_Opacity = 0;
2170 2184
                            }
2171 2185
                            else if (mouseHandlingMode == MouseHandlingMode.Capture)
......
2221 2235

  
2222 2236
                zoomAndPanControl.ReleaseMouseCapture();
2223 2237

  
2224

  
2225 2238
                e.Handled = true;
2226 2239
            }
2227 2240
            else
......
2235 2248
        }
2236 2249

  
2237 2250
        public void Set_Symbol_Capture(Point endPoint)
2238
        {       
2251
        {
2239 2252
            double x = CanvasDrawingMouseDownPoint.X;
2240 2253
            double y = CanvasDrawingMouseDownPoint.Y;
2241
            if(x > endPoint.X)
2254
            if (x > endPoint.X)
2242 2255
            {
2243 2256
                x = endPoint.X;
2244 2257
                y = endPoint.Y;
......
2306 2319

  
2307 2320
        private void zoomAndPanControl_MouseDoubleClick(object sender, MouseButtonEventArgs e)
2308 2321
        {
2309

  
2310 2322
        }
2311 2323

  
2312 2324
        /// <summary>
......
2355 2367
            //선택 중
2356 2368
            else if (mouseHandlingMode == MouseHandlingMode.Selecting)
2357 2369
            {
2358

  
2359 2370
                dragSelectionBorder.Visibility = Visibility.Visible;
2360 2371
            }
2361 2372
            else
......
2374 2385

  
2375 2386
            //
2376 2387
            // Determine x,y,width and height of the rect inverting the points if necessary.
2377
            // 
2388
            //
2378 2389

  
2379 2390
            if (pt2.X < pt1.X)
2380 2391
            {
......
2461 2472

  
2462 2473
            zoomAndPanControl.RotationAngle = rotate.Angle;
2463 2474

  
2464

  
2465 2475
            if (!testPanel2.IsHidden)
2466 2476
            {
2467 2477
                zoomAndPanControl2.RotationAngle = rotate.Angle;
......
2561 2571
                        FilePath = Data_,
2562 2572
                        ImageData = img.Source,
2563 2573
                        StartPoint = canvasZoomPanningMouseDownPoint,
2564
                        EndPoint = new Point(canvasZoomPanningMouseDownPoint.X + img.Source.Width, 
2574
                        EndPoint = new Point(canvasZoomPanningMouseDownPoint.X + img.Source.Width,
2565 2575
                        canvasZoomPanningMouseDownPoint.Y + img.Source.Height),
2566
                        TopRightPoint = new Point(canvasZoomPanningMouseDownPoint.X+img.Source.Width,
2576
                        TopRightPoint = new Point(canvasZoomPanningMouseDownPoint.X + img.Source.Width,
2567 2577
                        canvasZoomPanningMouseDownPoint.Y),
2568 2578
                        LeftBottomPoint = new Point(canvasZoomPanningMouseDownPoint.X,
2569 2579
                        canvasZoomPanningMouseDownPoint.Y + img.Source.Height)
......
2653 2663
                {
2654 2664
                    (text_item_ as TextControl).Base_TextBlock.Visibility = Visibility.Visible;
2655 2665
                    (text_item_ as TextControl).Base_TextBox.Visibility = Visibility.Collapsed;
2656
                    (text_item_ as TextControl).IsEditingMode = false;                    
2666
                    (text_item_ as TextControl).IsEditingMode = false;
2657 2667
                    currentControl = null;
2658 2668
                }
2659 2669

  
......
2666 2676
                }
2667 2677
            }
2668 2678

  
2669
            double Ang = 0;                                          
2679
            double Ang = 0;
2670 2680
            if (rotate.Angle != 0)
2671 2681
            {
2672 2682
                Ang = 360 - rotate.Angle;
......
2678 2688
            }
2679 2689
            /*
2680 2690
            if (mouseHandlingMode == MouseHandlingMode.DragSymbol && e.LeftButton == MouseButtonState.Pressed)
2681
            {                
2691
            {
2682 2692
                canvasZoomPanningMouseDownPoint = e.GetPosition(zoomAndPanCanvas);
2683 2693
                if(symbol_id != null)
2684 2694
                {
2685 2695
                    PlaceImageSymbol(symbol_id, symbol_group_id, symbol_SelectedIndex, canvasZoomPanningMouseDownPoint);
2686
                }                
2696
                }
2687 2697
            }
2688 2698

  
2689 2699
            if (mouseHandlingMode == MouseHandlingMode.DragSymbol && e.RightButton == MouseButtonState.Pressed)
......
2731 2741
                }
2732 2742

  
2733 2743
                //this.pageNavigator.GotoPage(this.pageNavigator._NextPage.PageNumber);
2734

  
2735 2744
            }
2736 2745
            else if (e.XButton2 == MouseButtonState.Pressed)
2737 2746
            {
......
2772 2781

  
2773 2782
                var control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.IsMouseOver).FirstOrDefault();
2774 2783

  
2775
                if(control == null)
2784
                if (control == null)
2776 2785
                {
2777

  
2778 2786
                    ViewerDataModel.Instance.SetAngleVisible(Visibility.Collapsed);
2779 2787
                }
2780 2788
                else
2781 2789
                {
2782
                    ViewerDataModel.Instance.SetAngleVisible(Visibility.Visible);
2790
                    if (ControlTypeExtansions.LineTypes.Contains(control.ControlType))
2791
                    {
2792
                        ViewerDataModel.Instance.SetAngleVisible(Visibility.Visible);
2793
                    }
2783 2794

  
2784 2795
                    AdornerFinal final = null;
2785 2796

  
......
2821 2832

  
2822 2833
                        if ((control as TextControl) != null)
2823 2834
                        {
2824
                            if(!((control as TextControl).EnableEditing)) {
2835
                            if (!((control as TextControl).EnableEditing))
2836
                            {
2825 2837
                                (control as TextControl).EnableEditing = true;
2826 2838
                            }
2827 2839
                            if ((control as TextControl).TextStyle == FontStyles.Italic)
......
2850 2862
                            }
2851 2863
                            ViewerDataModel.Instance.TextSize = (control as TextControl).TextSize;
2852 2864
                            ViewerDataModel.Instance.checkHighlight = (control as TextControl).IsHighLight;
2853

  
2854 2865
                        }
2855 2866
                        else if ((control as ArrowTextControl) != null)
2856 2867
                        {
......
2912 2923
                }
2913 2924
            }
2914 2925
            else if (mouseHandlingMode == MouseHandlingMode.Drawing)
2915
            {               
2926
            {
2916 2927
                init();
2917 2928
                //강인구 추가(우 클릭 일 경우 커서 변경 하지 않음)
2918 2929
                if (cursor != Cursors.SizeAll)
......
2999 3010
                            }
3000 3011
                        }
3001 3012
                        break;
3013

  
3002 3014
                    case ControlType.InsideWhite:
3003 3015
                        {
3004 3016
                            if (e.LeftButton == MouseButtonState.Pressed)
......
3034 3046
                            }
3035 3047
                        }
3036 3048
                        break;
3049

  
3037 3050
                    case ControlType.OverlapWhite:
3038 3051
                        {
3039 3052
                            if (e.LeftButton == MouseButtonState.Pressed)
......
3069 3082
                            }
3070 3083
                        }
3071 3084
                        break;
3085

  
3072 3086
                    case ControlType.ClipWhite:
3073 3087
                        {
3074 3088
                            if (e.LeftButton == MouseButtonState.Pressed)
......
3104 3118
                            }
3105 3119
                        }
3106 3120
                        break;
3121

  
3107 3122
                    case ControlType.Rectangle:
3108 3123
                        {
3109 3124
                            if (e.LeftButton == MouseButtonState.Pressed)
......
3139 3154
                            }
3140 3155
                        }
3141 3156
                        break;
3157

  
3142 3158
                    case ControlType.RectCloud:
3143 3159
                        {
3144 3160
                            if (e.LeftButton == MouseButtonState.Pressed)
......
3154 3170
                                    CreateCommand.Instance.Execute(currentControl);
3155 3171

  
3156 3172
                                    currentControl = null;
3157
                                
3173

  
3158 3174
                                    this.cursor = new Cursor(MainWindow.CursorChange().StreamSource);
3159 3175
                                }
3160 3176
                                else
......
3174 3190
                            }
3175 3191
                        }
3176 3192
                        break;
3193

  
3177 3194
                    case ControlType.Circle:
3178 3195
                        {
3179 3196
                            if (e.LeftButton == MouseButtonState.Pressed)
......
3207 3224
                            }
3208 3225
                        }
3209 3226
                        break;
3227

  
3210 3228
                    case ControlType.Triangle:
3211 3229
                        {
3212 3230
                            if (e.LeftButton == MouseButtonState.Pressed)
......
3247 3265
                            }
3248 3266
                        }
3249 3267
                        break;
3268

  
3250 3269
                    case ControlType.CancelLine:
3251 3270
                    case ControlType.SingleLine:
3252 3271
                    case ControlType.ArrowLine:
......
3285 3304
                            }
3286 3305
                        }
3287 3306
                        break;
3307

  
3288 3308
                    case ControlType.PolygonControl:
3289 3309
                        {
3290 3310
                            if (currentControl is PolygonControl)
......
3344 3364
                            }
3345 3365
                        }
3346 3366
                        break;
3367

  
3347 3368
                    case ControlType.ChainLine:
3348 3369
                        {
3349 3370
                            if (currentControl is PolygonControl)
......
3388 3409

  
3389 3410
                                    //if (IsDrawingEnable(canvasZoomPanningMouseDownPoint))
3390 3411
                                    //{
3391
                                        var polygonControl = (currentControl as PolygonControl);
3392
                                        currentControl.CommentID = Commons.shortGuid();
3393
                                        currentControl.MarkupInfoID = App.Custom_ViewInfoId;
3394
                                        currentControl.IsNew = true;
3395
                                        ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3396
                                        //currentControl.OnApplyTemplate();
3397
                                        //polygonControl.PointC.pointSet.Add(canvasDrawingMouseDownPoint);
3398
                                        //polygonControl.PointC.pointSet.Add(canvasDrawingMouseDownPoint);
3399
                                        polygonControl.PointSet.Add(CanvasDrawingMouseDownPoint);
3400
                                        polygonControl.PointSet.Add(CanvasDrawingMouseDownPoint);
3412
                                    var polygonControl = (currentControl as PolygonControl);
3413
                                    currentControl.CommentID = Commons.shortGuid();
3414
                                    currentControl.MarkupInfoID = App.Custom_ViewInfoId;
3415
                                    currentControl.IsNew = true;
3416
                                    ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3417
                                    //currentControl.OnApplyTemplate();
3418
                                    //polygonControl.PointC.pointSet.Add(canvasDrawingMouseDownPoint);
3419
                                    //polygonControl.PointC.pointSet.Add(canvasDrawingMouseDownPoint);
3420
                                    polygonControl.PointSet.Add(CanvasDrawingMouseDownPoint);
3421
                                    polygonControl.PointSet.Add(CanvasDrawingMouseDownPoint);
3401 3422
                                    //}
3402 3423
                                }
3403 3424
                            }
3404 3425
                        }
3405 3426
                        break;
3427

  
3406 3428
                    case ControlType.ArcLine:
3407 3429
                        {
3408 3430
                            if (e.LeftButton == MouseButtonState.Pressed)
......
3444 3466
                            }
3445 3467
                        }
3446 3468
                        break;
3469

  
3447 3470
                    case ControlType.ArcArrow:
3448 3471
                        {
3449 3472
                            if (e.LeftButton == MouseButtonState.Pressed)
......
3489 3512
                            }
3490 3513
                        }
3491 3514
                        break;
3515

  
3492 3516
                    case ControlType.ArrowMultiLine:
3493 3517
                        {
3494 3518
                            if (e.LeftButton == MouseButtonState.Pressed)
3495 3519
                            {
3496 3520
                                //if (IsDrawingEnable(canvasZoomPanningMouseDownPoint))
3497 3521
                                //{
3498

  
3499
                                    if (currentControl is ArrowControl_Multi)
3522
                                if (currentControl is ArrowControl_Multi)
3523
                                {
3524
                                    var content = currentControl as ArrowControl_Multi;
3525
                                    if (content.MiddlePoint == new Point(0, 0))
3500 3526
                                    {
3501
                                        var content = currentControl as ArrowControl_Multi;
3502
                                        if (content.MiddlePoint == new Point(0, 0))
3527
                                        if (ViewerDataModel.Instance.IsAxisLock || ViewerDataModel.Instance.IsPressShift)
3503 3528
                                        {
3504
                                            if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift)
3505
                                            {
3506
                                                content.MiddlePoint = content.EndPoint;
3507
                                            }
3508
                                            else
3509
                                            {
3510
                                                content.MiddlePoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y);
3511
                                            }
3529
                                            content.MiddlePoint = content.EndPoint;
3512 3530
                                        }
3513 3531
                                        else
3514 3532
                                        {
3515
                                            //20180906 LJY TEST IsRotationDrawingEnable
3516
                                            if (IsGetoutpoint((currentControl as ArrowControl_Multi).PointSet.Where(data => IsRotationDrawingEnable(data) == true).FirstOrDefault()))
3517
                                            {
3518
                                                return;
3519
                                            }
3520

  
3521
                                            CreateCommand.Instance.Execute(currentControl);
3522

  
3523
                                            currentControl = null;
3524
                                            ViewerDataModel.Instance.SetAngleVisible(Visibility.Collapsed);
3533
                                            content.MiddlePoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y);
3525 3534
                                        }
3526 3535
                                    }
3527 3536
                                    else
3528 3537
                                    {
3529
                                        currentControl = new ArrowControl_Multi
3538
                                        //20180906 LJY TEST IsRotationDrawingEnable
3539
                                        if (IsGetoutpoint((currentControl as ArrowControl_Multi).PointSet.Where(data => IsRotationDrawingEnable(data) == true).FirstOrDefault()))
3530 3540
                                        {
3531
                                            StartPoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y),
3532
                                            Background = new SolidColorBrush(Colors.Black)
3533
                                        };
3534
                                        currentControl.CommentID = Commons.shortGuid();
3535
                                        currentControl.MarkupInfoID = App.Custom_ViewInfoId;
3536
                                        currentControl.IsNew = true;
3537
                                        ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3538
                                        ViewerDataModel.Instance.SetAngleVisible(Visibility.Visible);
3541
                                            return;
3542
                                        }
3543

  
3544
                                        CreateCommand.Instance.Execute(currentControl);
3545

  
3546
                                        currentControl = null;
3547
                                        ViewerDataModel.Instance.SetAngleVisible(Visibility.Collapsed);
3539 3548
                                    }
3549
                                }
3550
                                else
3551
                                {
3552
                                    currentControl = new ArrowControl_Multi
3553
                                    {
3554
                                        StartPoint = new Point(CanvasDrawingMouseDownPoint.X, CanvasDrawingMouseDownPoint.Y),
3555
                                        Background = new SolidColorBrush(Colors.Black)
3556
                                    };
3557
                                    currentControl.CommentID = Commons.shortGuid();
3558
                                    currentControl.MarkupInfoID = App.Custom_ViewInfoId;
3559
                                    currentControl.IsNew = true;
3560
                                    ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3561
                                    ViewerDataModel.Instance.SetAngleVisible(Visibility.Visible);
3562
                                }
3540 3563
                                //}
3541 3564
                            }
3542 3565
                        }
3543 3566
                        break;
3567

  
3544 3568
                    case ControlType.PolygonCloud:
3545 3569
                        {
3546 3570
                            if (currentControl is CloudControl)
......
3587 3611

  
3588 3612
                                    //if (IsDrawingEnable(canvasZoomPanningMouseDownPoint))
3589 3613
                                    //{
3590
                                        var polygonControl = (currentControl as CloudControl);
3591
                                        currentControl.CommentID = Commons.shortGuid();
3592
                                        currentControl.MarkupInfoID = App.Custom_ViewInfoId;
3593
                                        currentControl.IsNew = true;
3594
                                        ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3614
                                    var polygonControl = (currentControl as CloudControl);
3615
                                    currentControl.CommentID = Commons.shortGuid();
3616
                                    currentControl.MarkupInfoID = App.Custom_ViewInfoId;
3617
                                    currentControl.IsNew = true;
3618
                                    ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3619

  
3620
                                    polygonControl.PointSet.Add(CanvasDrawingMouseDownPoint);
3621
                                    polygonControl.PointSet.Add(CanvasDrawingMouseDownPoint);
3595 3622

  
3596
                                        polygonControl.PointSet.Add(CanvasDrawingMouseDownPoint);
3597
                                        polygonControl.PointSet.Add(CanvasDrawingMouseDownPoint);
3598
                                    
3599 3623
                                    //}
3600 3624
                                }
3601 3625
                            }
3602 3626
                        }
3603 3627
                        break;
3628

  
3604 3629
                    case ControlType.ImgControl:
3605 3630
                        {
3606 3631
                            if (e.LeftButton == MouseButtonState.Pressed)
3607 3632
                            {
3608 3633
                                //if (IsDrawingEnable(canvasZoomPanningMouseDownPoint))
3609 3634
                                //{
3610
                                    if (currentControl is ImgControl)
3635
                                if (currentControl is ImgControl)
3636
                                {
3637
                                    //20180906 LJY TEST IsRotationDrawingEnable
3638
                                    if (IsGetoutpoint((currentControl as ImgControl).PointSet.Where(data => IsRotationDrawingEnable(data) == true).FirstOrDefault()))
3611 3639
                                    {
3612
                                        //20180906 LJY TEST IsRotationDrawingEnable
3613
                                        if (IsGetoutpoint((currentControl as ImgControl).PointSet.Where(data => IsRotationDrawingEnable(data) == true).FirstOrDefault()))
3614
                                        {
3615
                                            return;
3616
                                        }
3617

  
3618
                                        CreateCommand.Instance.Execute(currentControl);
3619
                                        controlType = ControlType.ImgControl;
3620
                                        currentControl = null;
3640
                                        return;
3621 3641
                                    }
3622
                                    else
3642

  
3643
                                    CreateCommand.Instance.Execute(currentControl);
3644
                                    controlType = ControlType.ImgControl;
3645
                                    currentControl = null;
3646
                                }
3647
                                else
3648
                                {
3649
                                    string extension = System.IO.Path.GetExtension(filename).ToUpper();
3650
                                    if (extension == ".PNG" || extension == ".JPEG" || extension == ".GIF" || extension == ".BMP" || extension == ".JPG" || extension == ".SVG")
3623 3651
                                    {
3624
                                        
3625
                                        string extension = System.IO.Path.GetExtension(filename).ToUpper();
3626
                                        if (extension == ".PNG" || extension == ".JPEG" || extension == ".GIF" || extension == ".BMP" || extension == ".JPG" || extension == ".SVG")
3652
                                        Image img = new Image();
3653
                                        if (filename.Contains(".svg"))
3627 3654
                                        {
3628
                                            Image img = new Image();
3629
                                            if (filename.Contains(".svg"))
3655
                                            byte[] imageData = null;
3656
                                            DrawingImage image = null;
3657
                                            using (System.Net.WebClient web = new System.Net.WebClient())
3630 3658
                                            {
3631
                                                byte[] imageData = null;
3632
                                                DrawingImage image = null;
3633
                                                using (System.Net.WebClient web = new System.Net.WebClient())
3634
                                                {
3635
                                                    imageData = web.DownloadData(new Uri(filename));
3636
                                                    System.IO.Stream stream = new System.IO.MemoryStream(imageData);
3637
                                                    image = SvgReader.Load(stream);
3638
                                                }
3639
                                                img.Source = image;
3640
                                            }
3641
                                            else
3642
                                            {
3643
                                                img.Source = new BitmapImage(new Uri(filename));
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

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