프로젝트

일반

사용자정보

개정판 1066bae3

ID1066bae338c75b4539ee2f375d83b4298150ce3f
상위 5423f26d
하위 1ba2b03d

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

issue #923 Select Control edit

Change-Id: Ic24089c392a187d3635fb1fb006fc9bf758e3d5c

차이점 보기:

KCOM/Controls/AdornerFinal.xaml.cs
97 97
            Canvas.SetZIndex(objectData, 84);
98 98
            try
99 99
            {
100
                //ViewerDataModel.Instance.MarkupControls_USER.Remove(objectData);
100 101
                this.ContainerContent.Children.Add(objectData);
101 102
            }
102
            catch //(Exception ex)
103
            catch (Exception ex)
103 104
            {
104 105

  
105 106
            }
107
           
106 108
            SetAdornerMember(objectData as CommentUserInfo);
107 109
            this.Focus();
108 110
        }
......
119 121
                try
120 122
                {
121 123
                    Canvas.SetZIndex(item, 80);
124
                    //ViewerDataModel.Instance.MarkupControls_USER.Remove(item);
122 125
                    this.ContainerContent.Children.Add(item);
123 126
                }
124 127
                catch //(Exception ex)
125 128
                {
126 129

  
127 130
                }
131
                finally
132
                {
133
                    
134
                }
128 135
            }
129 136
            SetAdornerMember(objectData);
130 137
            this.Focus();
......
1301 1308
                    #region 텍스트
1302 1309
                    if (item.Drawingtype == ControlType.TextControl)
1303 1310
                    {
1311
                        //DynamicThumbUpdate(e, item);
1304 1312
                        (item.DrawingData as TextControl).Move(e.HorizontalChange, e.VerticalChange);
1305 1313
                    }
1306 1314
                    #endregion
KCOM/Views/MainMenu.xaml.cs
2527 2527
            else if ((e.LeftButton == MouseButtonState.Released) && (e.MiddleButton == MouseButtonState.Released) && 
2528 2528
                (e.RightButton == MouseButtonState.Released) && ViewerDataModel.Instance.MarkupControls_USER.Count > 0)
2529 2529
            {
2530
                var control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.IsMouseOver).FirstOrDefault();
2530
                var control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.ItemRect.Contains(getCurrentPoint)).FirstOrDefault();
2531 2531
                if(control != null)
2532 2532
                {
2533 2533
                    this.cursor = Cursors.Hand;
......
2831 2831
                if (Flag)
2832 2832
                {
2833 2833
                    adornerSet.Add(item);
2834
                    ViewerDataModel.Instance.MarkupControls_USER.Remove(item);
2835 2834

  
2836 2835
                    Control_Style(item);
2837 2836
                }
......
3232 3231
                {
3233 3232
                    //dragSelectionBorder.Visibility = Visibility.Visible;
3234 3233
                    isLeftMouseButtonDownOnWindow = true;
3235
                }               
3234
                }
3236 3235

  
3237
                var control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.IsMouseOver).FirstOrDefault();
3236
                var control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.ItemRect.Contains(getCurrentPoint)).FirstOrDefault();
3238 3237
                if (control != null)
3239 3238
                {
3240 3239
                    AdornerFinal final = null;
......
4312 4311
                                    currentControl.IsNew = true;
4313 4312
                                    currentControl.MarkupInfoID = App.Custom_ViewInfoId;
4314 4313
                                    ViewerDataModel.Instance.MarkupControls_USER.Add(currentControl);
4315
                                    currentControl.SetValue(Canvas.ZIndexProperty, 2);
4314
                                    currentControl.SetValue(Canvas.ZIndexProperty, 3);
4315

  
4316 4316
                                    currentControl.SetValue(TextControl.CanvasXProperty, canvasDrawingMouseDownPoint.X);
4317 4317
                                    currentControl.SetValue(TextControl.CanvasYProperty, canvasDrawingMouseDownPoint.Y);
4318 4318
                                    
......
4322 4322
                                    (currentControl as TextControl).ApplyTemplate();
4323 4323
                                    (currentControl as TextControl).Base_TextBox.Focus();
4324 4324

  
4325
                                    //System.Diagnostics.Debug.WriteLine("CanvasX" + (currentControl as TextControl).CanvasX);
4326
                                    //System.Diagnostics.Debug.WriteLine("CanvasY" + (currentControl as TextControl).CanvasY);
4327

  
4325 4328
                                    CreateControl();
4326 4329

  
4327 4330
                                }
