프로젝트

일반

사용자정보

개정판 53880c83

ID53880c83defd8cc6468fd4130469156a289f4e62
상위 6472f348
하위 97e8ad04

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

issue #886: Symbol legend 생성 작업 중....

차이점 보기:

KCOM/Controls/AdornerFinal.xaml.cs
8 8
using MarkupToPDF.Controls.Text;
9 9
using System;
10 10
using System.Collections.Generic;
11
using System.Diagnostics;
11 12
using System.Linq;
12 13
using System.Reactive.Linq;
13 14
using System.Text;
......
30 31
        public double DrawingAngle { get; set; }
31 32
        public List<Thumb> ThumbList { get; set; }
32 33
        public string Symbol_ID { get; set; }
34
        public long Group_ID { get; set; }
33 35
    }
34 36
    public partial class AdornerFinal : UserControl
35 37
    {
......
95 97
            {
96 98
                this.ContainerContent.Children.Add(objectData);
97 99
            }
98
            catch (Exception ex)
100
            catch //(Exception ex)
99 101
            {
100 102

  
101 103
            }
......
117 119
                    Canvas.SetZIndex(item, 80);
118 120
                    this.ContainerContent.Children.Add(item);
119 121
                }
120
                catch (Exception ex)
122
                catch //(Exception ex)
121 123
                {
122 124

  
123 125
                }
......
143 145
        /// </summary>
144 146
        /// <param name="member">UIElement 타입으로 BaseLayer에 있는 것들이 들어옵니다.</param>
145 147
        public void SetAdornerMember(MarkupToPDF.Common.CommentUserInfo member)
