프로젝트

일반

사용자정보

개정판 168f8027

ID168f8027284111c388adaa801bed3e6661503997
상위 c520650f
하위 d5e3aa15

김태성이(가) 약 5년 전에 추가함

issue #812 상단 Angle 컨트롤에 아무것도 안나오는 문제 및 빌드 오류 수정

Change-Id: Ic2b9da31e24cba6185dd5765a1ce2947fa1ebf55

차이점 보기:

KCOM/Common/ViewerDataModel.cs
387 387
            }
388 388
        }
389 389

  
390
        public double Angle
391
        {
392
            get
393
            {
394
                return angle;
395
            }
396
            set
397
            {
398
                angle = value;
399
                OnPropertyChanged("Angle");
400
            }
401
        }
402

  
390 403
        private string _HelperContent { get; set; }
391 404
        public string HelperContent
392 405
        {
......
870 883

  
871 884
        public MainWindow SystemMain { get; set; }
872 885

  
873
        public double Angle
874
        {
875
            get
876
            {
877
                return angle;
878
            }
879
            set
880
            {
881
                angle = value;
882
                OnPropertyChanged("Angle");
883
            }
884
        }
885

  
886 886
        private bool _PageBalanceMode { get; set; }
887 887
        public bool PageBalanceMode
888 888
        {
......
1139 1139
            this.DashSize = new DoubleCollection();
1140 1140

  
1141 1141
            this.SaveInterval = KCOM.Properties.Settings.Default.SaveInterval;
1142

  
1142
            this.AngleVisibility = Visibility.Collapsed;
1143 1143
        }
1144 1144
        
1145 1145
        public List<IKCOM.MarkupInfoItem> SelectedmarkupInfoItems { get; set; }
KCOM/Views/MainMenu.xaml
236 236
                                                        Grid.Column="1"
237 237
                                                        Grid.ColumnSpan="2"
238 238
                                                        Margin="10"
239
                                                        AngleValue="{Binding AngleValue, Mode=TwoWay, Source={x:Static common:ViewerDataModel.Instance}}"
239
                                                        AngleValue="{Binding Angle, Mode=TwoWay, StringFormat=\{0:F0\}°, Source={x:Static common:ViewerDataModel.Instance}}"
240 240
                                                        HorizontalAlignment="Right"
241 241
                                                        VerticalAlignment="Top"
242 242
                                                        IsHitTestVisible="False"
243
                                                        Visibility="Collapsed" />
243
                                                        Visibility="{Binding AngleVisibility, Mode=TwoWay, Source={x:Static common:ViewerDataModel.Instance}}" />
244 244
                            </Grid>
245 245
                        </telerik:RadDocumentPane>
246 246
                    </telerik:RadPaneGroup>
KCOM/Views/MainMenu.xaml.cs
1288 1288
                        (currentControl as CloudControl).ArcLength = ViewerDataModel.Instance.ArcLength;
1289 1289
                    }
1290 1290

  
1291

  
1292
                    #region // 모든 컨트롤의 공통기능 제어
1293
                    if (controlType != ControlType.PenControl)
1294
                    {
1295
                        currentControl.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1296
                    }
1297

  
1298

  
1299
                    #endregion
1300

  
1301
                    #region // 각 컨트롤의 특별한 기능을 제어한다.
1302

  
1291 1303
                    switch (controlType)
