프로젝트

일반

사용자정보

개정판 e54660e8

IDe54660e86b6096cec9d1501f1a75e9a398e96ef9
상위 469b2bbf
하위 9b7cda70

KangIngu 이(가) 6년 이상 전에 추가함

TextControl 우클릭 초기화 하는 부분 변경

차이점 보기:

KCOM/Views/MainMenu.xaml.cs
320 320
            {
321 321
                this.pageNavigator.PageChanging += pageNavigator_PageChanging;
322 322
                imageViewer_Compare = new Image();
323
                
323

  
324 324
                layerControl.ProjectNo = App.ViewInfo.ProjectNO;
325 325
                ViewerDataModel.Instance.Capture_Opacity = 0;
326 326

  
......
488 488

  
489 489
            ViewerDataModel.Instance.PageNumber = BalancePoint;
490 490

  
491
            
491

  
492 492
            var uri = String.Format(Properties.Settings.Default.mainServerImageWebPath, _ViewInfo.ProjectNO, (Convert.ToInt32(_ViewInfo.DocumentItemID) / 100).ToString(), _ViewInfo.DocumentItemID, e.PageNumber);
493 493

  
494 494
            var defaultBitmapImage = new BitmapImage(new Uri(uri));
......
1059 1059
            //}
1060 1060
            if ((mouseButtonDown == MouseButton.Middle) || (mouseButtonDown == MouseButton.Right))
1061 1061
            {
1062
                SetCursor();
1062 1063
                Point currentCanvasDrawingMouseMovePoint = e.GetPosition(drawingRotateCanvas);
1063 1064
                Point currentCanvasZoomPanningMouseMovePoint = e.GetPosition(zoomAndPanCanvas);
1064 1065

  
......
1189 1190
                                            control.TopRightPoint = new Point(setpoint.X, control.TopRightPoint.Y);
1190 1191
                                            control.EndPoint = new Point(setpoint.X, setpoint.Y);
1191 1192
                                        }
1192
                                        
1193

  
1193 1194
                                        control.PointSet = new List<Point>
1194 1195
                                        {
1195 1196
                                            control.StartPoint,
......
1272 1273
                                            ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, false);
1273 1274
                                        }
1274 1275

  
1275
                                       control.PointSet = new List<Point>
1276
                                        control.PointSet = new List<Point>
1276 1277
                                        {
1277 1278
                                            control.StartPoint,
1278 1279
                                            control.EndPoint,
......
1451 1452
                                    if (ViewerDataModel.Instance.checkAxis || ViewerDataModel.Instance.IsPressShift)
1452 1453
                                    {
1453 1454
                                        //var AngleValue = MathSet.returnAngleString(control.StartPoint, ref tempPoint, true);
1454
                                        ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.PointSet[control.PointSet.Count-2], ref tempPoint, true);
1455
                                        ViewerDataModel.Instance.AngleValue = MathSet.returnAngleString(control.PointSet[control.PointSet.Count - 2], ref tempPoint, true);
1455 1456
                                        control.PointSet[control.PointSet.Count - 1] = tempPoint;
1456 1457
                                        //control.EndPoint = tempPoint;
1457 1458
                                    }
......
1931 1932
                            break;
1932 1933
                        case ControlType.PolygonControl:
1933 1934
                            {
1934
                                
1935

  
1935 1936
                                var control = currentControl as PolygonControl;
1936 1937

  
1937 1938
                                if (control != null)
......
2431 2432
            //선택 중
2432 2433
            else if (mouseHandlingMode == MouseHandlingMode.Selecting)
2433 2434
            {
2434
                
2435

  
2435 2436
                dragSelectionBorder.Visibility = Visibility.Visible;
2436 2437
            }
2437 2438
            else
......
2486 2487
                dragCaptureBorder.Height = height;
2487 2488
            }
2488 2489
            //선택 중
2489
            else if(mouseHandlingMode == MouseHandlingMode.Selecting)
2490
            else if (mouseHandlingMode == MouseHandlingMode.Selecting)
2490 2491
            {
2491 2492
                Canvas.SetLeft(dragSelectionBorder, x);
2492 2493
                Canvas.SetTop(dragSelectionBorder, y);
......
2589 2590
            var text_item = ViewerDataModel.Instance.MarkupControls_USER.Where(data =>
2590 2591
            (data as TextControl) != null && (data as TextControl).Text == "" || (data as ArrowTextControl) != null && (data as ArrowTextControl).ArrowText == "").FirstOrDefault();
2591 2592

  
2592
            if(text_item != null && (currentControl as ArrowTextControl) == null)
2593
            if (text_item != null && (currentControl as ArrowTextControl) == null)
2593 2594
            {
2594 2595
                ViewerDataModel.Instance.MarkupControls_USER.Remove(text_item);
2595 2596
            }
......
2604 2605

  
2605 2606
            mouseButtonDown = e.ChangedButton;
2606 2607
            /// complete drawing text control when user click mouse right button - 2018.05.14 added by humkyung
2607
            if ((mouseButtonDown == MouseButton.Right) && (currentControl != null))
2608

  
2609
            if (currentControl == null)
2610
            //if ((mouseButtonDown == MouseButton.Right) && (currentControl != null))
2608 2611
            {
2609 2612
                var text_item_ = ViewerDataModel.Instance.MarkupControls_USER.Where(data => (data as TextControl) != null && (data as TextControl).Base_TextBox.Visibility == Visibility.Visible).FirstOrDefault();
2610 2613
                if (text_item_ != null)
......
2613 2616
                    (text_item_ as TextControl).Base_TextBox.Visibility = Visibility.Collapsed;
2614 2617
                    (text_item_ as TextControl).IsEditing = false;
2615 2618
                    (text_item_ as TextControl).EnableEditing = false;
2616
                    currentControl = null;
2619
                    //currentControl = null;
2617 2620
                }
2618 2621

  
2619 2622
                var Arrowtext_item_ = ViewerDataModel.Instance.MarkupControls_USER.Where(data => (data as ArrowTextControl) != null && (data as ArrowTextControl).IsEditingMode == true).FirstOrDefault();
......
2621 2624
                {
2622 2625
                    (Arrowtext_item_ as ArrowTextControl).IsEditingMode = false;
2623 2626
                    (Arrowtext_item_ as ArrowTextControl).Base_TextBox.Focusable = false;
2624
                    currentControl = null;
2627
                    //currentControl = null;
2625 2628
                }
2626 2629
            }