146
        {         
147
            
148
        {
148 149
            switch (member.GetType().Name)
149 150
            {
150 151
                #region 컨트롤 조건
151 152
                case "LineControl": //Angle추가 안했음
152
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.SingleLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
153
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.SingleLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
153 154
                    break;
154 155
                case "ImgControl": //Angle추가 안했음
155
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ImgControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
156
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ImgControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
156 157
                    //AdornerBorder.RenderTransformOrigin = new Point(0.5, 0.5);            
157 158
                    //DragThumb.RenderTransformOrigin = new Point(0.5, 0.5);
158 159
                    AngleValue = (member as ImgControl).Angle;
159 160
                    break;
160
                //case "SymControl": //Angle추가 안했음
161
                //    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = MarkupType.Viewbox, ThumbList = new List<Thumb>() });
162
                //    AngleValue = (member as SymControl).Angle;
163
                //    //ViewBoxRotate(member);
164
                //    break;
165
                //case "SymControlN": //Angle추가 안했음
166
                //    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = MarkupType.Viewbox, ThumbList = new List<Thumb>() });
167
                //    AngleValue = (member as SymControlN).Angle;
168
                //    //ViewBoxRotate(member);
169
                //    break;
170 161
                case "PolygonControl": //Angle추가 안했음
171
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
162
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
172 163
                    break;
173 164
                case "ArrowControl":
174
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
165
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
175 166
                    break;
176 167
                case "ArrowTextControl":
177
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowTextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
168
                    MemberSet.Add(new AdornerMember
169
                    {
170
                        DrawingData = member,
171
                        Drawingtype = ControlType.ArrowTextControl,
172
                        ThumbList = new List<Thumb>(),
173
                        Symbol_ID = member.SymbolID,
174
                        Group_ID = member.GroupID,
175
                    });
178 176
                    (member as ArrowTextControl).Base_TextBox.IsHitTestVisible = false;
179 177
                    AngleValue = (member as ArrowTextControl).Angle;
180 178
                    Observable.FromEventPattern(((ArrowTextControl)member).Base_TextBox, "LostFocus").Subscribe(a =>
......
189 187
                    });
190 188
                    break;
191 189
                case "ArcControl":
192
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
190
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
193 191
                    break;
194 192
                case "ArrowArcControl":
195
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcArrow, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
193
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcArrow, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
196 194
                    break;
197 195
                case "ArrowControl_Multi":
198
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowMultiLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
196
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowMultiLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
199 197
                    break;
200 198
                case "RectangleControl":
201
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Rectangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
199
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Rectangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
202 200
                    break;
203 201
                case "DateControl":
204
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Date, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
202
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Date, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
205 203
                    AngleValue = (member as DateControl).Angle;
206 204
                    break;
207 205
                case "TriControl":
208
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Triangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
206
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Triangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
209 207
                    break;
210 208
                case "CircleControl":
211
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Circle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
209
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Circle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
212 210
                    break;
213 211
                case "CloudControl":
214
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
212
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
215 213
                    break;
216 214
                case "RectCloudControl":
217
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.RectCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
215
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.RectCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
218 216
                    break;
219 217
                case "SignControl":
220
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Sign, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
218
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Sign, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
221 219
                    AngleValue = (member as SignControl).Angle;
222 220
                    break;
223
     
221

  
224 222
                case "SymControl":
225
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Symbol, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
223
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Symbol, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
226 224
                    AngleValue = (member as SymControl).Angle;
227 225
                    break;
228 226
                case "SymControlN":
229
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Stamp, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
227
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Stamp, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
230 228
                    AngleValue = (member as SymControlN).Angle;
231 229
                    break;
232 230
                case "InkControl": //Angle추가 안했음
233
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Ink, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
231
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Ink, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
234 232
                    break;
235 233
                case "TextControl":
236
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
234
                    MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
237 235
                    RectangleGeometry Data = new RectangleGeometry
238 236
                    {
239 237
                        Rect = new Rect()
......
319 317
                switch (member.GetType().Name)
320 318
                {
321 319
                    #region 컨트롤 조건
322
                    case "LineControl": 
323
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.SingleLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
320
                    case "LineControl":
321
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.SingleLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
322
                        break;
323
                    case "ImgControl":
324
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ImgControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
324 325
                        break;
325
                    case "ImgControl": 
326
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ImgControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
327
                        break;                    
328 326
                    case "ArrowControl":
329
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
327
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
330 328
                        break;
331
                    case "PolygonControl": 
332
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
329
                    case "PolygonControl":
330
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
333 331
                        break;
334 332
                    case "ArrowTextControl":
335
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowTextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
333
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowTextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
336 334
                        (member as ArrowTextControl).Base_TextBox.IsHitTestVisible = false;
337 335
                        break;
338 336
                    case "ArcControl":
339
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
337
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
340 338
                        break;
341 339
                    case "ArrowArcControl":
342
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcArrow, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
340
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArcArrow, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
343 341
                        break;
344 342
                    case "DateControl":
345
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Date, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
343
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Date, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
346 344
                        break;
347 345
                    case "ArrowControl_Multi":
348
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowMultiLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
346
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.ArrowMultiLine, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
349 347
                        break;
350 348
                    case "RectangleControl":
351
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Rectangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
349
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Rectangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
352 350
                        break;
353 351
                    case "TriControl":
354
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Triangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
352
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Triangle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
355 353
                        break;
356 354
                    case "CircleControl":
357
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Circle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
355
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Circle, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
358 356
                        break;
359 357
                    case "CloudControl":
360
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
358
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.PolygonCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
361 359
                        break;
362 360
                    case "RectCloudControl":
363
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.RectCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
361
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.RectCloud, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
364 362
                        break;
365 363
                    case "SignControl":
366
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Sign, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
364
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Sign, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
367 365
                        break;
368 366
                    case "SymControl":
369
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Symbol, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
367
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Symbol, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
370 368
                        break;
371 369
                    case "SymControlN":
372
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Stamp, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
370
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Stamp, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
373 371
                        break;
374
                    case "InkControl": 
375
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Ink, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
372
                    case "InkControl":
373
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.Ink, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
376 374
                        break;
377 375
                    case "TextControl":
378
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID });
376
                        MemberSet.Add(new AdornerMember { DrawingData = member, Drawingtype = ControlType.TextControl, ThumbList = new List<Thumb>(), Symbol_ID = member.SymbolID, Group_ID = member.GroupID });
379 377
                        Observable.FromEventPattern(((TextControl)member), "PropertyChanged").Subscribe(a =>
380 378
                        {
381 379
                            BorderUpdate();
382 380
                            try
383 381
                            {
384
                                ((TextControl)member).Base_TextBlock.TextDecorations = ((TextControl)member).UnderLine; 
382
                                ((TextControl)member).Base_TextBlock.TextDecorations = ((TextControl)member).UnderLine;
385 383
                            }
386 384
                            catch (Exception)
387 385
                            {
......
459 457
                        textControlWidth = ((currentControl as TextControl).Base_TextBox.ActualWidth);
460 458
                        textControlHeight = ((currentControl as TextControl).Base_TextBox.ActualHeight);
461 459
                    }
462
                    
460

  
463 461
                    if ((currentControl as TextControl).EndPoint.X < minX)
464 462
                    {
465 463
                        minX = (currentControl as TextControl).EndPoint.X;
......
517 515
                    if (rt.Bottom > maxY) maxY = rt.Bottom;
518 516
                }
519 517
                else if ((currentControl as CircleControl) != null)
520
                {                    
518
                {
521 519
                    List<Point> am = (currentControl as IPath).PointSet;
522 520
                    List<double> xSet = am.Select(p => p.X).ToList();
523 521
                    List<double> ySet = am.Select(p => p.Y).ToList();
......
598 596
        /// </summary>
599 597
        /// <param name="pointset">Drawing Point</param>
600 598
        public void RegistryPoint(CommentUserInfo member, int cnt = 1)
601
         {
599
        {
602 600
            int count = 0;
603 601
            double Minx = 100000000;
604 602
            double Miny = 100000000;
......
625 623
                };
626 624

  
627 625
                MemberSet.Last().ThumbList.Add(tm);
628

  
629 626
                if ((markT == ControlType.ArcLine && list[i] == (member as ArcControl).MidPoint) || (markT == ControlType.ArcArrow && list[i] == (member as ArrowArcControl).MidPoint))
630 627
                {
631 628
                    tm.Style = (Style)this.LayoutRoot.Resources["ThumbArcControlStyle"];
......
752 749
                        };
753 750
                    }
754 751
                }
755
                
752

  
756 753
                if (member.GetType().Name == "CloudControl")
757 754
                {
758 755
                    if (i == list.Count() - 1)
......
778 775
                        tm.Visibility = System.Windows.Visibility.Collapsed;
779 776
                    }
780 777
                }
781
                
778

  
782 779
                this.ContainerContent.Children.Add(tm);
783 780
                Canvas.SetLeft(tm, list[count].X);
784 781
                Canvas.SetTop(tm, list[count].Y);
......
827 824
                    Canvas.SetLeft(thumb, Canvas.GetLeft(thumb) + e.HorizontalChange);
828 825
                    Canvas.SetTop(thumb, Canvas.GetTop(thumb) + e.VerticalChange);
829 826
                }
830
                
827

  
831 828

  
832 829
                Point setPoint = new Point(Canvas.GetLeft(thumb), Canvas.GetTop(thumb));
833
                
830

  
834 831
                AdornerMember control = (from userThumb in MemberSet
835 832
                                         where userThumb.ThumbList.Contains(thumb)
836 833
                                         select userThumb).FirstOrDefault();
......
843 840
                    List<Point> ps = new List<Point>();
844 841

  
845 842
                    nearPoint = MathSet.getNearPoint((control.DrawingData as IPath).PointSet, setPoint);
846
                    
843

  
847 844

  
848 845
                }
849 846
                for (int i = 0; i < (control.DrawingData as IPath).PointSet.Count; i++)
......
862 859
                                AllControl.updateControl();
863 860
                                DynamicThumbUpdate(control);
864 861
                                BorderUpdate();
865
                                
862

  
866 863
                            }
867 864
                            break;
868 865
                        #endregion
......
959 956
                                (control.DrawingData as ArrowTextControl).PointSet[1] = GetPointSet[1];
960 957

  
961 958

  
962
                                //System.Diagnostics.Debug.WriteLine("MidPoint : " + (control.DrawingData as ArrowTextControl).MidPoint);
963
                                //System.Diagnostics.Debug.WriteLine("HorizontalChange : " + e.HorizontalChange);
964
                                //System.Diagnostics.Debug.WriteLine("VerticalChange : " + e.VerticalChange);
959
                                System.Diagnostics.Debug.WriteLine("MidPoint : " + (control.DrawingData as ArrowTextControl).MidPoint);
960
                                System.Diagnostics.Debug.WriteLine("HorizontalChange : " + e.HorizontalChange);
961
                                System.Diagnostics.Debug.WriteLine("VerticalChange : " + e.VerticalChange);
965 962

  
966 963
                                AllControl.PointSet[i] = setPoint;
964
                                System.Diagnostics.Debug.WriteLine("PointSet : " + AllControl.PointSet[i]);
965

  
967 966
                                AllControl.updateControl();
968 967

  
969 968
                                DynamicThumbUpdate(control);
970 969
                                BorderUpdate();
971
                                                                
970

  
972 971
                            }
