프로젝트

일반

사용자정보

개정판 684ef11c

ID684ef11c766d313d568ea0db90bdb1b2ce708613
상위 a74e3cbc
하위 022d64c4

이지연이(가) 5년 이상 전에 추가함

issue #719 AutoCAD 저장 작업 중

Change-Id: I46dfcaa8fb3b15907afe75a1e17ae643bef64f3f

차이점 보기:

KCOM/Views/MainMenu.xaml.cs
37 37
using Svg2Xaml;
38 38
using System.Runtime.InteropServices;
39 39
using System.Windows.Media.Effects;
40
using MarkupToPDF.Controls.Cad;
40 41

  
41 42
namespace KCOM.Views
42 43
{
......
1311 1312
                        (control as ArrowTextControl).BackInnerColor = new SolidColorBrush(Color.FromArgb(Convert.ToByte(255 * 0.6), Colors.White.R, Colors.White.G, Colors.White.B));
1312 1313
                    }
1313 1314
                    break;
1315
                case "InsideWhiteControl":
1316
                    {
1317
                        (control as InsideWhiteControl).StrokeColor = Brushes.White;
1318
                    }
1319
                    break;
1320
                case "OverlapWhiteControl":
1321
                    {
1322
                        (control as OverlapWhiteControl).StrokeColor = Brushes.White;
1323
                    }
1324
                    break;
1325
                case "ClipWhiteControl":
1326
                    {
1327
                        (control as ClipWhiteControl).StrokeColor = Brushes.White;
1328
                    }
1329
                    break;
1330
                case "CoordinateControl":
1331
                    {
1332
                        (control as CoordinateControl).StrokeColor = Brushes.Black;
1333
                    }
1334
                    break;
1314 1335
            }
1315 1336
        }
1316 1337
        #endregion
......
1624 1645

  
1625 1646
                    switch (controlType)
1626 1647
                    {
1648
                        case (ControlType.Coordinate):
1649
                            {
1650
                                var control = currentControl as CoordinateControl;
1651

  
1652
                                if (control != null)
1653
                                {
1654
                                    if (move.mousemode == MouseMode.Drawing)
1655
                                    {
1656
                                        //move.control_Move(ControlList, true, moveX, moveY);
1657
                                    }
1658
                                    else
1659
                                    {
1660
                                        control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y);
1661
                                        control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y);
1662
                                        control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y);
1663
                                        control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y);
1664

  
1665

  
1666
                                        if (ViewerDataModel.Instance.IsPressShift)
1667
                                        {
1668
                                            Point setpoint = GetSquareEndPoint(control.StartPoint, control.EndPoint);
1669
                                            control.LeftBottomPoint = new Point(control.LeftBottomPoint.X, setpoint.Y);
1670
                                            control.TopRightPoint = new Point(setpoint.X, control.TopRightPoint.Y);
1671
                                            control.EndPoint = new Point(setpoint.X, setpoint.Y);
1672
                                        }
1673

  
1674
                                        control.PointSet = new List<Point>
1675
                                        {
1676
                                            control.StartPoint,
1677
                                            control.LeftBottomPoint,
1678
                                            control.EndPoint,
1679
                                            control.TopRightPoint,
1680
                                        };
1681
                                        control.updateControl();
1682
                                    }
1683

  
1684
                                    //강인구 추가
1685
                                    control.ControlType = controlType;
1686
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1687
                                    control.Paint = ViewerDataModel.Instance.paintSet;
1688
                                    //  control.Paint = PaintSet.Fill;
1689
                                }
1690
                            }
1691
                            break;
1692
                        case (ControlType.InsideWhite):
1693
                            {
1694
                                var control = currentControl as InsideWhiteControl;
1695

  
1696
                                if (control != null)
1697
                                {
1698
                                    if (move.mousemode == MouseMode.Drawing)
1699
                                    {
1700
                                        //move.control_Move(ControlList, true, moveX, moveY);
1701
                                    }
1702
                                    else
1703
                                    {
1704
                                        control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y);
1705
                                        control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y);
1706
                                        control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y);