1292 1304
                    {
1293 1305
                        case (ControlType.Coordinate):
......
1295 1307
                                var control = currentControl as CoordinateControl;
1296 1308
                                if (control != null)
1297 1309
                                {
1298
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1310
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1299 1311
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1300 1312
                                    control.Paint = ViewerDataModel.Instance.paintSet;
1301 1313
                                }
......
1306 1318
                                var control = currentControl as InsideWhiteControl;
1307 1319
                                if (control != null)
1308 1320
                                {
1309
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1321
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1310 1322
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1311 1323
                                    control.Paint = ViewerDataModel.Instance.paintSet;
1312 1324
                                    control.Paint = PaintSet.Fill;
......
1318 1330
                                var control = currentControl as OverlapWhiteControl;
1319 1331
                                if (control != null)
1320 1332
                                {
1321
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1333
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1322 1334
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1323 1335
                                    control.Paint = ViewerDataModel.Instance.paintSet;
1324 1336
                                    control.Paint = PaintSet.Fill;
......
1330 1342
                                var control = currentControl as ClipWhiteControl;
1331 1343
                                if (control != null)
1332 1344
                                {
1333
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1345
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1334 1346
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1335 1347
                                    control.Paint = ViewerDataModel.Instance.paintSet;
1336 1348
                                    control.Paint = PaintSet.Fill;
......
1342 1354
                                var control = currentControl as RectCloudControl;
1343 1355
                                if (control != null)
1344 1356
                                {
1345
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1357
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1346 1358
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1347 1359
                                    control.Paint = ViewerDataModel.Instance.paintSet;
1348 1360
                                }
......
1357 1369
                                var control = currentControl as LineControl;
1358 1370
                                if (control != null)
1359 1371
                                {
1360
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1372
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1361 1373
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1362 1374
                                }
1375

  
1363 1376
                            }
1364 1377
                            break;
1365 1378

  
......
1368 1381
                                var control = currentControl as ArcControl;
1369 1382
                                if (control != null)
1370 1383
                                {
1371
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1384
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1372 1385
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1373 1386
                                }
1374 1387
                            }
......
1379 1392
                                var control = currentControl as ArrowArcControl;
1380 1393
                                if (control != null)
1381 1394
                                {
1382
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1395
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1383 1396
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1384 1397
                                }
1385 1398
                            }
......
1390 1403
                                var control = currentControl as ArrowControl_Multi;
1391 1404
                                if (control != null)
1392 1405
                                {
1393
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1406
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1394 1407
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1395 1408
                                }
1396 1409
                            }
......
1398 1411

  
1399 1412
                        case ControlType.Circle:
1400 1413
                            {
1401
                                if (currentControl != null)
1414
                                var control = currentControl as CircleControl;
1415

  
1416
                                if (control != null)
1402 1417
                                {
1403
                                    currentControl.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1404
                                    (currentControl as CircleControl).DashSize = ViewerDataModel.Instance.DashSize;
1405
                                    (currentControl as CircleControl).Paint = ViewerDataModel.Instance.paintSet;
1418
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1419
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1420
                                    control.Paint = ViewerDataModel.Instance.paintSet;
1406 1421
                                }
1407 1422
                            }
1408 1423
                            break;
......
1412 1427
                                var control = currentControl as CloudControl;
1413 1428
                                if (control != null)
1414 1429
                                {
1415
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1430
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1416 1431
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1417 1432
                                    control.Paint = ViewerDataModel.Instance.paintSet;
1418 1433
                                }
......
1424 1439
                                var control = currentControl as TriControl;
1425 1440
                                if (control != null)
1426 1441
                                {
1427
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1442
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1428 1443
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1429 1444
                                    control.Paint = ViewerDataModel.Instance.paintSet;
1430 1445
                                }
......
1436 1451
                                var control = currentControl as ImgControl;
1437 1452
                                if (control != null)
1438 1453
                                {
1439
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1454
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1440 1455
                                }
1441 1456
                            }
1442 1457
                            break;
......
1446 1461
                                var control = currentControl as DateControl;
1447 1462
                                if (control != null)
1448 1463
                                {
1449
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1464
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1450 1465
                                }
1451 1466
                            }
1452 1467
                            break;
......
1461 1476
                                var control = currentControl as ArrowTextControl;
1462 1477
                                if (control != null)
1463 1478
                                {
1464
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1479
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1465 1480
                                }
1466 1481
                            }
1467 1482
                            break;
......
1471 1486
                                var control = currentControl as PolygonControl;
1472 1487
                                if (control != null)
1473 1488
                                {
1474
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1489
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1475 1490
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1476 1491
                                    control.Paint = ViewerDataModel.Instance.paintSet;
1477 1492
                                }
......
1482 1497
                                var control = currentControl as SignControl;
1483 1498
                                if (control != null)
1484 1499
                                {
1485
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1500
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1486 1501
                                }
1487 1502
                            }
1488 1503
                            break;
......
1491 1506
                                var control = currentControl as SymControl;