2627 2630

  
......
2636 2639
            {
2637 2640
                (e.OriginalSource as System.Windows.Controls.Image).Focus();
2638 2641
            }
2639
            
2642

  
2640 2643
            if (mouseButtonDown == MouseButton.Left)
2641 2644
            {
2642 2645
                canvasDrawingMouseDownPoint = e.GetPosition(drawingRotateCanvas);
......
2806 2809
                            }
2807 2810
                            ViewerDataModel.Instance.TextSize = (control as TextControl).TextSize;
2808 2811
                            ViewerDataModel.Instance.checkHighlight = (control as TextControl).IsHighLight;
2809
                            
2812

  
2810 2813
                        }
2811 2814
                        else if ((control as ArrowTextControl) != null)
2812 2815
                        {
......
2880 2883
                    //Control_Init(control);
2881 2884

  
2882 2885

  
2883
                    
2886

  
2884 2887

  
2885 2888

  
2886 2889
                    //강인구 폰트 변경 보류
......
3595 3598

  
3596 3599
                                    CreateControl();
3597 3600

  
3598
                                        //currentControl = null;
3601
                                    currentControl = null;
3599 3602
                                }
3600 3603
                            }
3601 3604
                        }
......
3625 3628
                                    (currentControl as TextControl).IsHighLight = ViewerDataModel.Instance.checkHighShape;
3626 3629
                                    CreateControl();
3627 3630

  
3628
                                    //currentControl = null;
3631
                                    currentControl = null;
3629 3632
                                }
3630 3633
                            }
3631 3634
                        }
......
3655 3658
                                    (currentControl as TextControl).IsHighLight = ViewerDataModel.Instance.checkHighShape;
3656 3659

  
3657 3660
                                    CreateControl();
3658
                                    //currentControl = null;
3661
                                    currentControl = null;
3659 3662
                                }
3660 3663
                            }
3661 3664
                        }
......
4174 4177
                e.Handled = true;
4175 4178
            }
4176 4179
        }
4177
        
4180

  
4178 4181
        private void RemoveLineStroke(Point P)
4179 4182
        {
4180 4183
            var control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.IsMouseOver).FirstOrDefault();
......
4203 4206
                    ViewerDataModel.Instance.UndoDataList.Remove(i);
4204 4207
                });
4205 4208
                ViewerDataModel.Instance.UndoDataList.Add(UndoData);
4206
                
4209

  
4207 4210
            }
4208 4211
        }
4209 4212

  
......
4548 4551
                            layerControl.markupParse(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
4549 4552
                        });
4550 4553
                    }
4551
                    
4554

  
4552 4555
                    //강인구 추가
4553 4556
                    zoomAndPanControl2.ZoomTo(new Rect
4554 4557
                    {
......
5301 5304
                            {
5302 5305
                                (item.Markup as IDashControl).DashSize = redo.DashSize;
5303 5306
                            }
5304
                            else if(redo.Interval != 0 && item.Markup as LineControl != null)
5307
                            else if (redo.Interval != 0 && item.Markup as LineControl != null)
5305 5308
                            {
5306 5309
                                (item.Markup as LineControl).Interval = redo.Interval;
5307 5310
                            }
......
5442 5445
        /// <param name="EndP"></param>
5443 5446
        /// <returns></returns>
5444 5447
        /// <history>humkyung 2018.05.11 apply axis lock</history>
5445
        private List<Point> GetRegularTrianglePoints(Point StartP, Point EndP, bool bCheckAxis=false)
5448
        private List<Point> GetRegularTrianglePoints(Point StartP, Point EndP, bool bCheckAxis = false)
5446 5449
        {
5447 5450
            List<Point> res = new List<Point>();
5448 5451

  
5449 5452
            double dx = EndP.X - StartP.X;
5450 5453
            double dy = EndP.Y - StartP.Y;
5451 5454
            double length = Math.Sqrt(dx * dx + dy * dy);
5452
            double baseLength = length * Math.Tan(30.0* Math.PI / 180.0);
5455
            double baseLength = length * Math.Tan(30.0 * Math.PI / 180.0);
5453 5456
            dx /= length;
5454 5457
            dy /= length;
5455 5458
            double tmp = dx;

내보내기 Unified diff

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