프로젝트

일반

사용자정보

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

markus / MarkupToPDF / Controls / Line / ArcControl.cs @ d5e3aa15

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

1
using System;
2
using System.Net;
3
using System.Windows;
4
using System.Windows.Controls;
5
using System.Windows.Documents;
6
using System.Windows.Ink;
7
using System.Windows.Input;
8
using System.Windows.Media;
9
using System.Windows.Media.Animation;
10
using System.Windows.Shapes;
11
using System.ComponentModel;
12
using System.Collections.Generic;
13
using MarkupToPDF.Controls.Common;
14
using MarkupToPDF.Common;
15
using MarkupToPDF.Serialize.S_Control;
16
using MarkupToPDF.Serialize.Core;
17
using System.Linq;
18

    
19
namespace MarkupToPDF.Controls.Line
20
{
21

    
22
    public class ArcControl : CommentUserInfo, IDisposable, INotifyPropertyChanged, IMarkupCommonData, IDashControl
23
    {
24
        #region 초기선언
25
        public event PropertyChangedEventHandler PropertyChanged;
26
        private const string PART_ArcPath = "PART_ArcPath";
27
        public Path Base_ArcPath = null;
28
        #endregion
29
        static ArcControl()
30
        {
31
            DefaultStyleKeyProperty.OverrideMetadata(typeof(ArcControl), new FrameworkPropertyMetadata(typeof(ArcControl)));
32
            //Application.Current.Resources.MergedDictionaries.Add(Application.LoadComponent(new Uri("/MarkupToPDF;Component/Themes/generic.xaml")) as ResourceDictionary);
33
            //ResourceDictionary dictionary = new ResourceDictionary();
34
            //dictionary.Source = new Uri("/MarkupToPDF;component/themes/generic.xaml", UriKind.RelativeOrAbsolute);
35
            //Application.Current.Resources.MergedDictionaries.Add(dictionary);
36
             //System.Diagnostics.Debug.WriteLine("resource Count :" + Application.Current.Resources.MergedDictionaries.Count);
37
        }
38

    
39
        public ArcControl()
40
        {
41
            //this.DefaultStyleKey = typeof(ArcControl);
42
        }
43

    
44
        public void Dispose()
45
        {
46
            //GC.Collect();
47
            //GC.SuppressFinalize(this);
48
            //Control control = new Control();
49
            this.Base_ArcPath = null;
50
        }
51
        protected void OnPropertyChanged(string propName)
52
        {
53
            if (PropertyChanged != null)
54
                PropertyChanged(this, new PropertyChangedEventArgs(propName));
55
        }
56

    
57
        #region Dependency Properties
58

    
59
        
60

    
61
        public static readonly DependencyProperty IsSelectedProperty =
62
    DependencyProperty.Register("IsSelected", typeof(bool), typeof(ArcControl), new FrameworkPropertyMetadata(false, IsSelectedChanged));
63

    
64
        public static readonly DependencyProperty ControlTypeProperty =
65
    DependencyProperty.Register("ControlType", typeof(ControlType), typeof(ArcControl), new FrameworkPropertyMetadata(ControlType.ArcLine));
66

    
67
        public static readonly DependencyProperty OverViewPathDataProperty = DependencyProperty.Register(
68
                "OverViewPathData", typeof(Geometry), typeof(ArcControl), new PropertyMetadata(null));
69

    
70
        public static readonly DependencyProperty UserIDProperty = DependencyProperty.Register(
71
                "UserID", typeof(string), typeof(ArcControl), new PropertyMetadata(null));
72
        public static readonly DependencyProperty LineSizeProperty = DependencyProperty.Register(
73
              "LineSize", typeof(double), typeof(ArcControl), new PropertyMetadata((Double)3));
74

    
75
//강인구 추가
76
        public static readonly DependencyProperty DashSizeProperty = DependencyProperty.Register(
77
              "DashSize", typeof(DoubleCollection), typeof(ArcControl), new PropertyMetadata(new DoubleCollection { 99999999 }, PointValueChanged));
78

    
79
        public static readonly DependencyProperty StrokeColorProperty = DependencyProperty.Register(
80
               "StrokeColor", typeof(SolidColorBrush), typeof(ArcControl), new PropertyMetadata(new SolidColorBrush(Colors.Red)));
81

    
82
        public static readonly DependencyProperty PathDataProperty = DependencyProperty.Register(
83
              "PathData", typeof(Geometry), typeof(ArcControl), null);
84

    
85
        //public static readonly DependencyProperty ClockProperty = DependencyProperty.Register(
86
        //       "Clock", typeof(SweepDirection), typeof(ArcControl), new PropertyMetadata(SweepDirection.Clockwise));
87
        public static readonly DependencyProperty ClockProperty = DependencyProperty.Register(
88
               "Clock", typeof(bool), typeof(ArcControl), new PropertyMetadata(false));
89

    
90
        public static readonly DependencyProperty StartPointProperty = DependencyProperty.Register(
91
               "StartPoint", typeof(Point), typeof(ArcControl), new PropertyMetadata(new Point(0, 0), PointValueChanged));
92
        public static readonly DependencyProperty MidPointProperty = DependencyProperty.Register(
93
               "MidPoint", typeof(Point), typeof(ArcControl), new PropertyMetadata(new Point(0, 0), PointValueChanged));
94

    
95
        public static readonly DependencyProperty EndPointProperty = DependencyProperty.Register(
96
               "EndPoint", typeof(Point), typeof(ArcControl), new PropertyMetadata(new Point(0, 0), PointValueChanged));
97
        
98
        public static readonly DependencyProperty PointSetProperty = DependencyProperty.Register(
99
                "PointSet", typeof(List<Point>), typeof(ArcControl), new PropertyMetadata(new List<Point>(), PointValueChanged));
100

    
101
        public static readonly DependencyProperty isTransOnProperty = DependencyProperty.Register(
102
                "isTransOn", typeof(bool), typeof(ArcControl), new PropertyMetadata(false));
103

    
104
        public static readonly DependencyProperty AngleProperty =
105
            DependencyProperty.Register("AngleValue", typeof(double), typeof(ArcControl), new PropertyMetadata((double)0.0, new PropertyChangedCallback
106
                (AngleValueChanged)));
107

    
108
        public static readonly DependencyProperty CenterXProperty =
109
            DependencyProperty.Register("CenterX", typeof(double), typeof(ArcControl), new PropertyMetadata((double)0, OnCenterXYChanged));
110

    
111
        public static readonly DependencyProperty CenterYProperty =
112
            DependencyProperty.Register("CenterY", typeof(double), typeof(ArcControl), new PropertyMetadata((double)0, OnCenterXYChanged));
113
        #endregion
114
        #region PropertyChanged Method
115
        
116
        public static void IsSelectedChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
117
        {
118
            //var instance = (ArcControl)sender;
119

    
120
            //if (e.OldValue != e.NewValue && instance.Base_ArcPath != null)
121
            //{
122

    
123
            //    instance.SetValue(e.Property, e.NewValue);
124

    
125
            //    if (instance.IsSelected)
126
            //    {
127
            //        instance.Base_ArcPath.Stroke = new SolidColorBrush(Colors.Blue);
128
            //    }
129
            //    else
130
            //    {
131
            //        instance.Base_ArcPath.Stroke = new SolidColorBrush(Colors.Red);
132
            //    }
133
            //}
134
        }
135

    
136

    
137
        public static void PointValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
138
        {
139
            var instance = (ArcControl)sender;
140
            if (e.OldValue != e.NewValue && instance.Base_ArcPath != null)
141
            {
142
                instance.SetValue(e.Property, e.NewValue);
143
                instance.SetArcPath();
144
            }
145
        }
146
        public static void AngleValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
147
        {
148
            var instance = (ArcControl)sender;
149
            if (e.OldValue != e.NewValue && instance.Base_ArcPath != null)
150
            {
151
                instance.SetValue(e.Property, e.NewValue);
152
                instance.SetArcPath();
153
            }
154
        }
155
        public static void OnCenterXYChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
156
        {
157
            var instance = (ArcControl)sender;
158
            if (e.OldValue != e.NewValue && instance.Base_ArcPath != null)
159
            {
160
                instance.SetValue(e.Property, e.NewValue);
161
                instance.SetArcPath();
162
            }
163
        }
164

    
165
      
166

    
167
        #endregion
168
        #region Properties
169
        public string UserID
170
        {
171
            get { return (string)GetValue(UserIDProperty); }
172
            set
173
            {
174
                if (this.UserID != value)
175
                {
176
                    SetValue(UserIDProperty, value);
177
                    OnPropertyChanged("UserID");
178
                }
179
            }
180
        }
181
        public Double LineSize
182
        {
183
            get { return (Double)GetValue(LineSizeProperty); }
184
            set
185
            {
186
                if (this.LineSize != value)
187
                {
188
                    SetValue(LineSizeProperty, value);
189
                }
190
            }
191
        }
192

    
193

    
194
        public bool Clock
195
        {
196
            get { return (bool)GetValue(ClockProperty); }
197
            set
198
            {
199
                if (this.Clock != value)
200
                {
201
                    SetValue(ClockProperty, value);
202
                    OnPropertyChanged("Clock");
203
                }
204
            }
205
        }
206

    
207
        //public SweepDirection Clock
208
        //{
209
        //    get { return (SweepDirection)GetValue(ClockProperty); }
210
        //    set
211
        //    {
212
        //        if (this.Clock != value)
213
        //        {
214
        //            SetValue(ClockProperty, value);
215
        //            OnPropertyChanged("Clock");
216
        //        }
217
        //    }
218
        //}
219
        public DoubleCollection DashSize
220
        {
221
            get { return (DoubleCollection)GetValue(DashSizeProperty); }
222
            set
223
            {
224
                if (this.DashSize != value)
225
                {
226
                    SetValue(DashSizeProperty, value);
227
                }
228
            }
229
        }
230
        public List<Point> PointSet
231
        {
232
            get { return (List<Point>)GetValue(PointSetProperty); }
233
            set { SetValue(PointSetProperty, value); }
234
        }
235
        public double CenterX
236
        {
237
            get { return (double)GetValue(CenterXProperty); }
238
            set { SetValue(CenterXProperty, value); }
239
        }
240
        public double CenterY
241
        {
242
            get { return (double)GetValue(CenterYProperty); }
243
            set { SetValue(CenterYProperty, value); }
244
        }
245
        public override SolidColorBrush StrokeColor
246
        {
247
            get { return (SolidColorBrush)GetValue(StrokeColorProperty); }
248
            set
249
            {
250
                if (this.StrokeColor != value)
251
                {
252
                    SetValue(StrokeColorProperty, value);
253
                }
254
            }
255
        }
256

    
257
        public Geometry OverViewPathData
258
        {
259
            get
260
            {
261
                return (Geometry)GetValue(OverViewPathDataProperty);
262
            }
263
            set
264
            {
265
                SetValue(OverViewPathDataProperty, value);
266
                OnPropertyChanged("OverViewPathData");
267
            }
268
        }
269

    
270
        public Geometry PathData
271
        {
272
            get { return (Geometry)GetValue(PathDataProperty); }
273
            set
274
            {
275
                SetValue(PathDataProperty, value);
276
                OnPropertyChanged("PathData");
277
            }
278
        }
279
        public override bool IsSelected
280
        {
281
            get
282
            {
283
                return (bool)GetValue(IsSelectedProperty);
284
            }
285
            set
286
            {
287
                SetValue(IsSelectedProperty, value);
288
            }
289
        }
290

    
291
        public override ControlType ControlType
292
        {
293
            get
294
            {
295
                return (ControlType)GetValue(ControlTypeProperty);
296
            }
297
            set
298
            {
299
                SetValue(ControlTypeProperty, value);
300
                OnPropertyChanged("ControlType");
301
            }
302
        }
303
        public double AngleValue
304
        {
305
            get { return (double)GetValue(AngleProperty); }
306
            set { SetValue(AngleProperty, value); }
307
        }
308

    
309

    
310
        // CommentUserInfo에서 상속받기때문에 제거.
311

    
312
        //public double Angle
313
        //{
314
        //    get { return (double)GetValue(AngleProperty); }
315
        //    set
316
        //    {
317
        //        if (this.Angle != value)
318
        //        {
319
        //            SetValue(AngleProperty, value);
320
        //        }
321
        //    }
322
        //}
323

    
324
        public Point EndPoint
325
        {
326
            get { return (Point)GetValue(EndPointProperty); }
327
            set
328
            {
329
                SetValue(EndPointProperty, value);
330
                OnPropertyChanged("EndPoint");
331
            }
332
        }
333
        public Point StartPoint
334
        {
335
            get { return (Point)GetValue(StartPointProperty); }
336
            set
337
            {
338
                SetValue(StartPointProperty, value);
339
                OnPropertyChanged("StartPoint");
340
            }
341
        }
342
        public Point MidPoint
343
        {
344
            get { return (Point)GetValue(MidPointProperty); }
345
            set
346
            {
347
                SetValue(MidPointProperty, value);
348
                OnPropertyChanged("MidPoint");
349
            }
350
        }
351
        public bool isTransOn
352
        {
353
            get { return (bool)GetValue(isTransOnProperty); }
354
            set
355
            {
356
                SetValue(isTransOnProperty, value);
357
                OnPropertyChanged("isTransOn");
358
            }
359
        }
360

    
361
        #endregion
362
        #region Object & Variable
363
        PathGeometry pathGeometry = new PathGeometry();
364
        GeometryGroup instanceGroup = new GeometryGroup();
365
        #endregion
366
        public override void OnApplyTemplate()
367
        {
368
            base.OnApplyTemplate();
369
            Base_ArcPath = GetTemplateChild(PART_ArcPath) as Path;
370
            SetArcPath();
371
        }
372

    
373
        public override void UpdateControl()
374
        {
375
            this.StartPoint = new Point(this.PointSet[0].X, this.PointSet[0].Y);
376
            this.MidPoint = new Point(this.PointSet[1].X, this.PointSet[1].Y);
377
            this.EndPoint = new Point(this.PointSet[2].X, this.PointSet[2].Y);
378
        }
379

    
380
        public void setClock()
381
        {
382
            if (Clock)
383
            {
384
                this.Clock = false;
385
            }
386
            else
387
            {
388
                this.Clock = true;
389
            }
390
        }
391

    
392
        //public void setClock()
393
        //{
394
        //    if(this.Clock == SweepDirection.Clockwise)
395
        //    {
396
        //        this.Clock = SweepDirection.Counterclockwise;
397
        //    }
398
        //    else
399
        //    {
400
        //        this.Clock =SweepDirection.Clockwise;
401
        //    }
402
        //}
403
        private void SetArcPath()
404
        {
405
            this.ApplyTemplate();
406

    
407

    
408
            //강인구 추가
409
            Base_ArcPath.StrokeDashArray.Clear();
410
            foreach (var item in this.DashSize)
411
            {
412
                Base_ArcPath.StrokeDashArray.Add(item);
413
            }
414
            instanceGroup.Children.Clear();
415

    
416

    
417
            PathFigure pathFigure = new PathFigure();
418

    
419
            pathFigure.StartPoint = this.StartPoint;
420
            QuadraticBezierSegment qb = new QuadraticBezierSegment();
421

    
422

    
423
          
424

    
425

    
426
            
427
            
428

    
429

    
430
            if (MidPoint != null)
431
            {
432
                if (MidPoint == new Point(0,0))
433
                {
434
                    double xSharp = 0;
435
                    double ySharp = 0;
436

    
437
                    //Point t_start = new Point(0, 0);
438
                    //Point t_end = new Point(30, 10);
439

    
440
                    var midP = MathSet.getMiddlePoint(StartPoint, EndPoint);
441
                    Point normalV = MathSet.GetNormVectorBetween(StartPoint, EndPoint);
442
                    var dis = MathSet.DistanceTo(StartPoint, EndPoint);
443

    
444
                    if (!this.Clock)
445
                    {
446
                        xSharp = -normalV.Y;
447
                        ySharp = normalV.X;
448
                    }
449
                    else
450
                    {
451
                        xSharp = normalV.Y;
452
                        ySharp = -normalV.X;
453
                    }
454

    
455
                    var pointN = new Point(xSharp * dis, ySharp * dis);
456
                    MidPoint = new Point(pointN.X + midP.X, pointN.Y + midP.Y);
457
                }
458
                ////System.Diagnostics.Debug.WriteLine(this.MidPoint.ToString());
459
                //qb.Point1 = new Point(200, 200);
460
                //qb.Point1 = this.MidPoint;
461
                qb.Point1 = this.MidPoint;
462
            }
463

    
464
            qb.Point2 = this.EndPoint;
465
            pathFigure.Segments.Add(qb);
466
            pathGeometry.Figures = new PathFigureCollection();
467
            pathGeometry.Figures.Add(pathFigure);
468
            pathFigure.IsFilled = false;
469
            pathFigure.IsClosed = false;
470
            instanceGroup.Children.Add(pathGeometry);
471

    
472
            //Arc Arrow
473
            //if(ControlType == ControlType.ArcArrow)
474
            if (isTransOn)
475
            {
476
                //isTransOn = true;
477
                instanceGroup.Children.Add(DrawSet.DrawArrow(this.MidPoint, this.StartPoint, this.LineSize));
478
                instanceGroup.Children.Add(DrawSet.DrawArrow(this.EndPoint, this.MidPoint, this.LineSize));
479
                this.Base_ArcPath.Fill = this.StrokeColor;
480
            }
481
            //Base_ArcPath.StrokeThickness = 3;
482

    
483
            instanceGroup.FillRule = FillRule.Nonzero;
484
            this.PathData = instanceGroup;
485
            this.OverViewPathData = PathData;
486

    
487
        }
488

    
489
        public static PathGeometry ConverseAllow(Point p2, Point p1, double lineSize)
490
        {
491
            double theta = Math.Atan2((p2.Y - p1.Y), (p2.X - p1.X)) * 180 / Math.PI;
492
            PathGeometry pathGeometry2 = new PathGeometry();
493
            PathFigure pathFigure2 = new PathFigure();
494
            pathFigure2.StartPoint = p2;
495

    
496
            Point lpoint2 = new Point(p2.X + lineSize * 2, p2.Y + lineSize * 4);
497
            Point rpoint2 = new Point(p2.X - lineSize * 2, p2.Y + lineSize * 4);
498
            LineSegment seg1_1 = new LineSegment();
499
            seg1_1.Point = lpoint2;
500
            pathFigure2.Segments.Add(seg1_1);
501

    
502
            LineSegment seg2_1 = new LineSegment();
503
            seg2_1.Point = rpoint2;
504
            pathFigure2.Segments.Add(seg2_1);
505

    
506
            LineSegment seg3_1 = new LineSegment();
507
            seg3_1.Point = p2;
508
            pathFigure2.Segments.Add(seg3_1);
509

    
510
            LineSegment seg4_1 = new LineSegment();
511

    
512
            seg4_1.Point = new Point(lpoint2.X, lpoint2.Y);
513
            pathFigure2.Segments.Add(seg4_1);
514

    
515
            //pathFigure2.IsFilled = true;
516
            //pathFigure2.IsClosed = true;
517

    
518
            RotateTransform transform2 = new RotateTransform();
519
            transform2.Angle = theta + 90;
520
            transform2.CenterX = p2.X;
521
            transform2.CenterY = p2.Y;
522
            pathGeometry2.Figures.Add(pathFigure2);
523
            pathGeometry2.Transform = transform2;
524
            return pathGeometry2;
525
        }
526

    
527
        public override void ApplyOverViewData()
528
        {
529
            this.OverViewPathData = this.PathData;
530
        }
531

    
532
        /// <summary>
533
        /// call when mouse is moving while drawing control
534
        /// </summary>
535
        /// <author>humkyung</author>
536
        /// <param name="pt"></param>
537
        /// <param name="bAxisLocked"></param>
538
        public override void OnCreatingMouseMove(Point pt, bool bAxisLocked, bool bShiftKeyPressed)
539
        {
540
            this.isTransOn = false;
541
            this.EndPoint = pt;
542
            this.MidPoint = new Point(0, 0);
543

    
544
            Point tmp = this.EndPoint;
545
            Angle = MathSet.returnAngle(this.StartPoint, ref tmp, bShiftKeyPressed);
546

    
547
            if (bAxisLocked || bShiftKeyPressed)
548
            {
549
                this.EndPoint = tmp;
550
            }
551

    
552
            this.PointSet = new List<Point>
553
            {
554
                this.StartPoint,
555
                this.MidPoint,
556
                this.EndPoint,
557
            };
558
        }
559

    
560
        /// <summary>
561
        /// move control point has same location of given pt along given delta
562
        /// </summary>
563
        /// <author>humkyung</author>
564
        /// <date>2019.06.20</date>
565
        /// <param name="pt"></param>
566
        /// <param name="dx"></param>
567
        /// <param name="dy"></param>
568
        public override void OnMoveCtrlPoint(Point pt, double dx, double dy)
569
        {
570
            Point selected = MathSet.getNearPoint((this as IPath).PointSet, pt);
571
            selected.X += dx;
572
            selected.Y += dy;
573
            for (int i = 0; i < (this as IPath).PointSet.Count; i++)
574
            {
575
                if (pt.Equals((this as IPath).PointSet[i]))
576
                {
577
                    (this as IPath).PointSet[i] = selected;
578
                }
579
            }
580
            this.UpdateControl();
581
        }
582

    
583
        /// <summary>
584
        /// return Arc's area
585
        /// </summary>
586
        /// <author>humkyung</author>
587
        /// <date>2019.06.13</date>
588
        public override Rect ItemRect
589
        {
590
            get
591
            {
592
                double dMinX = Math.Min(this.StartPoint.X, this.EndPoint.X);
593
                dMinX = Math.Min(this.MidPoint.X, dMinX);
594
                double dMinY = Math.Min(this.StartPoint.Y, this.EndPoint.Y);
595
                dMinY = Math.Min(this.MidPoint.Y, dMinY);
596
                double dMaxX = Math.Max(this.StartPoint.X, this.EndPoint.X);
597
                dMaxX = Math.Max(this.MidPoint.X, dMaxX);
598
                double dMaxY = Math.Max(this.StartPoint.Y, this.EndPoint.Y);
599
                dMaxY = Math.Max(this.MidPoint.Y, dMaxY);
600

    
601
                return new Rect(new Point(dMinX, dMinY), new Point(dMaxX, dMaxY));
602
            }
603
        }
604

    
605
        /// <summary>
606
        /// Serialize this
607
        /// </summary>
608
        /// <param name="sUserId"></param>
609
        /// <returns></returns>
610
        public override string Serialize()
611
        {
612
            using (S_ArcControl STemp = new S_ArcControl())
613
            {
614
                STemp.TransformPoint = "0|0";
615
                STemp.PointSet = this.PointSet;
616
                STemp.SizeSet = String.Format("{0}", this.LineSize);
617
                //STemp.StrokeColor = "#FF000FFF";
618
                STemp.StrokeColor = this.StrokeColor.Color.ToString();
619
                STemp.StartPoint = this.StartPoint;
620
                STemp.UserID = this.UserID;
621
                STemp.Opac = this.Opacity;
622
                STemp.MidPoint = this.MidPoint;
623
                STemp.EndPoint = this.EndPoint;
624
                STemp.IsTransOn = this.isTransOn;
625
                STemp.DashSize = this.DashSize;
626
                STemp.Clock = this.Clock;
627
                //STemp.ArcStyleSet = instance.ControlType;
628
                STemp.Name = this.GetType().Name.ToString();
629

    
630
                ///강인구 추가(2017.11.02)
631
                ///Memo 추가
632
                STemp.Memo = this.Memo;
633

    
634
                return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
635
            }
636
        }
637

    
638
        /// <summary>
639
        /// create a arccontrol from given string
640
        /// </summary>
641
        /// <param name="str"></param>
642
        /// <returns></returns>
643
        public static ArcControl FromString(string str, SolidColorBrush brush, string sProjectNo)
644
        {
645
            ArcControl instance = null;
646
            using (S_ArcControl s = JsonSerializerHelper.JsonDeserialize<S_ArcControl>(str))
647
            {
648
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
649
                instance = new ArcControl()
650
                {
651
                    StartPoint = s.StartPoint,
652
                    EndPoint = s.EndPoint,
653
                    DashSize = s.DashSize,
654
                    PointSet = s.PointSet,
655
                    isTransOn = s.IsTransOn,
656
                    MidPoint = s.MidPoint,
657
                    StrokeColor = brush,
658
                    Opacity = s.Opac,
659
                    Clock = s.Clock,
660
                    LineSize = Convert.ToDouble(data2.First()),
661
                    UserID = s.UserID,
662
                    Memo = s.Memo
663
                };
664
            }
665

    
666
            return instance;
667
        }
668
    }
669
}
클립보드 이미지 추가 (최대 크기: 500 MB)