프로젝트

일반

사용자정보

개정판 661b7416

ID661b7416598de29c8ba957a702c8b0b2135eda3f
상위 8c66babd
하위 5529d2a2

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

issue #999: Add FromString to all of controls

Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a

차이점 보기:

MarkupToPDF/Controls/Shape/TriControl.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
{
......
325 326
            this.SetTri();
326 327
        }
327 328

  
328
        public void SetTri()
329
        private void SetTri()
329 330
        {
330 331
            this.ApplyTemplate();
331 332
            Base_TriPath.StrokeDashArray.Clear();
......
436 437
            }
437 438
        }
438 439

  
440
        /// <summary>
441
        /// create a tricontrol from given string
442
        /// </summary>
443
        /// <param name="str"></param>
444
        /// <returns></returns>
445
        public static TriControl FromString(string str, SolidColorBrush brush, string sProjectNo)
446
        {
447
            using (S_TriControl s = JsonSerializerHelper.JsonDeserialize<S_TriControl>(str))
448
            {
449
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
450
                return new TriControl
451
                {
452
                    LineSize = Convert.ToDouble(data2.First()),
453
                    MidPoint = s.MidPoint,
454
                    StartPoint = s.StartPoint,
455
                    Paint = s.Paint,
456
                    EndPoint = s.EndPoint,
457
                    Opacity = s.Opac,
458
                    Angle = s.Angle,
459
                    DashSize = s.DashSize,
460
                    PointSet = s.PointSet,
461
                    StrokeColor = brush,
462
                    UserID = s.UserID,
463
                    Memo = s.Memo
464
                };
465
            }
466
        }
467

  
439 468
        //public void ChangePaint(PaintSet state)
440 469
        //{
441 470
        //    this.Paint = state;

내보내기 Unified diff

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