개정판 661b7416
issue #999: Add FromString to all of controls
Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a
MarkupToPDF/Controls/Polygon/CloudControl.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.Polygon |
19 | 20 |
{ |
... | ... | |
850 | 851 |
} |
851 | 852 |
} |
852 | 853 |
|
854 |
/// <summary> |
|
855 |
/// create a cloudcontrol from given string |
|
856 |
/// </summary> |
|
857 |
/// <param name="str"></param> |
|
858 |
/// <returns></returns> |
|
859 |
public static CloudControl FromString(string str, SolidColorBrush brush, string sProjectNo) |
|
860 |
{ |
|
861 |
CloudControl instance = null; |
|
862 |
using (S_CloudControl s = JsonSerializerHelper.JsonDeserialize<S_CloudControl>(str)) |
|
863 |
{ |
|
864 |
string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
|
865 |
instance = new CloudControl |
|
866 |
{ |
|
867 |
LineSize = Convert.ToDouble(data2.First()), |
|
868 |
Toler = s.Toler, |
|
869 |
PointSet = s.PointSet, |
|
870 |
ArcLength = s.ArcLength, |
|
871 |
Paint = s.PaintState, |
|
872 |
Opacity = s.Opac, |
|
873 |
StrokeColor = brush, |
|
874 |
isTransOn = s.IsTrans, |
|
875 |
isChain = s.IsChain, |
|
876 |
DashSize = s.DashSize, |
|
877 |
UserID = s.UserID, |
|
878 |
|
|
879 |
StartPoint = s.StartPoint, |
|
880 |
EndPoint = s.EndPoint, |
|
881 |
Memo = s.Memo |
|
882 |
|
|
883 |
//Fill = s.CloudFill, |
|
884 |
}; |
|
885 |
} |
|
886 |
|
|
887 |
return instance; |
|
888 |
} |
|
889 |
|
|
853 | 890 |
#region Method |
854 | 891 |
public void ApplyOverViewData() |
855 | 892 |
{ |
내보내기 Unified diff