프로젝트

일반

사용자정보

개정판 661b7416

ID661b7416598de29c8ba957a702c8b0b2135eda3f
상위 8c66babd
하위 5529d2a2

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

issue #999: Add FromString to all of controls

Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a

차이점 보기:

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

  
18 19
namespace MarkupToPDF.Controls.Shape
19 20
{
......
381 382
            //}
382 383
        }
383 384

  
384
        public void SetRectCloud()
385
        private void SetRectCloud()
385 386
        {
386 387
            this.ApplyTemplate();
387 388
            PathFigure pathFigure = new PathFigure();
......
590 591
                return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
591 592
            }
592 593
        }
594

  
595
        /// <summary>
596
        /// create a rectcloudcontrol from given string
597
        /// </summary>
598
        /// <param name="str"></param>
599
        /// <returns></returns>
600
        public static RectCloudControl FromString(string str, SolidColorBrush brush, string sProjectNo)
601
        {
602
            using (S_RectCloudControl s = JsonSerializerHelper.JsonDeserialize<S_RectCloudControl>(str))
603
            {
604
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
605
                return new RectCloudControl()
606
                {
607
                    StartPoint = s.StartPoint,
608
                    EndPoint = s.EndPoint,
609
                    LeftBottomPoint = s.LB,
610
                    Paint = s.PaintState,
611
                    Opacity = s.Opac,
612
                    DashSize = s.DashSize,
613
                    TopRightPoint = s.TR,
614
                    PointSet = s.PointSet,
615
                    StrokeColor = brush,
616
                    ArcLength = s.ArcLength,
617
                    LineSize = Convert.ToDouble(data2.First()),
618
                    UserID = s.UserID,
619
                    Memo = s.Memo
620
                };
621
            }
622
        }
593 623
    }
594 624
}

내보내기 Unified diff

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