개정판 661b7416
issue #999: Add FromString to all of controls
Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a
MarkupToPDF/Controls/Polygon/PolygonControl.cs | ||
---|---|---|
433 | 433 |
SetPolyPath(); |
434 | 434 |
} |
435 | 435 |
|
436 |
public void SetPolyPath()
|
|
436 |
private void SetPolyPath()
|
|
437 | 437 |
{ |
438 | 438 |
this.ApplyTemplate(); |
439 | 439 |
|
... | ... | |
535 | 535 |
} |
536 | 536 |
} |
537 | 537 |
|
538 |
/// <summary> |
|
539 |
/// create a polygoncontrol from given string |
|
540 |
/// </summary> |
|
541 |
/// <param name="str"></param> |
|
542 |
/// <returns></returns> |
|
543 |
public static PolygonControl FromString(string str, SolidColorBrush brush, string sProjectNo) |
|
544 |
{ |
|
545 |
using (S_PolyControl s = JsonSerializerHelper.JsonDeserialize<S_PolyControl>(str)) |
|
546 |
{ |
|
547 |
string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
|
548 |
return new PolygonControl |
|
549 |
{ |
|
550 |
LineSize = Convert.ToDouble(data2.First()), |
|
551 |
//Toler = s.Toler, |
|
552 |
IsCompleted = s.IsCompleted, |
|
553 |
//PointSet = new List<Point>(), |
|
554 |
Opacity = s.Opac, |
|
555 |
StrokeColor = brush, |
|
556 |
//강인구 추가(Chain인지 Polygon인지 구분) |
|
557 |
ControlType = s.Type, |
|
558 |
DashSize = s.DashSize, |
|
559 |
StartPoint = s.StartPoint, |
|
560 |
EndPoint = s.EndPoint, |
|
561 |
PointSet = s.PointSet, |
|
562 |
UserID = s.UserID, |
|
563 |
Paint = s.PaintState, |
|
564 |
//PointC = s.PointC, |
|
565 |
Memo = s.Memo |
|
566 |
}; |
|
567 |
} |
|
568 |
} |
|
538 | 569 |
//public PaintSet Paint { get; set; } |
539 | 570 |
|
540 | 571 |
|
내보내기 Unified diff