프로젝트

일반

사용자정보

개정판 661b7416

ID661b7416598de29c8ba957a702c8b0b2135eda3f
상위 8c66babd
하위 5529d2a2

백흠경이(가) 5년 이상 전에 추가함

issue #999: Add FromString to all of controls

Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a

차이점 보기:

MarkupToPDF/Controls/Line/ArcControl.cs
14 14
using MarkupToPDF.Common;
15 15
using MarkupToPDF.Serialize.S_Control;
16 16
using MarkupToPDF.Serialize.Core;
17
using System.Linq;
17 18

  
18 19
namespace MarkupToPDF.Controls.Line
19 20
{
......
392 393
        //        this.Clock =SweepDirection.Clockwise;
393 394
        //    }
394 395
        //}
395
        public void SetArcPath()
396
        private void SetArcPath()
396 397
        {
397 398
            this.ApplyTemplate();
398 399

  
......
553 554
                return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
554 555
            }
555 556
        }
557

  
558
        /// <summary>
559
        /// create a arccontrol from given string
560
        /// </summary>
561
        /// <param name="str"></param>
562
        /// <returns></returns>
563
        public static ArcControl FromString(string str, SolidColorBrush brush, string sProjectNo)
564
        {
565
            ArcControl instance = null;
566
            using (S_ArcControl s = JsonSerializerHelper.JsonDeserialize<S_ArcControl>(str))
567
            {
568
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
569
                instance = new ArcControl()
570
                {
571
                    StartPoint = s.StartPoint,
572
                    EndPoint = s.EndPoint,
573
                    DashSize = s.DashSize,
574
                    PointSet = s.PointSet,
575
                    isTransOn = s.IsTransOn,
576
                    MidPoint = s.MidPoint,
577
                    StrokeColor = brush,
578
                    Opacity = s.Opac,
579
                    Clock = s.Clock,
580
                    LineSize = Convert.ToDouble(data2.First()),
581
                    UserID = s.UserID,
582
                    Memo = s.Memo
583
                };
584
            }
585

  
586
            return instance;
587
        }
556 588
    }
557 589
}

내보내기 Unified diff

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