973 972
                            break;
974 973
                        #endregion
......
1126 1125
                                DynamicThumbUpdate(control);
1127 1126
                                BorderUpdate();
1128 1127
                            }
1129
                            break;                        
1128
                            break;
1130 1129
                        #endregion
1131 1130
                        #region Ink
1132 1131
                        case ControlType.Ink:
......
1204 1203
                LastRotateVerticalValue = e.GetPosition(this).X;
1205 1204
            }
1206 1205
            else
1207
            {                
1206
            {
1208 1207
                if (e.GetPosition(this).X > LastRotateHorizontalValue)
1209 1208
                {
1210 1209
                    RotateFlag = true;
......
1244 1243
                        DynamicThumbUpdate(e, item);
1245 1244
                    }
1246 1245
                    #endregion
1247
                    
1246

  
1248 1247
                    #region 써클
1249 1248
                    if (item.Drawingtype == ControlType.Circle || item.Drawingtype == ControlType.Sign || item.Drawingtype == ControlType.Symbol || item.Drawingtype == ControlType.Stamp)
1250 1249
                    {
......
1270 1269
                        // Point endPointV = new Point(Data.Bounds.Right, Data.Bounds.Bottom);
1271 1270
                        //Point middle = MathSet.getMiddlePoint((item.DrawingData as TextControl).StartPoint, (item.DrawingData as TextControl).EndPoint);
1272 1271

  
1273
                       // TextControlChanger(); 
1272
                        // TextControlChanger(); 
1274 1273
                    }
1275 1274
                    #endregion
1276 1275
                    #region 날짜
1277 1276
                    if (item.Drawingtype == ControlType.Date)
1278 1277
                    {
1279
                        DynamicThumbUpdate(e, item);                        
1278
                        DynamicThumbUpdate(e, item);
1280 1279
                    }
1281 1280
                    #endregion
1282 1281
                    #region 클라우드
......
1288 1287
                    }
1289 1288
                    #endregion
1290 1289
                    #region 심볼
1291
                    
1290

  
1292 1291
                    #endregion
1293
                    
1292

  
1294 1293
                    #region 폴리곤
1295 1294
                    if (item.Drawingtype == ControlType.PolygonControl)
1296 1295
                    {
......
1373 1372
                if (!(item.DrawingData as ArrowTextControl).isTrans) //trans가 True인경우
1374 1373
                {
1375 1374
                    List<Point> ps = new List<Point>();
1376
                    
1375

  
1377 1376
                    var temp = item.DrawingData as ArrowTextControl;
1378 1377
                    ps.Add(new Point(Canvas.GetLeft(temp.Base_TextBox) + temp.BoxWidth / 2, Canvas.GetTop(temp.Base_TextBox))); //상단
1379 1378
                    ps.Add(new Point(Canvas.GetLeft(temp.Base_TextBox) + temp.BoxWidth / 2, Canvas.GetTop(temp.Base_TextBox) + temp.BoxHeight)); // 하단
......
1542 1541
                    {
1543 1542
                        case ControlType.TextControl:
1544 1543
                            ((TextControl)item.DrawingData).Angle = AngleValue;
1545
                            
1544

  
1546 1545
                            RectangleGeometry Data = new RectangleGeometry
1547 1546
                            {
1548 1547
                                Rect = new Rect()
......
1553 1552
                                    Height = (item.DrawingData as TextControl).Base_TextBlock.ActualHeight / 2,
1554 1553
                                }
1555 1554
                            };
1556
                            
1555

  
1557 1556
                            Point endPointV = new Point(Data.Bounds.Right, Data.Bounds.Bottom);
1558
                            Point middle = MathSet.getMiddlePoint((item.DrawingData as TextControl).StartPoint, endPointV);                                                      
1557
                            Point middle = MathSet.getMiddlePoint((item.DrawingData as TextControl).StartPoint, endPointV);
1559 1558

  
1560 1559
                            DragThumb.RenderTransformOrigin = new Point(0.0, 0.0);
1561 1560
                            DragThumb.RenderTransform = new RotateTransform()
1562 1561
                            {
1563 1562
                                Angle = (item.DrawingData as TextControl).Angle,
1564
                                
1563

  
1565 1564
                            };
1566 1565

  
1567 1566
                            AdornerBorder.RenderTransformOrigin = new Point(0.0, 0.0);
1568 1567
                            AdornerBorder.RenderTransform = new RotateTransform()
1569 1568
                            {
1570 1569
                                Angle = (item.DrawingData as TextControl).Angle,
1571
                                
1570

  
1572 1571
                            };
1573 1572

  
1574 1573
                            (item.DrawingData as TextControl).Base_Grid.RenderTransform = new RotateTransform()
......
1577 1576
                            };
1578 1577
                            BorderUpdate();
1579 1578
                            break;
1580
                        
1581
                        case ControlType.Date:                            
1579

  
1580
                        case ControlType.Date:
1582 1581
                            ((DateControl)item.DrawingData).Angle = AngleValue;
1583 1582
                            (item.DrawingData as IPath).updateControl();
1584
                            BorderUpdate();                            
1583
                            BorderUpdate();
1585 1584
                            break;
1586 1585
                        case ControlType.ArrowMultiLine:
1587 1586
                        case ControlType.ArcLine:
......
1609 1608
                            ((ImgControl)item.DrawingData).Angle = AngleValue;
1610 1609
                            (item.DrawingData as IPath).updateControl();
1611 1610
                            BorderUpdate();
1612
                            break;                        
1611
                            break;
1613 1612
                        case ControlType.Sign:
1614 1613
                            ((SignControl)item.DrawingData).Angle = AngleValue;
1615 1614
                            (item.DrawingData as IPath).updateControl();
......
1654 1653

  
1655 1654
        private void resize_MouseMove(object sender, MouseEventArgs e)
1656 1655
        {
1657
            reSizePoint = e.GetPosition(this);            
1656
            reSizePoint = e.GetPosition(this);
1658 1657
        }
1659 1658
        /// <summary>
1660 1659
        /// 회전
......
1669 1668

  
1670 1669
        double LastRotateHorizontalValue = 0;
1671 1670
        double LastRotateVerticalValue = 0;
1672
        double LastWidthValue = 0;
1673
        double SetWidth = 0;
1671
        //double LastWidthValue = 0;
1672
        //double SetWidth = 0;
1674 1673
        bool RotateFlag = false;
1675 1674

  
1676 1675
        /// <summary>
......
1683 1682

  
1684 1683
            List<Point> AllPointSet = new List<Point>();
1685 1684
            Point CenterPoint = new Point();
1686
            
1685

  
1687 1686
            #region 센터 포인트 구하기 (그룹핑)
1688 1687
            foreach (var item in MemberSet)
1689 1688
            {
1690 1689
                if (item.DrawingData.GetType().Name == "TextControl")
1691
                {                    
1690
                {
1692 1691
                    if (AngleValue == 0)
1693 1692
                    {
1694 1693
                        AngleValue = (item.DrawingData as TextControl).Angle;
......
1733 1732

  
1734 1733
                        Point value = MathSet.RotateAbout(CenterPoint, new Point(x, y), dDeltaAngle);
1735 1734
                        Canvas.SetLeft(thumb, value.X);
1736
                        Canvas.SetTop(thumb, value.Y);                        
1735
                        Canvas.SetTop(thumb, value.Y);
1737 1736
                    }
1738 1737

  
1739 1738
                    for (int i = 0; i < (item.DrawingData as IPath).PointSet.Count(); i++)
......
1748 1747
                    {
1749 1748
                        case ControlType.TextControl:
1750 1749
                            ((TextControl)item.DrawingData).Angle = AngleValue;
1751
                            
1750

  
1752 1751
                            RectangleGeometry Data = new RectangleGeometry
1753 1752
                            {
1754 1753
                                Rect = new Rect()
......
1759 1758
                                    Height = (item.DrawingData as TextControl).Base_TextBlock.ActualHeight / 2,
1760 1759
                                }
1761 1760
                            };
1762
                            
1761

  
1763 1762
                            Point endPointV = new Point(Data.Bounds.Right, Data.Bounds.Bottom);
1764 1763
                            Point middle = MathSet.getMiddlePoint((item.DrawingData as TextControl).StartPoint, endPointV);
1765
                            
1764

  
1766 1765
                            DragThumb.RenderTransformOrigin = new Point(0, 0);
1767 1766
                            DragThumb.RenderTransform = new RotateTransform()
1768 1767
                            {
......
1786 1785

  
1787 1786
                            BorderUpdate();
1788 1787
                            break;
1789
                        
1788

  
1790 1789
                        case ControlType.Date:
1791 1790
                            ((DateControl)item.DrawingData).Angle = AngleValue;
1792 1791
                            (item.DrawingData as IPath).updateControl();
1793
                            BorderUpdate();                            
1792
                            BorderUpdate();
1794 1793
                            break;
1795 1794
                        case ControlType.ArrowMultiLine:
1796 1795
                        case ControlType.ArcLine:
......
1818 1817
                            ((ImgControl)item.DrawingData).Angle = AngleValue;
1819 1818
                            (item.DrawingData as IPath).updateControl();
1820 1819
                            BorderUpdate();
1821
                            break;                        
1820
                            break;
1822 1821
                        case ControlType.Sign:
1823 1822
                            ((SignControl)item.DrawingData).Angle = AngleValue;
1824 1823
                            (item.DrawingData as IPath).updateControl();
1825 1824
                            BorderUpdate();
1826
                            break;                        
1825
                            break;
1827 1826
                        case ControlType.Symbol:
1828 1827
                            ((SymControl)item.DrawingData).Angle = AngleValue;
1829 1828
                            (item.DrawingData as IPath).updateControl();
......
1860 1859
                            (item.DrawingData as IPath).updateControl();
1861 1860
                            BorderUpdate();
1862 1861
                            break;
1863
                        
1862

  
1864 1863
                        default:
1865 1864
                            break;
1866 1865
                    }
......
1871 1870
        }
1872 1871

  
1873 1872
        private void rotate_DragStarted(object sender, DragStartedEventArgs e)
1874
        {            
1873
        {
1875 1874

  
1876 1875
            this.rotatePoint = Mouse.GetPosition(this); /// 2018.05.09 added by humkyung
1877 1876
            rotateTop.Cursor = Cursors.SizeAll;
......
1907 1906

  
1908 1907
            Undo_Event();
1909 1908
        }
1910
        
1909

  
1911 1910
        private void rotate_DragCompleted(object sender, DragCompletedEventArgs e)
1912 1911
        {
1913 1912
            rotateTop.Cursor = new Cursor(MainWindow.CursorChange().StreamSource);
1914
            
1913

  
1915 1914
            Undo_Event();
1916 1915
        }
1917 1916

  
......
1976 1975
                else
1977 1976
                {
1978 1977
                    multi_Undo_Data.Angle = AngleValue;
1979
                }                    
1978
                }
1980 1979

  
1981 1980
                multi_Undo_Data.Markup = control.DrawingData as CommentUserInfo;
1982 1981
                UndoData.Markup_List.Add(multi_Undo_Data);
......
1992 1991
        }
1993 1992

  
1994 1993
        private void drag_DragCompleted(object sender, DragCompletedEventArgs e)
1995
        {          
1994
        {
1996 1995
            DragThumb.Cursor = new Cursor(MainWindow.CursorChange().StreamSource);
1997 1996

  
1998 1997
            Undo_Event();
......
2057 2056

  
2058 2057
                if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "TextControl")
2059 2058
                {
2060
                    TextControlChanger();                    
2059
                    TextControlChanger();
2061 2060
                }
2062 2061

  
2063 2062
                else if ((MemberSet.First() as AdornerMember).DrawingData.GetType().Name == "ArrowTextControl")
......
2070 2069
                    tm.Visibility = Visibility.Collapsed;
2071 2070

  
2072 2071
                    ((MemberSet.First() as AdornerMember).DrawingData as ArrowTextControl).Base_TextBox.IsHitTestVisible = true;
2073
                    
2072

  
2074 2073
                    ((ArrowTextControl)AllControl).Base_TextBox.SizeChanged += (sen, ea) =>
2075 2074

  
2076 2075
                    {
......
2078 2077
                        tm.Height = (AllControl as ArrowTextControl).BoxHeight;
2079 2078

  
2080 2079
                        List<Point> ps = new List<Point>();
2081
                        
2080

  
2082 2081
                        ps.Add(new Point(Canvas.GetLeft(AllControl.Base_TextBox) + AllControl.BoxWidth / 2, Canvas.GetTop(AllControl.Base_TextBox))); //상단
2083 2082
                        ps.Add(new Point(Canvas.GetLeft(AllControl.Base_TextBox) + AllControl.BoxWidth / 2, Canvas.GetTop(AllControl.Base_TextBox) + AllControl.BoxHeight)); // 하단
2084 2083
                        ps.Add(new Point(Canvas.GetLeft(AllControl.Base_TextBox), Canvas.GetTop(AllControl.Base_TextBox) + AllControl.BoxHeight / 2)); //좌단
......
2159 2158
                }
2160 2159

  
2161 2160
            }
2162
            
2161

  
2163 2162
        }
2164 2163
        #endregion
2165 2164

  

내보내기 Unified diff

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