프로젝트

일반

사용자정보

개정판 661b7416

ID661b7416598de29c8ba957a702c8b0b2135eda3f
상위 8c66babd
하위 5529d2a2

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

issue #999: Add FromString to all of controls

Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a

차이점 보기:

MarkupToPDF/Controls/Shape/CircleControl.cs
5 5
using System;
6 6
using System.Collections.Generic;
7 7
using System.ComponentModel;
8
using System.Linq;
8 9
using System.Windows;
9 10
using System.Windows.Media;
10 11
using System.Windows.Shapes;
......
358 359
            if (PropertyChanged != null)
359 360
                PropertyChanged(this, new PropertyChangedEventArgs(propName));
360 361
        }
361
        public void SetCircle()
362
        private void SetCircle()
362 363
        {
363 364
            Base_CirclePath.StrokeDashArray.Clear();
364 365
            foreach (var item in this.DashSize)
......
471 472
                return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize()));
472 473
            };
473 474
        }
475

  
476
        /// <summary>
477
        /// create a circlecontrol from given string
478
        /// </summary>
479
        /// <param name="str"></param>
480
        /// <returns></returns>
481
        public static CircleControl FromString(string str, SolidColorBrush brush, string sProjectNo)
482
        {
483
            using (S_CircleControl s = JsonSerializerHelper.JsonDeserialize<S_CircleControl>(str))
484
            {
485
                string[] data2 = s.SizeSet.Split(CommentUserInfo.delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
486
                return new CircleControl
487
                {
488
                    LineSize = Convert.ToDouble(data2.First()),
489
                    Paint = s.PaintState,
490
                    StartPoint = s.StartPoint,
491
                    EndPoint = s.EndPoint,
492
                    LeftBottomPoint = s.LBP,
493
                    TopRightPoint = s.TRP,
494
                    Opacity = s.Opac,
495
                    Angle = s.Angle,
496
                    DashSize = s.DashSize,
497
                    PointSet = s.PointSet,
498
                    StrokeColor = brush,
499
                    UserID = s.UserID,
500
                    Memo = s.Memo
501
                };
502
            }
503
        }
474 504
    }
475 505
}

내보내기 Unified diff

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