1707
                                        control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y);
1708

  
1709

  
1710
                                        if (ViewerDataModel.Instance.IsPressShift)
1711
                                        {
1712
                                            Point setpoint = GetSquareEndPoint(control.StartPoint, control.EndPoint);
1713
                                            control.LeftBottomPoint = new Point(control.LeftBottomPoint.X, setpoint.Y);
1714
                                            control.TopRightPoint = new Point(setpoint.X, control.TopRightPoint.Y);
1715
                                            control.EndPoint = new Point(setpoint.X, setpoint.Y);
1716
                                        }
1717

  
1718
                                        control.PointSet = new List<Point>
1719
                                        {
1720
                                            control.StartPoint,
1721
                                            control.LeftBottomPoint,
1722
                                            control.EndPoint,
1723
                                            control.TopRightPoint,
1724
                                        };
1725
                                        control.updateControl();
1726
                                    }
1727

  
1728
                                    //강인구 추가
1729
                                    control.ControlType = controlType;
1730
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1731
                                    control.Paint = ViewerDataModel.Instance.paintSet;
1732
                                    control.Paint = PaintSet.Fill;
1733
                                }
1734
                            }
1735
                            break;
1736
                        case (ControlType.OverlapWhite):
1737
                            {
1738
                                var control = currentControl as OverlapWhiteControl;
1739

  
1740
                                if (control != null)
1741
                                {
1742
                                    if (move.mousemode == MouseMode.Drawing)
1743
                                    {
1744
                                        //move.control_Move(ControlList, true, moveX, moveY);
1745
                                    }
1746
                                    else
1747
                                    {
1748
                                        control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y);
1749
                                        control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y);
1750
                                        control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y);
1751
                                        control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y);
1752

  
1753

  
1754
                                        if (ViewerDataModel.Instance.IsPressShift)
1755
                                        {
1756
                                            Point setpoint = GetSquareEndPoint(control.StartPoint, control.EndPoint);
1757
                                            control.LeftBottomPoint = new Point(control.LeftBottomPoint.X, setpoint.Y);
1758
                                            control.TopRightPoint = new Point(setpoint.X, control.TopRightPoint.Y);
1759
                                            control.EndPoint = new Point(setpoint.X, setpoint.Y);
1760
                                        }
1761

  
1762
                                        control.PointSet = new List<Point>
1763
                                        {
1764
                                            control.StartPoint,
1765
                                            control.LeftBottomPoint,
1766
                                            control.EndPoint,
1767
                                            control.TopRightPoint,
1768
                                        };
1769
                                        control.updateControl();
1770
                                    }
1771

  
1772
                                    //강인구 추가
1773
                                    control.ControlType = controlType;
1774
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1775
                                    control.Paint = ViewerDataModel.Instance.paintSet;
1776
                                    control.Paint = PaintSet.Fill;
1777
                                }
1778
                            }
1779
                            break;
1780
                        case (ControlType.ClipWhite):
