프로젝트

일반

사용자정보

개정판 661b7416

ID661b7416598de29c8ba957a702c8b0b2135eda3f
상위 8c66babd
하위 5529d2a2

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

issue #999: Add FromString to all of controls

Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a

차이점 보기:

MarkupToPDF/Controls/Line/ArrowArcControl.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.Line
19 20
{
......
498 499
                return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
499 500
            }
500 501
        }
502

  
503
        /// <summary>
504
        /// create a arrowarccontrol from given string
505
        /// </summary>
506
        /// <param name="str"></param>
507
        /// <returns></returns>
508
        public static ArrowArcControl FromString(string str, SolidColorBrush brush, string sProjectNo)
509
        {
510
            ArrowArcControl instance = null;
511
            using (S_ArrowArcControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowArcControl>(str))
512
            {
513
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
514
                instance = new ArrowArcControl()
515
                {
516
                    StartPoint = s.StartPoint,
517
                    EndPoint = s.EndPoint,
518
                    DashSize = s.DashSize,
519
                    PointSet = s.PointSet,
520
                    isTransOn = s.IsTransOn,
521
                    MidPoint = s.MidPoint,
522
                    StrokeColor = brush,
523
                    Opacity = s.Opac,
524

  
525
                    Clock = s.Clock,
526
                    LineSize = Convert.ToDouble(data2.First()),
527
                    UserID = s.UserID,
528
                    Memo = s.Memo
529
                };
530
            }
531

  
532
            return instance;
533
        }
501 534
    }
502 535
}

내보내기 Unified diff

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