프로젝트

일반

사용자정보

개정판 f959ea6f

IDf959ea6f4dbbae88023cf0906fa7a1c05ae7f117
상위 eb4e5fba
하위 6b518442

백흠경이(가) 5년 이상 전에 추가함

issue #923: rename and fix InkControl_Convert

Change-Id: Iec4f34a4743f33987c05ea42674495491afa1166

차이점 보기:

KCOM/Views/MainMenu.xaml.cs
505 505
            Logger.sendCheckLog("pageNavigator_PageChanging_UndoDataListClear", 1);
506 506
            ViewerDataModel.Instance.UndoDataList.Clear();
507 507

  
508
            InkControl_Convert();
508
            ConvertInkControlToPolygon();
509 509

  
510 510
            SelectionSet.Instance.UnSelect(this);
511 511
            UpdateMyMarkupList();
......
2043 2043
                set_option.Value = double.Parse(set_option.ContentText);
2044 2044
            }
2045 2045

  
2046
            InkControl_Convert();
2046
            ConvertInkControlToPolygon();
2047 2047

  
2048 2048
            ///TODO:
2049 2049
            var text_item = ViewerDataModel.Instance.MarkupControls_USER.Where(data =>
......
5063 5063
            }
5064 5064
        }
5065 5065

  
5066
        public void InkControl_Convert()
5066
        /// <summary>
5067
        /// convert inkcontrol to polygoncontrol
5068
        /// </summary>
5069
        public void ConvertInkControlToPolygon()
5067 5070
        {
5068
            Logger.sendCheckLog("pageNavigator_PageChanging_InkControl_Convert", 1);
5071
            Logger.sendCheckLog("pageNavigator_PageChanging_ConvertInkControlToPolygon", 1);
5069 5072
            if (inkBoard.Strokes.Count > 0)
5070 5073
            {
5071 5074
                inkBoard.Strokes.ToList().ForEach(stroke =>
5072 5075
                {
5073
                    List<Stroke> removingStroke = new List<Stroke>();
5074
                    StrokeCollection stC = new StrokeCollection();
5075

  
5076
                    removingStroke.Add(stroke);
5077

  
5078 5076
                    InkToPath ip = new InkToPath();
5077

  
5079 5078
                    List<Point> inkPointSet = new List<Point>();
5080
                    PolygonControl pc = null;
5081
                    pc = new PolygonControl()
5079
                    inkPointSet.AddRange(ip.GetPointsFrom(stroke));
5080

  
5081
                    PolygonControl pc = new PolygonControl()
5082 5082
                    {
5083 5083
                        Angle = 0,
5084
                        PointSet = new List<Point>(),
5084
                        PointSet = inkPointSet,
5085 5085
                        ControlType = ControlType.Ink
5086 5086
                    };
5087
                    foreach (var item in removingStroke)
5088
                    {
5089
                        inkPointSet.AddRange(ip.StrokeGetPointsPlus(item));
5090
                        inkBoard.Strokes.Remove(item);
5091
                    }
5092
                    if (inkPointSet.Count != 0)
5093
                    {
5094
                        //강인구 추가(PenControl Undo Redo 추가)
5095
                        UndoData = new Undo_data()
5096
                        {
5097
                            IsUndo = false,
5098
                            Event = Event_Type.Create,
5099
                            EventTime = DateTime.Now,
5100
                            Markup_List = new List<Multi_Undo_data>()
5101
                        };
5087
                    pc.StartPoint = inkPointSet[0];
5088
                    pc.EndPoint = inkPointSet[inkPointSet.Count - 1];
5089
                    pc.LineSize = 3;
5090
                    pc.CommentID = Commons.shortGuid();
5091
                    pc.StrokeColor = new SolidColorBrush(Colors.Red);
5102 5092

  
5103
                        pc.StartPoint = inkPointSet[0];
5104
                        pc.EndPoint = inkPointSet[inkPointSet.Count - 1];
5105
                        pc.PointSet = inkPointSet;
5106
                        pc.LineSize = 3;
5107
                        pc.CommentID = Commons.shortGuid();
5108
                        pc.StrokeColor = new SolidColorBrush(Colors.Red);
5093
                    if (pc.PointSet.Count > 0)
5094
                    {
5095
                        CreateCommand.Instance.Execute(pc);
5109 5096
                        ViewerDataModel.Instance.MarkupControls_USER.Add(pc);
5110
                        ///pc.SetPolyPath();
5111

  
5112
                        ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
5113
                        {
5114
                            ViewerDataModel.Instance.UndoDataList.Remove(i);
5115
                        });
5116
                        multi_Undo_Data.Markup = pc as CommentUserInfo;
5117
                        UndoData.Markup_List.Add(multi_Undo_Data);
5118
                        ViewerDataModel.Instance.UndoDataList.Add(UndoData);
5119 5097
                    }
5120 5098
                });
5099
                inkBoard.Strokes.Clear();
5121 5100
            }
5122 5101
        }
5123 5102

  

내보내기 Unified diff

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