1492 1507
                                if (control != null)
1493 1508
                                {
1494
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1509
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1495 1510
                                }
1496 1511
                            }
1497 1512
                            break;
......
1502 1517
                                {
1503 1518
                                    if (control.STAMP != null)
1504 1519
                                    {
1505
                                        control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1520
                                        //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1506 1521
                                    }
1507 1522
                                    else
1508 1523
                                    {
......
1510 1525
                                        this.cursor = new Cursor(MainWindow.CursorChange().StreamSource);
1511 1526
                                        DialogMessage_Alert("Approved Stamp 가 등록되어 있지 않습니다. \n관리자에게 문의하세요.", "안내");
1512 1527
                                    }
1513
                                }                                    
1528
                                }
1514 1529
                            }
1515 1530
                            break;
1516 1531
                        case ControlType.Rectangle:
......
1519 1534
                                var control = currentControl as RectangleControl;
1520 1535
                                if (control != null)
1521 1536
                                {
1522
                                    control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1523
                                    if(control.ControlType == ControlType.Mark) control.Paint = PaintSet.Fill;
1537
                                    //control.OnCreatingMouseMove(currentCanvasDrawingMouseMovePoint, ViewerDataModel.Instance.checkAxis, ViewerDataModel.Instance.IsPressShift);
1538
                                    if (control.ControlType == ControlType.Mark) control.Paint = PaintSet.Fill;
1524 1539
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1525 1540
                                }
1526 1541
                            }
......
1534 1549
                        default:
1535 1550
                            break;
1536 1551
                    }
1552

  
1553
                    #endregion
1554
                    if (ViewerDataModel.Instance.AngleVisibility == Visibility.Visible)
1555
                    {
1556
                        ViewerDataModel.Instance.Angle = currentControl.Angle;
1557
                    }
1537 1558
                }
1538 1559
            }
1539 1560
            else if(mouseHandlingMode == MouseHandlingMode.Drawing && e.LeftButton == MouseButtonState.Pressed)
......
2792 2813

  
2793 2814
                                    CreateCommand.Instance.Execute(currentControl);
2794 2815
                                    currentControl = null;
2795
                                    this.MainAngle.Visibility = Visibility.Collapsed;
2816
                                    ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
2796 2817
                                }
2797 2818
                                else
2798 2819
                                {
......
2807 2828
                                    currentControl.CommentID = Commons.shortGuid();
2808 2829
                                    currentControl.IsNew = true;
2809 2830
                                    ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
2810
                                    this.MainAngle.Visibility = Visibility.Visible;
2831
                                    ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
2811 2832
                                }
2812 2833
                            }
2813 2834
                        }
......
2888 2909
                                    CreateCommand.Instance.Execute(currentControl);
2889 2910

  
2890 2911
                                    currentControl = null;
2891
                                    this.MainAngle.Visibility = Visibility.Collapsed;
2912
                                    ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
2892 2913
                                    return;
2893 2914
                                }
2894 2915

  
2895 2916
                                if (!control.IsCompleted)
2896 2917
                                {
2897 2918
                                    control.PointSet.Add(control.EndPoint);
2898
                                    this.MainAngle.Visibility = Visibility.Visible;
2919
                                    ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
2899 2920
                                }
2900 2921
                            }
2901 2922
                            else
......
2945 2966
                                    CreateCommand.Instance.Execute(currentControl);
2946 2967

  
2947 2968
                                    currentControl = null;
2948
                                    this.MainAngle.Visibility = Visibility.Collapsed;
2969
                                    ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
2949 2970
                                }
2950 2971
                                else
2951 2972
                                {
......
2958 2979
                                    currentControl.MarkupInfoID = App.Custom_ViewInfoId;
2959 2980
                                    currentControl.IsNew = true;
2960 2981
                                    ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
2961
                                    this.MainAngle.Visibility = Visibility.Visible;
2982
                                    ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
2962 2983
                                }
2963 2984
                            }
2964 2985
                            else if (e.RightButton == MouseButtonState.Pressed)
......
2988 3009
                                    CreateCommand.Instance.Execute(currentControl);
2989 3010

  
2990 3011
                                    currentControl = null;
