개정판 661b7416
issue #999: Add FromString to all of controls
Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a
MarkupToPDF/Controls/Etc/SymControlN.cs | ||
---|---|---|
362 | 362 |
return "|DZ|" + JsonSerializerHelper.CompressString((STemp.JsonSerialize())); |
363 | 363 |
} |
364 | 364 |
} |
365 |
|
|
366 |
/// <summary> |
|
367 |
/// create a symcontroln from given string |
|
368 |
/// </summary> |
|
369 |
/// <param name="str"></param> |
|
370 |
/// <returns></returns> |
|
371 |
public static SymControlN FromString(string str, SolidColorBrush brush, string sProjectNo) |
|
372 |
{ |
|
373 |
using (S_SymControlN s = JsonSerializerHelper.JsonDeserialize<S_SymControlN>(str)) |
|
374 |
{ |
|
375 |
return new SymControlN() |
|
376 |
{ |
|
377 |
PointSet = s.PointSet, |
|
378 |
StartPoint = s.StartPoint, |
|
379 |
EndPoint = s.EndPoint, |
|
380 |
Angle = s.Angle, |
|
381 |
LeftBottomPoint = s.LB, |
|
382 |
TopRightPoint = s.TR, |
|
383 |
Opacity = s.Opac, |
|
384 |
PathXathData = s.DBData, |
|
385 |
Memo = s.Memo |
|
386 |
}; |
|
387 |
} |
|
388 |
} |
|
365 | 389 |
} |
366 | 390 |
} |
367 | 391 |
|
내보내기 Unified diff