프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / MarkupToPDF / Controls / Shape / CircleControl.cs @ e65e8c5c

이력 | 보기 | 이력해설 | 다운로드 (24 KB)

1
using MarkupToPDF.Common;
2
using MarkupToPDF.Controls.Common;
3
using MarkupToPDF.Serialize.Core;
4
using MarkupToPDF.Serialize.S_Control;
5
using System;
6
using System.Collections.Generic;
7
using System.ComponentModel;
8
using System.Linq;
9
using System.Windows;
10
using System.Windows.Media;
11
using System.Windows.Shapes;
12

    
13
namespace MarkupToPDF.Controls.Shape
14
{
15
    [TemplatePart(Name = "PART_CirclePath", Type = typeof(Path))]
16
    public class CircleControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, ICircleControl, IDashControl
17
    {
18
        private const string PART_CirclePath = "PART_CirclePath";
19
        public Path Base_CirclePath = null;
20

    
21
        static CircleControl()
22
        {
23
            DefaultStyleKeyProperty.OverrideMetadata(typeof(CircleControl), new FrameworkPropertyMetadata(typeof(CircleControl)));
24
            //Application.Current.Resources.MergedDictionaries.Add(Application.LoadComponent(new Uri("/MarkupToPDF;Component/Themes/generic.xaml")) as ResourceDictionary);
25
            //ResourceDictionary dictionary = new ResourceDictionary();
26
            //dictionary.Source = new Uri("/MarkupToPDF;component/themes/generic.xaml", UriKind.RelativeOrAbsolute);
27
            //Application.Current.Resources.MergedDictionaries.Add(dictionary);
28
        }
29

    
30
        #region Dependency Properties
31

    
32
        public static readonly DependencyProperty IsSelectedProperty =
33
      DependencyProperty.Register("IsSelected", typeof(bool), typeof(CircleControl), new FrameworkPropertyMetadata(false, IsSelectedChanged));
34

    
35
        public static readonly DependencyProperty ControlTypeProperty =
36
    DependencyProperty.Register("ControlType", typeof(ControlType), typeof(CircleControl), new FrameworkPropertyMetadata(ControlType.Circle));
37

    
38

    
39

    
40

    
41
        public static readonly DependencyProperty OverViewPathDataProperty = DependencyProperty.Register(
42
                "OverViewPathData", typeof(Geometry), typeof(CircleControl), new PropertyMetadata(null));
43

    
44
        public static readonly DependencyProperty LineSizeProperty = DependencyProperty.Register(
45
                "LineSize", typeof(double), typeof(CircleControl), new PropertyMetadata((Double)3));
46
        public static readonly DependencyProperty UserIDProperty = DependencyProperty.Register(
47
                "UserID", typeof(string), typeof(CircleControl), new PropertyMetadata(null));
48
				
49
        public static readonly DependencyProperty FillColorProperty = DependencyProperty.Register(
50
                "FillColor", typeof(SolidColorBrush), typeof(CircleControl), new PropertyMetadata(new SolidColorBrush(Colors.Red)));
51

    
52
        public static readonly DependencyProperty StrokeColorProperty = DependencyProperty.Register(
53
                "StrokeColor", typeof(SolidColorBrush), typeof(CircleControl), new PropertyMetadata(new SolidColorBrush(Colors.Red)));
54

    
55
        public static readonly DependencyProperty PathDataProperty = DependencyProperty.Register(
56
                "PathData", typeof(Geometry), typeof(CircleControl), null);
57
        //강인구 추가
58
        public static readonly DependencyProperty PaintProperty = DependencyProperty.Register(
59
                "Paint", typeof(PaintSet), typeof(CircleControl), new PropertyMetadata(PaintSet.None, PointValueChanged));
60

    
61
        public static readonly DependencyProperty EndPointProperty = DependencyProperty.Register(
62
                "EndPoint", typeof(Point), typeof(CircleControl), new PropertyMetadata(new Point(0, 0), PointValueChanged));
63

    
64
        //강인구 추가
65
        public static readonly DependencyProperty DashSizeProperty = DependencyProperty.Register(
66
                "DashSize", typeof(DoubleCollection), typeof(CircleControl), new PropertyMetadata(new DoubleCollection { 1, 1 }, PointValueChanged));
67

    
68
        public static readonly DependencyProperty TopRightPointProperty = DependencyProperty.Register(
69
              "TopRightPoint", typeof(Point), typeof(CircleControl), new PropertyMetadata(new Point(0, 0), PointValueChanged));
70

    
71
        public static readonly DependencyProperty LeftBottomPointProperty = DependencyProperty.Register(
72
                 "LeftBottomPoint", typeof(Point), typeof(CircleControl), new PropertyMetadata(new Point(0, 0), PointValueChanged));
73

    
74
        public static readonly DependencyProperty StartPointProperty = DependencyProperty.Register(
75
                "StartPoint", typeof(Point), typeof(CircleControl), new PropertyMetadata(new Point(0, 0), PointValueChanged));
76
        public static readonly DependencyProperty PointSetProperty = DependencyProperty.Register(
77
                 "PointSet", typeof(List<Point>), typeof(CircleControl), new PropertyMetadata(new List<Point>()));
78
        public static readonly DependencyProperty AngleProperty = DependencyProperty.Register("Angle", typeof(double), typeof(CircleControl),
79
            new PropertyMetadata((double)0.0, new PropertyChangedCallback(AngleValueChanged)));
80
        public static readonly DependencyProperty CenterXProperty = DependencyProperty.Register("CenterX", typeof(double), typeof(CircleControl),
81
            new PropertyMetadata((double)0, OnCenterXYChanged));
82
        public static readonly DependencyProperty CenterYProperty = DependencyProperty.Register("CenterY", typeof(double), typeof(CircleControl),
83
            new PropertyMetadata((double)0, OnCenterXYChanged));
84
        public static readonly DependencyProperty mousemodeProperty =
85
                        DependencyProperty.Register("mousemode", typeof(MouseMode), typeof(CircleControl), new PropertyMetadata(MouseMode.None, PointValueChanged));
86
        #endregion
87
        #region PropertyChanged Method
88

    
89
         public static void IsSelectedChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
90
        {
91
            //var instance = (CircleControl)sender;
92

    
93
            //if (e.OldValue != e.NewValue && instance.Base_CirclePath != null)
94
            //{
95

    
96
            //    instance.SetValue(e.Property, e.NewValue);
97

    
98
            //    if (instance.IsSelected)
99
            //    {
100
            //        instance.Base_CirclePath.Stroke = new SolidColorBrush(Colors.Blue);
101
            //    }
102
            //    else
103
            //    {
104
            //        instance.Base_CirclePath.Stroke = new SolidColorBrush(Colors.Red);
105
            //    }
106
            //}
107
        }
108

    
109
        public static void PointValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
110
        {
111
            var instance = (CircleControl)sender;
112
            if (e.OldValue != e.NewValue && instance.Base_CirclePath != null)
113
            {
114
                instance.SetValue(e.Property, e.NewValue);
115
                instance.SetCircle();
116
            }
117
        }
118

    
119
        public static void OnCenterXYChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
120
        {
121
            var instance = (CircleControl)sender;
122
            if (e.OldValue != e.NewValue && instance.Base_CirclePath != null)
123
            {
124
                instance.SetValue(e.Property, e.NewValue);
125
                instance.SetCircle();
126
            }
127
        }
128

    
129

    
130
        public static void AngleValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
131
        {
132
            var instance = (CircleControl)sender;
133
            if (e.OldValue != e.NewValue && instance.Base_CirclePath != null)
134
            {
135
                instance.SetValue(e.Property, e.NewValue);
136
                instance.SetCircle();
137
            }
138
        }
139
        #endregion
140
        #region Properties
141
        public string UserID
142
        {
143
            get { return (string)GetValue(UserIDProperty); }
144
            set
145
            {
146
                if (this.UserID != value)
147
                {
148
                    SetValue(UserIDProperty, value);
149
                    OnPropertyChanged("UserID");
150
                }
151
            }
152
        }
153
        public MouseMode mousemode
154
        {
155
            get
156
            {
157
                return (MouseMode)GetValue(mousemodeProperty);
158
            }
159
            set
160
            {
161
                SetValue(mousemodeProperty, value);
162
                OnPropertyChanged("mousemode");
163
            }
164
        }
165

    
166
        public Double LineSize
167
        {
168
            get { return (Double)GetValue(LineSizeProperty); }
169
            set
170
            {
171
                if (this.LineSize != value)
172
                {
173
                    SetValue(LineSizeProperty, value);
174
                }
175
            }
176
        }
177
        public DoubleCollection DashSize
178
        {
179
            get { return (DoubleCollection)GetValue(DashSizeProperty); }
180
            set
181
            {
182
                if (this.DashSize != value)
183
                {
184
                    SetValue(DashSizeProperty, value);
185
                }
186
            }
187
        }
188
        public SolidColorBrush FillColor
189
        {
190
            get { return (SolidColorBrush)GetValue(FillColorProperty); }
191
            set
192
            {
193
                if (this.FillColor != value)
194
                {
195
                    SetValue(FillColorProperty, value);
196
                }
197
            }
198
        }
199
        public Point TopRightPoint
200
        {
201
            get { return (Point)GetValue(TopRightPointProperty); }
202
            set
203
            {
204
                SetValue(TopRightPointProperty, value);
205
                OnPropertyChanged("TopRightPoint");
206
            }
207
        }
208
        public Point LeftBottomPoint
209
        {
210
            get { return (Point)GetValue(LeftBottomPointProperty); }
211
            set
212
            {
213
                SetValue(LeftBottomPointProperty, value);
214
                OnPropertyChanged("LeftBottomPoint");
215
            }
216
        }
217
        public override SolidColorBrush StrokeColor
218
        {
219
            get { return (SolidColorBrush)GetValue(StrokeColorProperty); }
220
            set
221
            {
222
                if (this.StrokeColor != value)
223
                {
224
                    SetValue(StrokeColorProperty, value);
225
                }
226
            }
227
        }
228
        public Geometry PathData
229
        {
230
            get { return (Geometry)GetValue(PathDataProperty); }
231
            set { SetValue(PathDataProperty, value); }
232
        }
233

    
234
        public Geometry OverViewPathData
235
        {
236
            get
237
            {
238
                return (Geometry)GetValue(OverViewPathDataProperty);
239
            }
240
            set
241
            {
242
                SetValue(OverViewPathDataProperty, value);
243
                OnPropertyChanged("OverViewPathData");
244
            }
245
        }
246
        public PaintSet Paint
247
        {
248
            get { return (PaintSet)GetValue(PaintProperty); }
249
            set
250
            {
251
                if (this.Paint != value)
252
                {
253
                    SetValue(PaintProperty, value);
254
                }
255
            }
256
        }
257
        public Point EndPoint
258
        {
259
            get { return (Point)GetValue(EndPointProperty); }
260
            set { SetValue(EndPointProperty, value); }
261
        }
262
        public Point StartPoint
263
        {
264
            get { return (Point)GetValue(StartPointProperty); }
265
            set { SetValue(StartPointProperty, value); }
266
        }
267
        //public double CenterX
268
        //{
269
        //    get { return (double)GetValue(CenterXProperty); }
270
        //    set { SetValue(CenterXProperty, value); }
271
        //}
272
        //public double CenterY
273
        //{
274
        //    get { return (double)GetValue(CenterYProperty); }
275
        //    set { SetValue(CenterYProperty, value); }
276
        //}
277
        public double AngleValue
278
        {
279
            get { return (double)GetValue(AngleProperty); }
280
            set { SetValue(AngleProperty, value); }
281
        }
282
        public override double CommentAngle
283
        {
284
            get { return (double)GetValue(AngleProperty); }
285
            set
286
            {
287
                if (this.CommentAngle != value)
288
                {
289
                    SetValue(AngleProperty, value);
290
                }
291
            }
292
        }
293
        public List<Point> PointSet
294
        {
295
            get { return (List<Point>)GetValue(PointSetProperty); }
296
            set { SetValue(PointSetProperty, value); }
297
        }
298

    
299
        public override bool IsSelected
300
        {
301
            get
302
            {
303
                return (bool)GetValue(IsSelectedProperty);
304
            }
305
            set
306
            {
307
                SetValue(IsSelectedProperty, value);
308
            }
309
        }
310

    
311
        public override ControlType ControlType
312
        {
313
            get
314
            {
315
                return (ControlType)GetValue(ControlTypeProperty);
316
            }
317
            set
318
            {
319
                SetValue(ControlTypeProperty, value);
320
            }
321
        }
322

    
323
        public double CenterX
324
        {
325
            get { return (double)GetValue(CenterXProperty); }
326
            set { SetValue(CenterXProperty, value); }
327
        }
328
        public double CenterY
329
        {
330
            get { return (double)GetValue(CenterYProperty); }
331
            set { SetValue(CenterYProperty, value); }
332
        }
333
        #endregion
334
        #region Object & Variable
335
        EllipseGeometry instance = new EllipseGeometry();
336
        GeometryGroup CircleGroup = new GeometryGroup();
337

    
338
        #endregion
339
        public override void OnApplyTemplate()
340
        {
341
            base.OnApplyTemplate();
342
            Base_CirclePath = GetTemplateChild(PART_CirclePath) as Path;
343

    
344
            if (Base_CirclePath == null)
345
            {
346
                return;
347
            }
348
            this.SetCircle();
349
        }
350
        public void Dispose()
351
        {
352
            //GC.Collect();
353
            ////GC.SuppressFinalize(this);
354
            this.Base_CirclePath = null;
355
        }
356

    
357
        public event PropertyChangedEventHandler PropertyChanged;
358
        protected void OnPropertyChanged(string propName)
359
        {
360
            if (PropertyChanged != null)
361
                PropertyChanged(this, new PropertyChangedEventArgs(propName));
362
        }
363
        
364
        /// <summary>
365
        /// Circle을 생성한다.
366
        /// </summary>
367
        private void SetCircle()
368
        {
369
            Base_CirclePath.StrokeDashArray.Clear();
370
            foreach (var item in this.DashSize)
371
            {
372
                Base_CirclePath.StrokeDashArray.Add(item);
373
            }
374
            Base_CirclePath.StrokeDashCap = PenLineCap.Square;
375

    
376
            Point middle = MathSet.getMiddlePoint(this.EndPoint, this.StartPoint);
377

    
378
            instance.RadiusX = (MathSet.DistanceTo(this.LeftBottomPoint, this.EndPoint) * 0.5);
379
            instance.RadiusY = (MathSet.DistanceTo(this.EndPoint, this.TopRightPoint) * 0.5);
380
            instance.Center = middle;
381
            #region 회전 적용
382
            var rot = new RotateTransform(this.CommentAngle, middle.X, middle.Y);
383
            instance.Transform = rot;
384
            #endregion
385

    
386
            switch (this.Paint)
387
            {
388
                case PaintSet.None:
389
                    this.FillColor = null;
390
                    Base_CirclePath.Fill = this.FillColor;
391
                    break;
392
                case PaintSet.Fill:
393
                    this.FillColor = this.StrokeColor;
394
                    Base_CirclePath.Fill = this.FillColor;
395
                    break;
396
                case PaintSet.Hatch:
397
                    Base_CirclePath.Fill = HatchMake.CreateHatchBrush(this.StrokeColor);
398
                    break;
399
                default:
400
                    break;
401
            }
402

    
403
            CircleGroup.Children.Clear();
404
            CircleGroup.FillRule = FillRule.Nonzero;
405
            CircleGroup.Children.Add(instance);
406

    
407
            try
408
            {                
409
                this.Width = Math.Abs(this.CircleGroup.Bounds.Right + (this.LineSize * 0.5));
410
                this.Height = Math.Abs(this.CircleGroup.Bounds.Bottom + +(this.LineSize * 0.5)); 
411
            }
412
            catch (Exception)
413
            {
414
                
415
            } 
416

    
417
            CenterX = Math.Abs(this.CircleGroup.Bounds.X / 2);
418
            CenterY = Math.Abs(this.CircleGroup.Bounds.Y / 2);
419
            this.PathData = CircleGroup;
420
            ApplyOverViewData();
421
        }
422

    
423
        public override void UpdateControl()
424
        {
425
            if (this.PointSet.Any())
426
            {
427
                this.StartPoint = new Point(this.PointSet[0].X, this.PointSet[0].Y);
428
                this.LeftBottomPoint = new Point(this.PointSet[1].X, this.PointSet[1].Y);
429
                this.TopRightPoint = new Point(this.PointSet[3].X, this.PointSet[3].Y);
430
                this.EndPoint = new Point(this.PointSet[2].X, this.PointSet[2].Y);
431
            }
432
        }
433

    
434
        public void SetCenterXY()
435
        {
436
            CenterX = MathSet.getMiddlePoint(this.StartPoint, this.EndPoint).X;
437
            CenterY = MathSet.getMiddlePoint(this.StartPoint, this.EndPoint).Y;
438
        }
439

    
440
        public override void ApplyOverViewData()
441
        {
442
            this.OverViewPathData = this.PathData;
443
        }
444

    
445
        public void ChangePaint(PaintSet state)
446
        {
447
            this.Paint = state;
448
            this.SetCircle();
449
        }
450

    
451
        /// <summary>
452
        /// call when mouse is moving while drawing control
453
        /// </summary>
454
        /// <param name="pt"></param>
455
        /// <param name="bAxisLocked"></param>
456
        public override void OnCreatingMouseMove(Point pt, bool bAxisLocked)
457
        {
458
            this.EndPoint = bAxisLocked ? this.GetSquareEndPoint(this.StartPoint, pt) : pt;
459
            this.LeftBottomPoint = new Point(this.StartPoint.X, this.EndPoint.Y);
460
            this.TopRightPoint = new Point(this.EndPoint.X, this.StartPoint.Y);
461

    
462
            this.PointSet = new List<Point>
463
            {
464
                this.StartPoint,
465
                this.LeftBottomPoint,
466
                this.EndPoint,
467
                this.TopRightPoint,
468
            };
469
        }
470

    
471
        /// <summary>
472
        /// move control point has same location of given pt along given delta
473
        /// </summary>
474
        /// <author>humkyung</author>
475
        /// <date>2019.06.20</date>
476
        /// <param name="pt"></param>
477
        /// <param name="dx"></param>
478
        /// <param name="dy"></param>
479
        public override void OnMoveCtrlPoint(Point pt, double dx, double dy, bool bAxisLocked = false)
480
        {
481
            IPath path = (this as IPath);
482
            Point selected = MathSet.getNearPoint(path.PointSet, pt);
483
            selected.X += dx;
484
            selected.Y += dy;
485
            int i = 0;
486
            for (i = 0; i < (this as IPath).PointSet.Count; i++)
487
            {
488
                if (pt.Equals((this as IPath).PointSet[i]))
489
                {
490
                    (this as IPath).PointSet[i] = selected;
491
                    break;
492
                }
493
            }
494

    
495
            List<Point> newPointSet = new List<Point> { };
496
            Point middle = new Point(path.PathData.Bounds.X + path.PathData.Bounds.Width * 0.5, path.PathData.Bounds.Y + path.PathData.Bounds.Height * 0.5);
497
            foreach (Point _pt in path.PointSet)
498
            {
499
                newPointSet.Add(_pt);
500
            }
501
            var OppositeP = (i + newPointSet.Count / 2) % newPointSet.Count;
502
            var PreviousP = (i + (newPointSet.Count - 1)) % newPointSet.Count;
503
            var NextP = (i + 1) % newPointSet.Count;
504
            if (bAxisLocked)
505
            {
506
                double _dx = path.PointSet[i].X - path.PointSet[OppositeP].X;
507
                double _dy = path.PointSet[i].Y - path.PointSet[OppositeP].Y;
508
                double distance = Math.Max(Math.Abs(_dx), Math.Abs(_dy));
509

    
510
                var PreviousV = path.PointSet[PreviousP] - path.PointSet[OppositeP];
511
                PreviousV.Normalize();
512
                path.PointSet[PreviousP] = path.PointSet[OppositeP] + PreviousV * distance;
513

    
514
                var NextV = path.PointSet[NextP] - path.PointSet[OppositeP];
515
                NextV.Normalize();
516
                path.PointSet[NextP] = path.PointSet[OppositeP] + NextV * distance;
517

    
518
                path.PointSet[i] = path.PointSet[OppositeP] + PreviousV * distance + NextV * distance;
519
            }
520
            else
521
            {
522
                var PreviousV = MathSet.GetNormVectorBetween(newPointSet[OppositeP], newPointSet[PreviousP]);
523
                var l = MathSet.DotProduct(PreviousV.X, PreviousV.Y, newPointSet[i].X - newPointSet[OppositeP].X,
524
                    newPointSet[i].Y - newPointSet[OppositeP].Y);
525

    
526
                Point pPrevious = new Point(newPointSet[OppositeP].X + PreviousV.X * l, newPointSet[OppositeP].Y
527
                    + PreviousV.Y * l);
528

    
529
                if (newPointSet.FindAll(x => x.Equals(pPrevious)).Count() == 0)
530
                {
531
                    newPointSet[PreviousP] = pPrevious;
532
                }
533

    
534
                var NextV = MathSet.GetNormVectorBetween(newPointSet[OppositeP], newPointSet[NextP]);
535
                l = MathSet.DotProduct(NextV.X, NextV.Y, newPointSet[i].X - newPointSet[OppositeP].X, newPointSet[i].Y
536
                    - newPointSet[OppositeP].Y);
537

    
538
                Point pNext = new Point(newPointSet[OppositeP].X + NextV.X * l, newPointSet[OppositeP].Y + NextV.Y * l);
539

    
540
                if (newPointSet.FindAll(x => x.Equals(pNext)).Count() == 0)
541
                {
542
                    newPointSet[NextP] = pNext;
543
                }
544

    
545
                path.PointSet = newPointSet;
546
            }
547

    
548
            this.UpdateControl();
549
        }
550

    
551
        /// <summary>
552
        /// return circlecontrols' area
553
        /// </summary>
554
        /// <author>humkyung</author>
555
        /// <date>2019.06.13</date>
556
        public override Rect ItemRect
557
        {
558
            get
559
            {
560
                double dMinX = Math.Min(this.StartPoint.X, this.EndPoint.X);
561
                double dMinY = Math.Min(this.StartPoint.Y, this.EndPoint.Y);
562
                double dMaxX = Math.Max(this.StartPoint.X, this.EndPoint.X);
563
                double dMaxY = Math.Max(this.StartPoint.Y, this.EndPoint.Y);
564

    
565
                return new Rect(new Point(dMinX, dMinY), new Point(dMaxX, dMaxY));
566
            }
567
        }
568

    
569
        /// <summary>
570
        /// Serialize this
571
        /// </summary>
572
        /// <param name="sUserId"></param>
573
        /// <returns></returns>
574
        public override string Serialize()
575
        {
576
            using (S_CircleControl STemp = new S_CircleControl())
577
            {
578
                STemp.TransformPoint = "0|0";
579
                STemp.SizeSet = String.Format("{0}", this.LineSize);
580
                STemp.PaintState = this.Paint;
581
                //STemp.StrokeColor = "#FF00FF00";
582
                STemp.StrokeColor = this.StrokeColor.Color.ToString();
583
                if (this.FillColor != null)
584
                {
585
                    STemp.FillColor = this.FillColor.Color.ToString();
586
                }
587
                STemp.StartPoint = this.StartPoint;
588
                STemp.UserID = this.UserID;
589
                STemp.EndPoint = this.EndPoint;
590
                STemp.TRP = this.TopRightPoint;
591
                STemp.LBP = this.LeftBottomPoint;
592
                STemp.Opac = this.Opacity;
593
                STemp.Angle = this.CommentAngle;
594
                STemp.PointSet = this.PointSet;
595
                STemp.DashSize = this.DashSize;
596
                STemp.Name = this.GetType().Name.ToString();
597
                ///강인구 추가(2017.11.02)
598
                ///Memo 추가
599
                STemp.Memo = this.Memo;
600

    
601
                return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
602
            };
603
        }
604

    
605
        /// <summary>
606
        /// create a circlecontrol from given string
607
        /// </summary>
608
        /// <param name="str"></param>
609
        /// <returns></returns>
610
        public static CircleControl FromString(string str, SolidColorBrush brush, string sProjectNo)
611
        {
612
            using (S_CircleControl s = JsonSerializerHelper.JsonDeserialize<S_CircleControl>(str))
613
            {
614
                string[] data2 = s.SizeSet.Split(CommentUserInfo.delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
615
                return new CircleControl
616
                {
617
                    LineSize = Convert.ToDouble(data2.First()),
618
                    Paint = s.PaintState,
619
                    StartPoint = s.StartPoint,
620
                    EndPoint = s.EndPoint,
621
                    LeftBottomPoint = s.LBP,
622
                    TopRightPoint = s.TRP,
623
                    Opacity = s.Opac,
624
                    CommentAngle = s.Angle,
625
                    DashSize = s.DashSize,
626
                    PointSet = s.PointSet,
627
                    StrokeColor = brush,
628
                    UserID = s.UserID,
629
                    Memo = s.Memo
630
                };
631
            }
632
        }
633
    }
634
}
클립보드 이미지 추가 (최대 크기: 500 MB)