프로젝트

일반

사용자정보

개정판 661b7416

ID661b7416598de29c8ba957a702c8b0b2135eda3f
상위 8c66babd
하위 5529d2a2

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

issue #999: Add FromString to all of controls

Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a

차이점 보기:

MarkupToPDF/Controls/Shape/RectangleControl.cs
423 423
        }
424 424
        #endregion Dependency PropertyChanged
425 425

  
426
        public void SetRectPath()
426
        private void SetRectPath()
427 427
        {
428 428
            this.ApplyTemplate();
429 429

  
......
584 584
            };
585 585
        }
586 586

  
587
        /// <summary>
588
        /// create a rectanglecontrol from given string
589
        /// </summary>
590
        /// <param name="item"></param>
591
        /// <returns></returns>
592
        public static RectangleControl FromString(string str, SolidColorBrush brush, string sProjectNo)
593
        {
594
            using (S_RectControl s = JsonSerializerHelper.JsonDeserialize<S_RectControl>(str))
595
            {
596
                string[] data2 = s.SizeSet.Split(CommentUserInfo.delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
597
                return new RectangleControl
598
                {
599
                    LineSize = Convert.ToDouble(data2.First()),
600
                    Paint = s.PaintState,
601
                    StartPoint = s.StartPoint,
602
                    EndPoint = s.EndPoint,
603
                    Angle = s.Angle,
604
                    StrokeColor = brush,
605
                    DashSize = s.DashSize,
606
                    Opacity = s.Opac,
607
                    LeftBottomPoint = s.LB,
608
                    TopRightPoint = s.TR,
609
                    PointSet = s.PointSet,
610
                    UserID = s.UserID,
611
                    Memo = s.Memo
612
                };
613
            }
614
        }
615

  
587 616
        public void Dispose()
588 617
        {
589 618
            GC.Collect();

내보내기 Unified diff

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