2991
                                    this.MainAngle.Visibility = Visibility.Collapsed;
3012
                                    ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
2992 3013
                                }
2993 3014
                                else
2994 3015
                                {
......
3001 3022
                                    currentControl.MarkupInfoID = App.Custom_ViewInfoId;
3002 3023
                                    currentControl.IsNew = true;
3003 3024
                                    ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3004
                                    this.MainAngle.Visibility = Visibility.Visible;
3025
                                    ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
3005 3026
                                }
3006 3027
                                //}
3007 3028
                            }
......
3048 3069
                                            CreateCommand.Instance.Execute(currentControl);
3049 3070

  
3050 3071
                                            currentControl = null;
3051
                                            this.MainAngle.Visibility = Visibility.Collapsed;
3072
                                            ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
3052 3073
                                        }
3053 3074
                                    }
3054 3075
                                    else
......
3062 3083
                                        currentControl.MarkupInfoID = App.Custom_ViewInfoId;
3063 3084
                                        currentControl.IsNew = true;
3064 3085
                                        ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3065
                                        this.MainAngle.Visibility = Visibility.Visible;
3086
                                        ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
3066 3087
                                    }
3067 3088
                                //}
3068 3089
                            }
......
3381 3402
                                        (currentControl as ArrowTextControl).ApplyTemplate();
3382 3403
                                        (currentControl as ArrowTextControl).Base_TextBox.Focus();
3383 3404
                                        (currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3384
                                        this.MainAngle.Visibility = Visibility.Visible;
3405
                                        ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
3385 3406

  
3386 3407
                                    
3387 3408
                                    //}
......
3407 3428
                                    
3408 3429
                                    currentControl.IsNew = false;
3409 3430
                                    currentControl = null;
3410
                                    this.MainAngle.Visibility = Visibility.Collapsed;
3431
                                    ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
3411 3432
                                }
3412 3433
                                else
3413 3434
                                {
......
3455 3476
                                    (currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false;
3456 3477
                                    currentControl.IsNew = false;
3457 3478
                                    currentControl = null;
3458
                                    this.MainAngle.Visibility = Visibility.Collapsed;
3479
                                    ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
3459 3480
                                }
3460 3481
                                else
3461 3482
                                {
......
3482 3503
                                        (currentControl as ArrowTextControl).Angle -= rotate.Angle;
3483 3504
                                        (currentControl as ArrowTextControl).ApplyTemplate();
3484 3505
                                        (currentControl as ArrowTextControl).Base_TextBox.Focus();
3485
                                        this.MainAngle.Visibility = Visibility.Visible;                                    
3506
                                        ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;                                    
3486 3507
                                    //}
3487 3508
                                }
3488 3509
                            }
......
3504 3525
                                    currentControl.IsNew = false;
3505 3526
                                    currentControl = null;
3506 3527

  
3507
                                    this.MainAngle.Visibility = Visibility.Collapsed;
3528
                                    ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
3508 3529
                                }
3509 3530
                                else
3510 3531
                                {
......
3536 3557
                                        (currentControl as ArrowTextControl).ApplyTemplate();
3537 3558
                                        (currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3538 3559
                                        (currentControl as ArrowTextControl).Base_TextBox.Focus();                                 
3539
                                        this.MainAngle.Visibility = Visibility.Visible;
3560
                                        ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;
3540 3561
                                    
3541 3562
                                    //20180911 LJY
3542 3563
                                        (currentControl as ArrowTextControl).isTrans = true;
......
3562 3583
                                    (currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false;
3563 3584
                                    currentControl.IsNew = false;
3564 3585
                                    currentControl = null;
3565
                                    this.MainAngle.Visibility = Visibility.Collapsed;
3586
                                    ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
3566 3587
                                }
3567 3588
                                else
3568 3589
                                {
......
3588 3609
                                    
3589 3610
                                        (currentControl as ArrowTextControl).ApplyTemplate();
3590 3611
                                        (currentControl as ArrowTextControl).Base_TextBox.Focus();
3591
                                        this.MainAngle.Visibility = Visibility.Visible;                                        
3612
                                        ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;                                        
3592 3613
                                    //}
3593 3614
                                }
3594 3615
                            }
......
3609 3630
                                    (currentControl as ArrowTextControl).Base_TextBox.IsHitTestVisible = false;
3610 3631
                                    currentControl.IsNew = false;
3611 3632
                                    currentControl = null;
3612
                                    this.MainAngle.Visibility = Visibility.Collapsed;
3633
                                    ViewerDataModel.Instance.AngleVisibility = Visibility.Collapsed;
3613 3634
                                }
