개정판 661b7416
issue #999: Add FromString to all of controls
Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a
MarkupToPDF/Controls/Line/ArrowControl_Multi.cs | ||
---|---|---|
14 | 14 |
using MarkupToPDF.Common; |
15 | 15 |
using MarkupToPDF.Serialize.S_Control; |
16 | 16 |
using MarkupToPDF.Serialize.Core; |
17 |
using System.Linq; |
|
17 | 18 |
|
18 | 19 |
namespace MarkupToPDF.Controls.Line |
19 | 20 |
{ |
... | ... | |
337 | 338 |
}; |
338 | 339 |
} |
339 | 340 |
|
341 |
/// <summary> |
|
342 |
/// create a arrowcontrol_multi from given string |
|
343 |
/// </summary> |
|
344 |
/// <param name="str"></param> |
|
345 |
/// <returns></returns> |
|
346 |
public static ArrowControl_Multi FromString(string str, SolidColorBrush brush, string sProjectNo) |
|
347 |
{ |
|
348 |
ArrowControl_Multi instance = null; |
|
349 |
using (S_ArrowControl_Multi s = JsonSerializerHelper.JsonDeserialize<S_ArrowControl_Multi>(str)) |
|
350 |
{ |
|
351 |
string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
|
352 |
instance = new ArrowControl_Multi |
|
353 |
{ |
|
354 |
LineSize = Convert.ToDouble(data2.First()), |
|
355 |
StartPoint = s.StartPoint, |
|
356 |
MiddlePoint = s.MidPoint, |
|
357 |
DashSize = s.DashSize, |
|
358 |
EndPoint = s.EndPoint, |
|
359 |
PointSet = s.PointSet, |
|
360 |
Opacity = s.Opac, |
|
361 |
StrokeColor = brush, |
|
362 |
UserID = s.UserID, |
|
363 |
Memo = s.Memo |
|
364 |
}; |
|
365 |
} |
|
366 |
|
|
367 |
return instance; |
|
368 |
} |
|
369 |
|
|
340 | 370 |
public void Dispose() |
341 | 371 |
{ |
342 | 372 |
GC.Collect(); |
내보내기 Unified diff