|
|
|
|
using Prism.Mvvm;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Media;
|
|
|
|
|
|
|
|
|
|
namespace Txgy.EWS.Client.Models
|
|
|
|
|
{
|
|
|
|
|
public class CadLayer:BindableBase
|
|
|
|
|
{
|
|
|
|
|
private bool visible = true;
|
|
|
|
|
|
|
|
|
|
public bool Visible
|
|
|
|
|
{
|
|
|
|
|
get { return visible; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
SetProperty(ref visible, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private string name="";
|
|
|
|
|
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get { return name; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
SetProperty(ref name, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private Color color=Colors.Black;
|
|
|
|
|
|
|
|
|
|
public Color Color
|
|
|
|
|
{
|
|
|
|
|
get { return color; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
SetProperty(ref color, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private double lineWidth;
|
|
|
|
|
|
|
|
|
|
public double LineWidth
|
|
|
|
|
{
|
|
|
|
|
get { return lineWidth; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
SetProperty(ref lineWidth, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private ObservableCollection<CadGeometry> geometryCollection=new ObservableCollection<CadGeometry>();
|
|
|
|
|
|
|
|
|
|
public ObservableCollection<CadGeometry> GeometryCollection
|
|
|
|
|
{
|
|
|
|
|
get { return geometryCollection; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
SetProperty(ref geometryCollection, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// private ObservableCollection<Geometry> geometryCollection=new ObservableCollection<Geometry>();
|
|
|
|
|
|
|
|
|
|
//public ObservableCollection<Geometry> GeometryCollection
|
|
|
|
|
// {
|
|
|
|
|
// get { return geometryCollection; }
|
|
|
|
|
// set
|
|
|
|
|
// {
|
|
|
|
|
// SetProperty(ref geometryCollection, value);
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
private ObservableCollection<CadText> textCollection=new ObservableCollection<CadText>();
|
|
|
|
|
|
|
|
|
|
public ObservableCollection<CadText> TextCollection
|
|
|
|
|
{
|
|
|
|
|
get { return textCollection; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
SetProperty(ref textCollection, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private ObservableCollection<CadLine> lineCollection=new ObservableCollection<CadLine>();
|
|
|
|
|
|
|
|
|
|
public ObservableCollection<CadLine> LineCollection
|
|
|
|
|
{
|
|
|
|
|
get { return lineCollection; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
SetProperty(ref lineCollection, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public CadLayer(string name, bool visible=true)
|
|
|
|
|
{
|
|
|
|
|
this.Visible= visible;
|
|
|
|
|
this.Name= name;
|
|
|
|
|
}
|
|
|
|
|
public CadLayer(string name, Color color, double lineWidth, bool visible = true)
|
|
|
|
|
{
|
|
|
|
|
this.Name = name;
|
|
|
|
|
this.Color= color;
|
|
|
|
|
this.LineWidth= lineWidth;
|
|
|
|
|
this.Visible= visible;
|
|
|
|
|
}
|
|
|
|
|
public CadLayer()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|