3614 3635
                                else
3615 3636
                                {
......
3638 3659
                                        (currentControl as ArrowTextControl).SetFontFamily(new FontFamily(this.ParentOfType<MainWindow>().dzTopMenu.comboFontFamily.Text));
3639 3660
                                        (currentControl as ArrowTextControl).ApplyTemplate();
3640 3661
                                        (currentControl as ArrowTextControl).Base_TextBox.Focus();
3641
                                        this.MainAngle.Visibility = Visibility.Visible;  
3662
                                        ViewerDataModel.Instance.AngleVisibility = Visibility.Visible;  
3642 3663
                                    
3643 3664
                                    //20180911 LJY
3644 3665
                                        (currentControl as ArrowTextControl).isTrans = true;
MarkupToPDF/Controls/Common/MathSet.cs
392 392
            return (cross > 0) ? radian * MathSet.Rad2Deg : -(radian * MathSet.Rad2Deg);
393 393
        }
394 394

  
395
        // 사용용도가 불분명함.
395 396
        public static string returnAngleString(Point start, ref Point end, bool PressShift)
396 397
        {
397 398
            double angle = MathSet.getAngle(start.X, start.Y, end.X, end.Y);
......
415 416
            }
416 417
        }
417 418

  
419

  
420
        /// <summary>
421
        /// returnAngleString을 변경하여 수정
422
        /// 상단 컨트롤에 Angle값을 보여주기 위해 수정함.
423
        /// </summary>
424
        /// <param name="start"></param>
425
        /// <param name="end"></param>
426
        /// <param name="PressShift"></param>
427
        /// <returns></returns>
428
        public static double returnAngle(Point start, ref Point end, bool PressShift)
429
        {
430
            double angle = MathSet.getAngle(start.X, start.Y, end.X, end.Y);
431
            double approxAngle = MathSet.getMultipleAngle(UnitAngle, angle);
432

  
433
            if (PressShift)
434
            {
435
                double distance = MathSet.DistanceTo(start, end);
436
                end = MathSet.RotateAbout(start, new Point(start.X + distance, start.Y), approxAngle);
437

  
438
                angle = approxAngle;
439
            }
440

  
441
            return angle;
442
        }
443

  
418 444
        public static Point getRectMiddlePoint(Rect data)
419 445
        {
420 446
            Point startP = new Point(data.X, data.Y);
MarkupToPDF/Controls/Line/ArcControl.cs
305 305
            get { return (double)GetValue(AngleProperty); }
306 306
            set { SetValue(AngleProperty, value); }
307 307
        }
308
        public double Angle
309
        {
310
            get { return (double)GetValue(AngleProperty); }
311
            set
312
            {
313
                if (this.Angle != value)
314
                {
315
                    SetValue(AngleProperty, value);
316
                }
317
            }
318
        }
308

  
309

  
310
        // CommentUserInfo에서 상속받기때문에 제거.
311

  
312
        //public double Angle
313
        //{
314
        //    get { return (double)GetValue(AngleProperty); }
315
        //    set
316
        //    {
317
        //        if (this.Angle != value)
318
        //        {
319
        //            SetValue(AngleProperty, value);
320
        //        }
321
        //    }
322
        //}
323

  
319 324
        public Point EndPoint
320 325
        {
321 326
            get { return (Point)GetValue(EndPointProperty); }
......
536 541
            this.EndPoint = pt;
537 542
            this.MidPoint = new Point(0, 0);
538 543

  
544
            Point tmp = this.EndPoint;
545
            Angle = MathSet.returnAngle(this.StartPoint, ref tmp, true);
546

  
539 547
            if (bAxisLocked || bShiftKeyPressed)
540 548
            {
541
                Point tmp = this.EndPoint;
542
                string angle = MathSet.returnAngleString(this.StartPoint, ref tmp, true);
543 549
                this.EndPoint = tmp;
544 550
            }
545 551

  
MarkupToPDF/Controls/Line/ArrowArcControl.cs
304 304
            get { return (double)GetValue(AngleProperty); }
305 305
            set { SetValue(AngleProperty, value); }
306 306
        }