......
4992 4995

  
4993 4996
        private void RemoveLineStroke(Point P)
4994 4997
        {
4995
            var control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.IsMouseOver).FirstOrDefault();
4998
            var control = ViewerDataModel.Instance.MarkupControls_USER.Where(data => data.ItemRect.Contains(P)).FirstOrDefault();
4996 4999
            if (control != null)
4997 5000
            {
4998 5001
                UndoData = new Undo_data()
MarkupToPDF/Common/CommentUserInfo.cs
23 23

  
24 24
        public string Memo { get; set; }
25 25
        public string MarkupInfoID { get; set; }
26
        public bool IsMouseOver { get; set; }
26
        //public bool IsMouseOver { get; set; }
27 27
        public bool IsNew { get; set; }
28 28
        public string CommentID { get; set; }
29 29
        public string SymbolID { get; set; }
......
50 50

  
51 51
        private void CommentUserInfo_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e)
52 52
        {
53
            this.IsMouseOver = false;
53
             //this.IsMouseOver = false;
54 54
            //if (StateChanged !=null)
55 55
            //{
56 56
            //    StateChanged(this, new MyEventArgs { isMouseOver = false });
......
60 60

  
61 61
        private void CommentUserInfo_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e)
62 62
        {
63
            this.IsMouseOver = true;
63
            //this.IsMouseOver = true;
64 64
            //this.Opacity = 0.5;
65 65
            //if (StateChanged != null)
66 66
            //{
MarkupToPDF/Controls/Text/TextControl.cs
1117 1117
            if (e.OldValue != e.NewValue && instance.Base_TextBlock != null)
1118 1118
            {
1119 1119
                instance.SetValue(e.Property, e.NewValue);
1120
                //instance.DrawingCloud();
1120
                instance.DrawingCloud();
1121 1121
            }
1122 1122
        }
1123 1123

  
......
1127 1127
            if (e.OldValue != e.NewValue && instance!= null)
1128 1128
            {
1129 1129
                instance.SetValue(e.Property, e.NewValue);
1130
                //instance.DrawingCloud();
1130
                instance.DrawingCloud();
1131 1131
            }
1132 1132
        }
1133 1133
            
......
1166 1166
        /// <param name="dy"></param>
1167 1167
        public override void Move(double dx, double dy)
1168 1168
        {
1169
            Canvas.SetLeft(this, Canvas.GetLeft(this) + dx);
1170
            Canvas.SetTop(this, Canvas.GetTop(this) + dy);
1169
            //Canvas.SetLeft(this, Canvas.GetLeft(this) + dx);
1170
            //Canvas.SetTop(this, Canvas.GetTop(this) + dy);
1171
            this.SetValue(TextControl.CanvasXProperty, Canvas.GetLeft(this) + dx);
1172
            this.SetValue(TextControl.CanvasYProperty, Canvas.GetTop(this) + dy);
1173
            //System.Diagnostics.Debug.WriteLine("Left :" + Canvas.GetLeft(this) + dx);
1174
            //System.Diagnostics.Debug.WriteLine("Top :" + Canvas.GetTop(this) + dy);
1175

  
1176
            //this.CanvasX = Canvas.GetLeft(this) + dx;
1177
            //this.CanvasY = Canvas.GetTop(this) + dy;
1178

  
1179
            //System.Diagnostics.Debug.WriteLine("X :" + this.CanvasX);
1180
            //System.Diagnostics.Debug.WriteLine("Y :" + this.CanvasY);
1181
            //this.SetValue(TextControl.CanvasXProperty, Canvas.GetLeft(this) + dx);
1182
            //this.SetValue(TextControl.CanvasYProperty, Canvas.GetTop(this) + dy);
1171 1183
            this.StartPoint = new Point(this.StartPoint.X + dx, this.StartPoint.Y + dy);
1172 1184
            this.EndPoint = new Point(this.EndPoint.X + dx, this.EndPoint.Y + dy);
1173 1185
        }

내보내기 Unified diff

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