프로젝트

일반

사용자정보

개정판 7bb40d38

ID7bb40d3859fb67e2aff1bc947c30ab4872ac365a
상위 cac7cac2
하위 03960fa5

김태성이(가) 4년 이상 전에 추가함

setup image add

Change-Id: I92507b3adde225fcd0d7fd52ee2b86104309fdb9

차이점 보기:

KCOM/Controls/AdornerFinal.xaml.cs
1066 1066

  
1067 1067
        private void ResizeTm_DragDelta(object sender, DragDeltaEventArgs e)
1068 1068
        {
1069
            if (sender.GetType() != typeof(MyThumb)) return;
1070

  
1071
            MyThumb thumb = sender as MyThumb;
1072

  
1069 1073
            if (this.Members.Count > 1) return;
1070
            if (reSizePoint != new Point(0, 0))
1074

  
1075
            System.Diagnostics.Debug.WriteLine($"Value {e.HorizontalChange},{e.VerticalChange}");
1076

  
1077
            double newHorizontalChange = e.HorizontalChange;
1078
            double newVerticalChange = e.VerticalChange;
1079
            if((newHorizontalChange <-100 && newHorizontalChange > 100) || (newVerticalChange < -100 && newVerticalChange > 100))
1080
            {
1081
                return;
1082
            }
1083

  
1084
            if((GetPosition(thumb).X + newHorizontalChange) < 0)
1071 1085
            {
1072
                MyThumb thumb = sender as MyThumb;
1086
                newHorizontalChange = newHorizontalChange - (GetPosition(thumb).X + newHorizontalChange);
1087
            }
1073 1088

  
1089
            if ((GetPosition(thumb).X + thumb.RenderSize.Width + newHorizontalChange) - ViewerDataModel.Instance.ImageViewWidth > 0)
1090
            {
1091
                newHorizontalChange = newHorizontalChange - ((GetPosition(thumb).X + thumb.RenderSize.Width + newHorizontalChange) - ViewerDataModel.Instance.ImageViewWidth);
1092
            }
1093

  
1094
            if (GetPosition(thumb).Y + newVerticalChange < 0 || (GetPosition(thumb).Y + thumb.RenderSize.Height + newVerticalChange) - ViewerDataModel.Instance.ImageViewHeight > 0)
1095
            {
1096
                newVerticalChange = 0;
1097
            }
1098

  
1099
            if (reSizePoint != new Point(0, 0))
1100
            {
1074 1101
                //Point setPoint = Mouse.GetPosition(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.zoomAndPanCanvas);
1075 1102

  
1076 1103
                Point setPoint = new Point(Canvas.GetLeft(thumb), Canvas.GetTop(thumb));
1077 1104
                
1078
                System.Diagnostics.Debug.WriteLine($"1. GetPoint : {GetPosition(thumb).X},{GetPosition(thumb).Y}");
1105
                System.Diagnostics.Debug.WriteLine($"1. GetPoint : {GetPosition(thumb).X},{GetPosition(thumb).Y}  Change Value : {newHorizontalChange},{newVerticalChange}");
1079 1106

  
1080
                thumb.Translate(e.HorizontalChange, e.VerticalChange, this.AngleValue);
1107
                thumb.Translate(newHorizontalChange, newVerticalChange, this.AngleValue);
1081 1108
                
1082 1109
                AdornerMember control = (from userThumb in this.Members
1083 1110
                                         where userThumb.ThumbList.Contains(thumb)
......
1085 1112

  
1086 1113
                IPath AllControl = control.DrawingData as IPath;
1087 1114

  
1088
                System.Diagnostics.Debug.WriteLine($"2. GetPoint : {GetPosition(thumb).X},{GetPosition(thumb).Y}");
1115
               // System.Diagnostics.Debug.WriteLine($"2. GetPoint : {GetPosition(thumb).X},{GetPosition(thumb).Y}");
1089 1116

  
1090
                //System.Diagnostics.Debug.WriteLine($"ResizeTm_DragDelta setPoint : {setPoint.X},{setPoint.Y} - {e.HorizontalChange},{e.VerticalChange}");
1117
                System.Diagnostics.Debug.WriteLine($"2. GetPoint : {setPoint.X},{setPoint.Y} -  {newHorizontalChange},{newVerticalChange}");
1091 1118

  
1092 1119
                var commentInfo = (control.DrawingData) as CommentUserInfo;
1093
                commentInfo.OnMoveCtrlPoint(setPoint, e.HorizontalChange, e.VerticalChange,ViewerDataModel.Instance.IsAxisLock || ViewerDataModel.Instance.IsPressShift);
1120
                commentInfo.OnMoveCtrlPoint(setPoint, newHorizontalChange, newVerticalChange,ViewerDataModel.Instance.IsAxisLock || ViewerDataModel.Instance.IsPressShift);
1094 1121

  
1095 1122
                System.Diagnostics.Debug.WriteLine($"3. GetPoint : {GetPosition(thumb).X},{GetPosition(thumb).Y}");
1096 1123
                control.UpdateThumb();
......
1098 1125
                System.Diagnostics.Debug.WriteLine($"4. GetPoint : {GetPosition(thumb).X},{GetPosition(thumb).Y}");
1099 1126
                this.BorderUpdate();
1100 1127

  
1101
                System.Diagnostics.Debug.WriteLine($"5. GetPoint : {GetPosition(thumb).X},{GetPosition(thumb).Y}");
1128
               System.Diagnostics.Debug.WriteLine($"5. GetPoint : {GetPosition(thumb).X},{GetPosition(thumb).Y}");
1102 1129
            }
1103 1130
        }
1104 1131

  

내보내기 Unified diff

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