307
        public double Angle
308
        {
309
            get { return (double)GetValue(AngleProperty); }
310
            set
311
            {
312
                if (this.Angle != value)
313
                {
314
                    SetValue(AngleProperty, value);
315
                }
316
            }
317
        }
307

  
308

  
309
        //public double Angle
310
        //{
311
        //    get { return (double)GetValue(AngleProperty); }
312
        //    set
313
        //    {
314
        //        if (this.Angle != value)
315
        //        {
316
        //            SetValue(AngleProperty, value);
317
        //        }
318
        //    }
319
        //}
320

  
318 321
        public Point EndPoint
319 322
        {
320 323
            get { return (Point)GetValue(EndPointProperty); }
......
480 483
            this.isTransOn = false;
481 484
            this.MidPoint = new Point(0, 0);
482 485
            this.EndPoint = pt;
486
         
487
            Point tmp = this.EndPoint;
488
            Angle = MathSet.returnAngle(this.StartPoint, ref tmp, true);
489

  
483 490
            if (bAxisLocked || bShiftKeyPressed)
484 491
            {
485
                Point tmp = this.EndPoint;
486
                string angle = MathSet.returnAngleString(this.StartPoint, ref tmp, true);
487 492
                this.EndPoint = tmp;
488 493
            }
489 494

  
MarkupToPDF/Controls/Line/ArrowControl_Multi.cs
361 361
            this.EndPoint = pt;
362 362
            if (this.MiddlePoint == new Point(0, 0))
363 363
            {
364
                Point tmp = this.EndPoint;
365
                Angle = MathSet.returnAngle(this.StartPoint, ref tmp, true);
366

  
364 367
                if (bAxisLocked || bShiftKeyPressed)
365 368
                {
366
                    Point tmp = this.EndPoint;
367
                    string angle = MathSet.returnAngleString(this.StartPoint, ref tmp, true);
368 369
                    this.EndPoint = tmp;
369 370
                }
370 371
            }
371 372
            else
372 373
            {
374
                Point tmp = this.EndPoint;
375
                Angle = MathSet.returnAngle(this.MiddlePoint, ref tmp, true);
376

  
373 377
                if (bAxisLocked || bShiftKeyPressed)
374 378
                {
375
                    Point tmp = this.EndPoint;
376
                    string angle = MathSet.returnAngleString(this.MiddlePoint, ref tmp, true);
379
                
377 380
                    this.EndPoint = tmp;
378 381
                }
379 382
            }
MarkupToPDF/Controls/Line/LineControl.cs
318 318
            get { return (double)GetValue(AngleProperty); }
319 319
            set { SetValue(AngleProperty, value); }
320 320
        }
321
        public double Angle
322
        {
323
            get { return (double)GetValue(AngleProperty); }
324
            set
325
            {
326
                if (this.Angle != value)
327
                {
328
                    SetValue(AngleProperty, value);
329
                }
330
            }
331
        }
321
        //public double Angle
322
        //{
323
        //    get { return (double)GetValue(AngleProperty); }
324
        //    set
325
        //    {
326
        //        if (this.Angle != value)
327
        //        {
328
        //            SetValue(AngleProperty, value);
329
        //        }
330
        //    }
331
        //}
332 332
        public Point EndPoint
333 333
        {
334 334
            get { return (Point)GetValue(EndPointProperty); }
......
507 507
                this.LineStyleSet = LineStyleSet.SingleLine;
508 508

  
509 509
            this.EndPoint = pt;
510
            
510

  
511
            Point tmp = this.EndPoint;
512
            Angle = MathSet.returnAngle(this.StartPoint, ref tmp, true);
513

  
511 514
            if (bAxisLocked || bShiftKeyPressed)
512 515
            {
513
                Point tmp = this.EndPoint;
514
                string angle = MathSet.returnAngleString(this.StartPoint, ref tmp, true);
515 516
                this.EndPoint = tmp;
516 517
            }
517 518

  
MarkupToPDF/Controls/Polygon/CloudControl.cs
447 447
            get { return _fill; }
448 448
            set { _fill = value; }
449 449
        }
