개정판 661b7416
issue #999: Add FromString to all of controls
Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a
MarkupToPDF/Controls/Polygon/InkControl.cs | ||
---|---|---|
450 | 450 |
//SetPolyPath(); |
451 | 451 |
} |
452 | 452 |
|
453 |
public void SetPolyPath()
|
|
453 |
private void SetPolyPath()
|
|
454 | 454 |
{ |
455 | 455 |
this.ApplyTemplate(); |
456 | 456 |
|
... | ... | |
578 | 578 |
}; |
579 | 579 |
} |
580 | 580 |
|
581 |
/// <summary> |
|
582 |
/// create a inkcontrol from given string |
|
583 |
/// </summary> |
|
584 |
/// <param name="str"></param> |
|
585 |
/// <returns></returns> |
|
586 |
public static InkControl FromString(string str, SolidColorBrush brush, string sProjectNo) |
|
587 |
{ |
|
588 |
using (S_PolyControl s = JsonSerializerHelper.JsonDeserialize<S_PolyControl>(str)) |
|
589 |
{ |
|
590 |
string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
|
591 |
return new InkControl |
|
592 |
{ |
|
593 |
LineSize = Convert.ToDouble(data2.First()), |
|
594 |
//Toler = s.Toler, |
|
595 |
IsCompleted = s.IsCompleted, |
|
596 |
//PointSet = new List<Point>(), |
|
597 |
Opacity = s.Opac, |
|
598 |
StrokeColor = brush, |
|
599 |
//강인구 추가(Chain인지 Polygon인지 구분) |
|
600 |
ControlType = s.Type, |
|
601 |
DashSize = s.DashSize, |
|
602 |
StartPoint = s.StartPoint, |
|
603 |
PointSet = s.PointSet, |
|
604 |
UserID = s.UserID, |
|
605 |
Paint = s.PaintState, |
|
606 |
EndPoint = s.EndPoint, |
|
607 |
//PointC = s.PointC, |
|
608 |
Memo = s.Memo |
|
609 |
}; |
|
610 |
} |
|
611 |
} |
|
581 | 612 |
//public PaintSet Paint { get; set; } |
582 | 613 |
|
583 | 614 |
|
내보내기 Unified diff