保存SFC数据到xml,json完成,

This commit is contained in:
akwkevin
2021-08-03 18:19:47 +08:00
parent 5a1f869141
commit b0c9855d05
15 changed files with 466 additions and 131 deletions

View File

@@ -348,6 +348,17 @@ namespace Util.DiagramDesigner
string[] pieces = point.Split(new char[] { ',' });
return new Point(double.Parse(pieces[0]), double.Parse(pieces[1]));
}
public static string SerializeSize(Size size)
{
return string.Format("{0},{1}", size.Width, size.Height);
}
public static Size DeserializeSize(string size)
{
string[] pieces = size.Split(new char[] { ',' });
return new Size(double.Parse(pieces[0]), double.Parse(pieces[1]));
}
}