프로젝트

일반

사용자정보

개정판 29010418

ID2901041836eed3cf191eeca4c32e2e52ff8deab8
상위 ced47e14
하위 6c8c6f91, f72fe197

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

issue #000: daelim source compare 중

Change-Id: Icba4b84746c71502e895fde47f4c14f82b179230

차이점 보기:

KCOM/Controls/AdornerFinal.xaml.cs
147 147
        /// <param name="member">UIElement 타입으로 BaseLayer에 있는 것들이 들어옵니다.</param>
148 148
        public void SetAdornerMember(MarkupToPDF.Common.CommentUserInfo member)
149 149
        {
150

  
150 151
            switch (member.GetType().Name)
151 152
            {
152 153
                #region 컨트롤 조건
......
159 160
                    //DragThumb.RenderTransformOrigin = new Point(0.5, 0.5);
160 161
                    AngleValue = (member as ImgControl).Angle;
161 162
                    break;
163
                //case "SymControl": //Angle추가 안했음
164
                //    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = MarkupType.Viewbox, ThumbList = new List<Thumb>() });
165
                //    AngleValue = (member as SymControl).Angle;
166
                //    //ViewBoxRotate(member);
167
                //    break;
168
                //case "SymControlN": //Angle추가 안했음
169
                //    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = MarkupType.Viewbox, ThumbList = new List<Thumb>() });
170
                //    AngleValue = (member as SymControlN).Angle;
171
                //    //ViewBoxRotate(member);
172
                //    break;
162 173
                case "PolygonControl": //Angle추가 안했음
163 174
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
164 175
                    break;
......
392 403
                            BorderUpdate();
393 404
                            try
394 405
                            {
395
                                ((TextControl)member).Base_TextBlock.TextDecorations = ((TextControl)member).UnderLine;
406
                                ((TextControl)member).Base_TextBlock.TextDecorations = ((TextControl)member).UnderLine; 
396 407
                            }
397 408
                            catch (Exception)
398 409
                            {
......
482 493
                        textControlWidth = ((currentControl as TextControl).Base_TextBox.ActualWidth);
483 494
                        textControlHeight = ((currentControl as TextControl).Base_TextBox.ActualHeight);
484 495
                    }
485

  
496
                    
486 497
                    if ((currentControl as TextControl).EndPoint.X < minX)
487 498
                    {
488 499
                        minX = (currentControl as TextControl).EndPoint.X;
......
540 551
                    if (rt.Bottom > maxY) maxY = rt.Bottom;
541 552
                }
542 553
                else if ((currentControl as CircleControl) != null)
543
                {
554
                {                    
544 555
                    List<Point> am = (currentControl as IPath).PointSet;
545 556
                    List<double> xSet = am.Select(p => p.X).ToList();
546 557
                    List<double> ySet = am.Select(p => p.Y).ToList();
......
648 659
                };
649 660

  
650 661
                MemberSet.Last().ThumbList.Add(tm);
662

  
651 663
                if ((markT == ControlType.ArcLine && list[i] == (member as ArcControl).MidPoint) || (markT == ControlType.ArcArrow && list[i] == (member as ArrowArcControl).MidPoint))
652 664
                {
653 665
                    tm.Style = (Style)this.LayoutRoot.Resources["ThumbArcControlStyle"];
......
774 786
                        };
775 787
                    }
776 788
                }
777

  
789
                
778 790
                if (member.GetType().Name == "CloudControl")
779 791
                {
780 792
                    if (i == list.Count() - 1)
......
800 812
                        tm.Visibility = System.Windows.Visibility.Collapsed;
801 813
                    }
802 814
                }
803

  
815
                
804 816
                this.ContainerContent.Children.Add(tm);
805 817
                Canvas.SetLeft(tm, list[count].X);
806 818
                Canvas.SetTop(tm, list[count].Y);
......
852 864

  
853 865

  
854 866
                Point setPoint = new Point(Canvas.GetLeft(thumb), Canvas.GetTop(thumb));
