画板基础基本完成

This commit is contained in:
艾竹
2023-05-14 00:31:25 +08:00
parent 147a84cf91
commit 8003cebf99
40 changed files with 3198 additions and 374 deletions

View File

@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Xml.Serialization;
using Newtonsoft.Json;
namespace AIStudio.Wpf.DiagramDesigner
{
public class DrawingDesignerItemBase : DesignerItemBase
{
public DrawingDesignerItemBase()
{
}
public DrawingDesignerItemBase(DrawingDesignerItemViewModelBase item) : base(item)
{
this.Erasable = item.Erasable;
this.Geometry = item.Geometry.ToString();
this.Points = item.Points;
this.DrawMode = item.DrawMode;
}
[XmlAttribute]
public bool Erasable
{
get; set;
}
[XmlAttribute]
public string Geometry
{
get; set;
}
[XmlIgnore]
public List<Point> Points
{
get; set;
}
[JsonIgnore]
[XmlElement("Points")]
public string XmlPoints
{
get
{
return SerializeHelper.SerializePointList(Points);
}
set
{
Points = SerializeHelper.DeserializePointList(value);
}
}
[XmlAttribute]
public DrawMode DrawMode
{
get; set;
}
}
}