450
        public double Angle
451
        {
452
            get { return (double)GetValue(AngleProperty); }
453
            set
454
            {
455
                if (this.Angle != value)
456
                {
457
                    SetValue(AngleProperty, value);
458
                    OnPropertyChanged("Angle");
459
                }
460
            }
461
        }
450
        //public double Angle
451
        //{
452
        //    get { return (double)GetValue(AngleProperty); }
453
        //    set
454
        //    {
455
        //        if (this.Angle != value)
456
        //        {
457
        //            SetValue(AngleProperty, value);
458
        //            OnPropertyChanged("Angle");
459
        //        }
460
        //    }
461
        //}
462 462
        public StylusPointSet PointC
463 463
        {
464 464
            get { return (StylusPointSet)GetValue(StylusPointSetProperty); }
......
824 824
            this.PointSet.RemoveAt(this.PointSet.Count - 1);
825 825

  
826 826
            Point tmp = pt;
827

  
827 828
            if (bAxisLocked || bShiftKeyPressed)
828 829
            {
829
                string angle = MathSet.returnAngleString(this.StartPoint, ref tmp, true);
830
                Angle = MathSet.returnAngle(this.StartPoint, ref tmp, true);
830 831
            }
832

  
831 833
            this.PointSet.Add(tmp);
832 834

  
833 835
            this.SetCloud();
MarkupToPDF/Controls/Polygon/PolygonControl.cs
384 384
            }
385 385
        }
386 386
     
387
        public double Angle
388
        {
389
            get { return (double)GetValue(AngleProperty); }
390
            set
391
            {
392
                if (this.Angle != value)
393
                {
394
                    SetValue(AngleProperty, value);
395
                    OnPropertyChanged("Angle");
396
                }
397
            }
398
        }
387
        //public double Angle
388
        //{
389
        //    get { return (double)GetValue(AngleProperty); }
390
        //    set
391
        //    {
392
        //        if (this.Angle != value)
393
        //        {
394
        //            SetValue(AngleProperty, value);
395
        //            OnPropertyChanged("Angle");
396
        //        }
397
        //    }
398
        //}
399 399

  
400 400
        public Point EndPoint
401 401
        {
......
493 493
            this.PointSet.RemoveAt(this.PointSet.Count - 1);
494 494

  
495 495
            Point tmp = pt;
496

  
496 497
            if (bAxisLocked || bShiftKeyPressed)
497 498
            {
498
                string angle = MathSet.returnAngleString(this.PointSet[this.PointSet.Count - 1], ref tmp, true);
499
                Angle = MathSet.returnAngle(this.PointSet[this.PointSet.Count - 1], ref tmp, true);
499 500
            }
501

  
500 502
            this.PointSet.Add(tmp);
501 503

  
502 504
            this.UpdateControl();
MarkupToPDF/Controls/Text/ArrowTextControl.cs
358 358
        }
359 359

  
360 360

  
361
        public double Angle
362
        {
363
            get { return (double)GetValue(AngleProperty); }
364
            set { SetValue(AngleProperty, value); }
365
        }
361
        //public double Angle
362
        //{
363
        //    get { return (double)GetValue(AngleProperty); }
364
        //    set { SetValue(AngleProperty, value); }
365
        //}
366 366

  
367 367
        public Thickness BorderSize
368 368
        {
......
1605 1605
        {
1606 1606
            this.EndPoint = pt;
1607 1607

  
1608
            Point tempPoint = this.EndPoint;
1609
            Angle = MathSet.returnAngle(this.StartPoint, ref tempPoint, true);
1610

  
1608 1611
            if (bAxisLocked || bShiftKeyPressed)
1609 1612
            {
1610
                Point tempPoint = this.EndPoint;
1611
                string angle = MathSet.returnAngleString(this.StartPoint, ref tempPoint, true);
1612 1613
                this.EndPoint = tempPoint;
1613 1614
            }
1614 1615

  

내보내기 Unified diff

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