855

  
867
                
856 868
                AdornerMember control = (from userThumb in MemberSet
857 869
                                         where userThumb.ThumbList.Contains(thumb)
858 870
                                         select userThumb).FirstOrDefault();
......
865 877
                    List<Point> ps = new List<Point>();
866 878

  
867 879
                    nearPoint = MathSet.getNearPoint((control.DrawingData as IPath).PointSet, setPoint);
868

  
880
                    
869 881

  
870 882
                }
871 883
                for (int i = 0; i < (control.DrawingData as IPath).PointSet.Count; i++)
......
884 896
                                AllControl.updateControl();
885 897
                                DynamicThumbUpdate(control);
886 898
                                BorderUpdate();
887

  
899
                                
888 900
                            }
889 901
                            break;
890 902
                        #endregion
......
981 993
                                (control.DrawingData as ArrowTextControl).PointSet[1] = GetPointSet[1];
982 994

  
983 995

  
984
                                System.Diagnostics.Debug.WriteLine("MidPoint : " + (control.DrawingData as ArrowTextControl).MidPoint);
985
                                System.Diagnostics.Debug.WriteLine("HorizontalChange : " + e.HorizontalChange);
986
                                System.Diagnostics.Debug.WriteLine("VerticalChange : " + e.VerticalChange);
996
                                //System.Diagnostics.Debug.WriteLine("MidPoint : " + (control.DrawingData as ArrowTextControl).MidPoint);
997
                                //System.Diagnostics.Debug.WriteLine("HorizontalChange : " + e.HorizontalChange);
998
                                //System.Diagnostics.Debug.WriteLine("VerticalChange : " + e.VerticalChange);
987 999

  
988 1000
                                AllControl.PointSet[i] = setPoint;
989
                                System.Diagnostics.Debug.WriteLine("PointSet : " + AllControl.PointSet[i]);
1001
                                //System.Diagnostics.Debug.WriteLine("PointSet : " + AllControl.PointSet[i]);
990 1002

  
991 1003
                                AllControl.updateControl();
992 1004

  
993 1005
                                DynamicThumbUpdate(control);
994 1006
                                BorderUpdate();
995

  
1007
                                                                
996 1008
                            }
997 1009
                            break;
998 1010
                        #endregion
......
1579 1591
                            };
1580 1592

  
1581 1593
                            Point endPointV = new Point(Data.Bounds.Right, Data.Bounds.Bottom);
1582
                            Point middle = MathSet.getMiddlePoint((item.DrawingData as TextControl).StartPoint, endPointV);
1594
                            Point middle = MathSet.getMiddlePoint((item.DrawingData as TextControl).StartPoint, endPointV);                                                      
1583 1595

  
1584 1596
                            DragThumb.RenderTransformOrigin = new Point(0.0, 0.0);
1585 1597
                            DragThumb.RenderTransform = new RotateTransform()
......
1727 1739

  
1728 1740
            List<Point> AllPointSet = new List<Point>();
1729 1741
            Point CenterPoint = new Point();
1730

  
1742
            
1731 1743
            #region 센터 포인트 구하기 (그룹핑)
1732 1744
            foreach (var item in MemberSet)
