프로젝트

일반

사용자정보

개정판 661b7416

ID661b7416598de29c8ba957a702c8b0b2135eda3f
상위 8c66babd
하위 5529d2a2

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

issue #999: Add FromString to all of controls

Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a

차이점 보기:

MarkupToPDF/Controls/Etc/DateControl.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.Etc
19 20
{
......
361 362
            Base_TextBox.Visibility = System.Windows.Visibility.Hidden;
362 363
            SetDate();
363 364
        }
364
        public void SetDate()
365

  
366
        private void SetDate()
365 367
        {
366 368
            if (Text == null)
367 369
            {
......
486 488
                return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
487 489
            }
488 490
        }
491

  
492
        /// <summary>
493
        /// create a datecontrol from given string
494
        /// </summary>
495
        /// <param name="str"></param>
496
        /// <returns></returns>
497
        public static DateControl FromString(string str, SolidColorBrush brush, string sProjectNo)
498
        {
499
            using (S_DateControl s = JsonSerializerHelper.JsonDeserialize<S_DateControl>(str))
500
            {
501
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
502
                return new DateControl
503
                {
504
                    Angle = s.Angle,
505
                    StartPoint = s.StartPoint,
506
                    EndPoint = s.EndPoint,
507
                    LeftBottomPoint = s.LB,
508
                    TopRightPoint = s.TR,
509
                    Opacity = s.Opac,
510
                    FontColor = brush,
511
                    LineSize = Convert.ToDouble(data2.First()),
512
                    Text = s.Text,
513
                    PointSet = s.PointSet,
514
                    UserID = s.UserID,
515
                    Memo = s.Memo
516
                };
517
            }
518
        }
489 519
    }
490 520
}

내보내기 Unified diff

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