public override void Save() { MDictionary.Clear(); XmlHelperPaint.ShapeType = TrackType; MDictionary.Add("StartPoint", string.Join(",", StartPoint.X, StartPoint.Y)); MDictionary.Add("EndPoint", string.Join(",", EndPoint.X, EndPoint.Y)); XmlHelperPaint.SavePaintSetting(MDictionary); }
public override void Save() { MDictionary.Clear(); XmlHelperPaint.ShapeType = TrackType; MDictionary.Add("RecX", Rectangle.X.ToString()); MDictionary.Add("RecY", Rectangle.Y.ToString()); MDictionary.Add("RecW", Rectangle.Width.ToString()); MDictionary.Add("RecH", Rectangle.Height.ToString()); MDictionary.Add("StartAngle", StartAngle.ToString()); MDictionary.Add("EndAngle", EndAngle.ToString()); XmlHelperPaint.SavePaintSetting(MDictionary); }
public override void Load() { SavePath = XmlHelperPaint.XmlSavePath; MDictionary = XmlHelperPaint.LoadPaintSetting(); int i = 0; foreach (var item in MDictionary) { switch (i) { case 0: StartPoint = StringToPoint(item.Value); break; case 1: EndPoint = StringToPoint(item.Value); break; } i++; } }
public override void Load() { SavePath = XmlHelperPaint.XmlSavePath; MDictionary = XmlHelperPaint.LoadPaintSetting(); int i = 0; foreach (var item in MDictionary) { switch (i) { case 0: Rectangle.X = Convert.ToInt32(item.Value); break; case 1: Rectangle.Y = Convert.ToInt32(item.Value); break; case 2: Rectangle.Width = Convert.ToInt32(item.Value); break; case 3: Rectangle.Height = Convert.ToInt32(item.Value); break; case 4: StartAngle = Convert.ToInt32(item.Value); break; case 5: EndAngle = Convert.ToInt32(item.Value); break; } i++; } }