1733 1745
            {
1734 1746
                if (item.DrawingData.GetType().Name == "TextControl")
1735
                {
1747
                {                    
1736 1748
                    if (AngleValue == 0)
1737 1749
                    {
1738 1750
                        AngleValue = (item.DrawingData as TextControl).Angle;
......
1834 1846
                        case ControlType.Date:
1835 1847
                            ((DateControl)item.DrawingData).Angle = AngleValue;
1836 1848
                            (item.DrawingData as IPath).updateControl();
1837
                            BorderUpdate();
1849
                            BorderUpdate();                          
1838 1850
                            break;
1839 1851
                        case ControlType.ArrowMultiLine:
1840 1852
                        case ControlType.ArcLine:
......
1862 1874
                            ((ImgControl)item.DrawingData).Angle = AngleValue;
1863 1875
                            (item.DrawingData as IPath).updateControl();
1864 1876
                            BorderUpdate();
1865
                            break;
1877
                            break;                        
1866 1878
                        case ControlType.Sign:
1867 1879
                            ((SignControl)item.DrawingData).Angle = AngleValue;
1868 1880
                            (item.DrawingData as IPath).updateControl();
1869 1881
                            BorderUpdate();
1870
                            break;
1882
                            break;                        
1871 1883
                        case ControlType.Symbol:
1872 1884
                            ((SymControl)item.DrawingData).Angle = AngleValue;
1873 1885
                            (item.DrawingData as IPath).updateControl();
......
1904 1916
                            (item.DrawingData as IPath).updateControl();
1905 1917
                            BorderUpdate();
1906 1918
                            break;
1907

  
1919
                        
1908 1920
                        default:
1909 1921
                            break;
1910 1922
                    }
......
1915 1927
        }
1916 1928

  
1917 1929
        private void rotate_DragStarted(object sender, DragStartedEventArgs e)
1918
        {
1930
        {            
1919 1931

  
1920 1932
            this.rotatePoint = Mouse.GetPosition(this); /// 2018.05.09 added by humkyung
1921 1933
            rotateTop.Cursor = Cursors.SizeAll;
......
1951 1963

  
1952 1964
            Undo_Event();
1953 1965
        }
1954

  
1966
        
1955 1967
        private void rotate_DragCompleted(object sender, DragCompletedEventArgs e)
1956 1968
        {
1957 1969
            rotateTop.Cursor = new Cursor(MainWindow.CursorChange().StreamSource);
1958

  
1970
            
1959 1971
            Undo_Event();
1960 1972
        }
1961 1973

  
......
2036 2048
        }
2037 2049

  
2038 2050
        private void drag_DragCompleted(object sender, DragCompletedEventArgs e)
2039
        {
2051
        {          
2040 2052
            DragThumb.Cursor = new Cursor(MainWindow.CursorChange().StreamSource);
2041 2053

  
2042 2054
            Undo_Event();
......
2101 2113

  
2102 2114
                if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "TextControl")
2103 2115
                {
2104
                    TextControlChanger();
2116
                    TextControlChanger();                    
2105 2117
                }
2106 2118

  
2107 2119
                else if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "ArrowTextControl")
......
2114 2126
                    tm.Visibility = Visibility.Collapsed;
2115 2127

  
2116 2128
                    ((MemberSet.First() as AdornerMember).DrawingData as ArrowTextControl).Base_TextBox.IsHitTestVisible = true;
2117

  
2129
                    
2118 2130
                    ((ArrowTextControl)AllControl).Base_TextBox.SizeChanged += (sen, ea) =>
2119 2131

  
2120 2132
                    {
......
2122 2134
                        tm.Height = (AllControl as ArrowTextControl).BoxHeight;
2123 2135

  
2124 2136
                        List<Point> ps = new List<Point>();
2125

  
2137
                        
2126 2138
                        ps.Add(new Point(Canvas.GetLeft(AllControl.Base_TextBox) + AllControl.BoxWidth / 2, Canvas.GetTop(AllControl.Base_TextBox))); //상단
2127 2139
                        ps.Add(new Point(Canvas.GetLeft(AllControl.Base_TextBox) + AllControl.BoxWidth / 2, Canvas.GetTop(AllControl.Base_TextBox) + AllControl.BoxHeight)); // 하단
2128 2140
                        ps.Add(new Point(Canvas.GetLeft(AllControl.Base_TextBox), Canvas.GetTop(AllControl.Base_TextBox) + AllControl.BoxHeight / 2)); //좌단
......
2203 2215
                }
2204 2216

  
2205 2217
            }
2206

  
2218
            
2207 2219
        }
2208 2220
        #endregion
2209 2221

  

내보내기 Unified diff

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