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