개정판 661b7416
issue #999: Add FromString to all of controls
Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a
MarkupToPDF/Controls/Cad/InsideWhiteControlcs.cs | ||
---|---|---|
584 | 584 |
}; |
585 | 585 |
} |
586 | 586 |
|
587 |
/// <summary> |
|
588 |
/// create a InsideWhiteControl from given string |
|
589 |
/// </summary> |
|
590 |
/// <param name="str"></param> |
|
591 |
/// <returns></returns> |
|
592 |
public static InsideWhiteControl FromString(string str, SolidColorBrush brush, string sProjectNo) |
|
593 |
{ |
|
594 |
using (S_InsideWhiteControl s = JsonSerializerHelper.JsonDeserialize<S_InsideWhiteControl>(str)) |
|
595 |
{ |
|
596 |
string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
|
597 |
return new InsideWhiteControl |
|
598 |
{ |
|
599 |
LineSize = Convert.ToDouble(data2.First()), |
|
600 |
Paint = s.PaintState, |
|
601 |
StartPoint = s.StartPoint, |
|
602 |
EndPoint = s.EndPoint, |
|
603 |
Angle = s.Angle, |
|
604 |
StrokeColor = Brushes.White, |
|
605 |
DashSize = s.DashSize, |
|
606 |
Opacity = s.Opac, |
|
607 |
LeftBottomPoint = s.LB, |
|
608 |
TopRightPoint = s.TR, |
|
609 |
PointSet = s.PointSet, |
|
610 |
UserID = s.UserID, |
|
611 |
FillColor = Brushes.White, |
|
612 |
Memo = s.Memo |
|
613 |
}; |
|
614 |
} |
|
615 |
} |
|
616 |
|
|
587 | 617 |
public event PropertyChangedEventHandler PropertyChanged; |
588 | 618 |
|
589 | 619 |
public void Dispose() |
내보내기 Unified diff