1781
                            {
1782
                                var control = currentControl as ClipWhiteControl;
1783

  
1784
                                if (control != null)
1785
                                {
1786
                                    if (move.mousemode == MouseMode.Drawing)
1787
                                    {
1788
                                        //move.control_Move(ControlList, true, moveX, moveY);
1789
                                    }
1790
                                    else
1791
                                    {
1792
                                        control.StartPoint = new Point(canvasDrawingMouseDownPoint.X, canvasDrawingMouseDownPoint.Y);
1793
                                        control.LeftBottomPoint = new Point(canvasDrawingMouseDownPoint.X, currentCanvasDrawingMouseMovePoint.Y);
1794
                                        control.TopRightPoint = new Point(currentCanvasDrawingMouseMovePoint.X, canvasDrawingMouseDownPoint.Y);
1795
                                        control.EndPoint = new Point(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y);
1796

  
1797

  
1798
                                        if (ViewerDataModel.Instance.IsPressShift)
1799
                                        {
1800
                                            Point setpoint = GetSquareEndPoint(control.StartPoint, control.EndPoint);
1801
                                            control.LeftBottomPoint = new Point(control.LeftBottomPoint.X, setpoint.Y);
1802
                                            control.TopRightPoint = new Point(setpoint.X, control.TopRightPoint.Y);
1803
                                            control.EndPoint = new Point(setpoint.X, setpoint.Y);
1804
                                        }
1805

  
1806
                                        control.PointSet = new List<Point>
1807
                                        {
1808
                                            control.StartPoint,
1809
                                            control.LeftBottomPoint,
1810
                                            control.EndPoint,
1811
                                            control.TopRightPoint,
1812
                                        };
1813
                                        control.updateControl();
1814
                                    }
1815

  
1816
                                    //강인구 추가
1817
                                    control.ControlType = controlType;
1818
                                    control.DashSize = ViewerDataModel.Instance.DashSize;
1819
                                    control.Paint = ViewerDataModel.Instance.paintSet;
1820
                                    control.Paint = PaintSet.Fill;
1821
                                }
1822
                            }
1823
                            break;
1627 1824
                        case ControlType.Rectangle:
1628 1825
                            {
1629 1826
                                var control = currentControl as RectangleControl;
......
3652 3849

  
3653 3850
                switch (controlType)
3654 3851
                {
3852
                    case ControlType.Coordinate:
3853
                        {
3854
                            if (mouseButtonDown == MouseButton.Left)
3855
                            {
3856
                                if (currentControl is CoordinateControl)
3857
                                {
3858
                                    if (IsGetoutpoint((currentControl as CoordinateControl).PointSet.Where(data => IsRotationDrawingEnable(data) == true).FirstOrDefault()))
3859
                                    {
3860
                                        return;
3861
                                    }
3862

  
3863
                                    CreateControl();
3864

  
3865
                                    (currentControl as CoordinateControl).ApplyOverViewData();
3866
                                    currentControl = null;
3867
                                    this.cursor = Cursors.Arrow;
3868
                                }
3869
                                else
3870
                                {
3871
                                    this.ParentOfType<MainWindow>().dzTopMenu._SaveEvent(null, null);
3872
                                    if (ViewerDataModel.Instance.MarkupList_USER.Where(d => d.PageNumber == Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.pageNavigator.CurrentPage.PageNumber
3873
                                     && d.Data_Type == Convert.ToInt32(MarkupToPDF.Controls.Common.ControlType.Coordinate)).Count() > 0)
3874
                                    {
3875
                                        currentControl = null;
3876
                                        this.cursor = Cursors.Arrow;
3877
                                        Common.ViewerDataModel.Instance.SystemMain.DialogMessage_Alert("이미 해당 페이지의 도면 영역을 설정하셨습니다.", "Notice");
3878
                                        return;
3879
                                    }
3880
                                    else
3881
                                    {
3882
                                        currentControl = new CoordinateControl
3883
                                        {
3884
                                            Background = new SolidColorBrush(Colors.Black),
3885
                                            ControlType = ControlType.Coordinate
3886
                                        };
3887

  
3888
                                        currentControl.CommentID = Save.shortGuid();
3889
                                        currentControl.MarkupInfoID = App.Custom_ViewInfoId;
3890
                                        currentControl.IsNew = true;
3891

  
3892
                                        ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3893

  
3894
                                        currentControl.SetValue(Canvas.ZIndexProperty, 3);
3895
                                    }
3896
                                }
3897
                            }
3898
                        }
3899
                        break;
3900
                    case ControlType.InsideWhite:
3901
                        {
3902
                            if (mouseButtonDown == MouseButton.Left)
3903
                            {
3904
                                if (currentControl is InsideWhiteControl)
3905
                                {
3906
                                    if (IsGetoutpoint((currentControl as InsideWhiteControl).PointSet.Where(data => IsRotationDrawingEnable(data) == true).FirstOrDefault()))
3907
                                    {
3908
                                        return;
3909
                                    }
3910

  
3911
                                    CreateControl();
3912

  
3913
                                    (currentControl as InsideWhiteControl).ApplyOverViewData();
3914
                                    currentControl = null;
3915
                                    this.cursor = Cursors.Arrow;
3916
                                }
3917
                                else
3918
                                {
3919
                                    currentControl = new InsideWhiteControl
3920
                                    {
3921
                                        Background = new SolidColorBrush(Colors.Black),
3922
                                        ControlType = ControlType.InsideWhite
3923
                                    };
3924

  
3925
                                    currentControl.CommentID = Save.shortGuid();
3926
                                    currentControl.MarkupInfoID = App.Custom_ViewInfoId;
3927
                                    currentControl.IsNew = true;
3928
                                    ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3929

  
3930
                                    currentControl.SetValue(Canvas.ZIndexProperty, 3);
3931
                                }
3932
                            }
3933
                        }
3934
                        break;
3935
                    case ControlType.OverlapWhite:
3936
                        {
3937
                            if (mouseButtonDown == MouseButton.Left)
3938
                            {
3939
                                if (currentControl is OverlapWhiteControl)
3940
                                {
3941
                                    if (IsGetoutpoint((currentControl as OverlapWhiteControl).PointSet.Where(data => IsRotationDrawingEnable(data) == true).FirstOrDefault()))
3942
                                    {
3943
                                        return;
3944
                                    }
3945

  
3946
                                    CreateControl();
3947

  
3948
                                    (currentControl as OverlapWhiteControl).ApplyOverViewData();
3949
                                    currentControl = null;
3950
                                    this.cursor = Cursors.Arrow;
3951
                                }
3952
                                else
3953
                                {
3954
                                    currentControl = new OverlapWhiteControl
3955
                                    {
3956
                                        Background = new SolidColorBrush(Colors.Black),
3957
                                        ControlType = ControlType.OverlapWhite
3958
                                    };
3959

  
3960
                                    currentControl.CommentID = Save.shortGuid();
3961
                                    currentControl.MarkupInfoID = App.Custom_ViewInfoId;
3962
                                    currentControl.IsNew = true;
3963
                                    ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3964

  
3965
                                    currentControl.SetValue(Canvas.ZIndexProperty, 3);
3966
                                }
3967
                            }
3968
                        }
3969
                        break;
3970
                    case ControlType.ClipWhite:
3971
                        {
3972
                            if (mouseButtonDown == MouseButton.Left)
3973
                            {
3974
                                if (currentControl is ClipWhiteControl)
3975
                                {
3976
                                    if (IsGetoutpoint((currentControl as ClipWhiteControl).PointSet.Where(data => IsRotationDrawingEnable(data) == true).FirstOrDefault()))
3977
                                    {
3978
                                        return;
3979
                                    }
3980

  
3981
                                    CreateControl();
3982

  
3983
                                    (currentControl as ClipWhiteControl).ApplyOverViewData();
3984
                                    currentControl = null;
3985
                                    this.cursor = Cursors.Arrow;
3986
                                }
3987
                                else
3988
                                {
3989
                                    currentControl = new ClipWhiteControl
3990
                                    {
3991
                                        Background = new SolidColorBrush(Colors.Black),
3992
                                        ControlType = ControlType.ClipWhite
3993
                                    };
3994

  
3995
                                    currentControl.CommentID = Save.shortGuid();
3996
                                    currentControl.MarkupInfoID = App.Custom_ViewInfoId;
3997
                                    currentControl.IsNew = true;
3998
                                    ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
3999

  
4000
                                    currentControl.SetValue(Canvas.ZIndexProperty, 3);
4001
                                }
4002
                            }
4003
                        }
4004
                        break;
3655 4005
                    case ControlType.Rectangle:
3656 4006
                        {
3657 4007
                            if (mouseButtonDown == MouseButton.Left)

내보내기 Unified diff

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