using PdmSwPlugin.Common.Entity;
|
using SolidWorks.Interop.sldworks;
|
using System;
|
|
namespace PdmSwPlugin.PriceCheck.Model
|
{
|
public class ModelProperty : NotifyBase
|
{
|
public ModelDoc2 Doc { get; set; }
|
public event Action Changed;
|
|
private string _name;
|
public string name
|
{
|
get => _name;
|
set => RaiseAndSetIfChanged(ref _name, value);
|
}
|
|
private string _type;
|
public string type
|
{
|
get => _type;
|
set => RaiseAndSetIfChanged(ref _type, value);
|
}
|
|
private string _stuffType;
|
public string stuffType
|
{
|
get => _stuffType;
|
set => RaiseAndSetIfChanged(ref _stuffType, value);
|
}
|
|
private string _surfaceType;
|
public string surfaceType
|
{
|
get => _surfaceType;
|
set => RaiseAndSetIfChanged(ref _surfaceType, value);
|
}
|
|
private string _heatType;
|
public string heatType
|
{
|
get => _heatType;
|
set => RaiseAndSetIfChanged(ref _heatType, value);
|
}
|
|
private double _length;
|
public double length
|
{
|
get => _length;
|
set
|
{
|
RaiseAndSetIfChanged(ref _length, value);
|
RaiseAndSetIfChanged(ref _lengthStr, value.ToString());
|
}
|
}
|
private string _lengthStr;
|
public string lengthStr
|
{
|
get => _lengthStr;
|
set
|
{
|
double.TryParse(value, out double temp);
|
RaiseAndSetIfChanged(ref _length, temp);
|
RaiseAndSetIfChanged(ref _lengthStr, temp.ToString());
|
Changed?.Invoke();
|
}
|
}
|
|
private double _width;
|
public double width
|
{
|
get => _width;
|
set
|
{
|
RaiseAndSetIfChanged(ref _width, value);
|
RaiseAndSetIfChanged(ref _widthStr, value.ToString());
|
}
|
}
|
private string _widthStr;
|
public string widthStr
|
{
|
get => _widthStr;
|
set
|
{
|
double.TryParse(value, out double temp);
|
RaiseAndSetIfChanged(ref _width, temp);
|
RaiseAndSetIfChanged(ref _widthStr, temp.ToString());
|
Changed?.Invoke();
|
}
|
}
|
|
|
private double _height;
|
public double height
|
{
|
get => _height;
|
set
|
{
|
RaiseAndSetIfChanged(ref _height, value);
|
RaiseAndSetIfChanged(ref _heightStr, value.ToString());
|
}
|
}
|
private string _heightStr;
|
public string heightStr
|
{
|
get => _heightStr;
|
set
|
{
|
double.TryParse(value, out double temp);
|
RaiseAndSetIfChanged(ref _height, temp);
|
RaiseAndSetIfChanged(ref _heightStr, temp.ToString());
|
Changed?.Invoke();
|
}
|
}
|
|
private double _thickness;
|
public double thickness
|
{
|
get => _thickness;
|
set => RaiseAndSetIfChanged(ref _thickness, value);
|
}
|
|
/// <summary>
|
/// solidwork给出的面积
|
/// </summary>
|
private double _area;
|
public double area
|
{
|
get => _area;
|
set => RaiseAndSetIfChanged(ref _area, value);
|
}
|
|
/// <summary>
|
/// 核价时实际计算的面积
|
/// </summary>
|
private double _currentArea;
|
public double currentArea
|
{
|
get => _currentArea;
|
set => RaiseAndSetIfChanged(ref _currentArea, value);
|
}
|
|
/// <summary>
|
/// solidwork给出的体积
|
/// </summary>
|
private double _volume;
|
public double volume
|
{
|
get => _volume;
|
set => RaiseAndSetIfChanged(ref _volume, value);
|
}
|
|
/// <summary>
|
/// 实际核价时计算的体积
|
/// </summary>
|
private double _currentVolume;
|
public double currentVolume
|
{
|
get => _currentVolume;
|
set => RaiseAndSetIfChanged(ref _currentVolume, value);
|
}
|
|
private double _density;
|
public double density
|
{
|
get => _density;
|
set => RaiseAndSetIfChanged(ref _density, value);
|
}
|
|
private double _weight;
|
public double weight
|
{
|
get => _weight;
|
set => RaiseAndSetIfChanged(ref _weight, value);
|
}
|
|
/// <summary>
|
/// 材料单价
|
/// </summary>
|
private double _stuffUnitPrice;
|
public double stuffUnitPrice
|
{
|
get => _stuffUnitPrice;
|
set => RaiseAndSetIfChanged(ref _stuffUnitPrice, value);
|
}
|
|
/// <summary>
|
/// 材料费
|
/// </summary>
|
private double _stuffPrice;
|
public double stuffPrice
|
{
|
get => _stuffPrice;
|
set => RaiseAndSetIfChanged(ref _stuffPrice, value);
|
}
|
|
/// <summary>
|
/// 表处理单价
|
/// </summary>
|
private double _surfaceUnitPrice;
|
public double surfaceUnitPrice
|
{
|
get => _surfaceUnitPrice;
|
set => RaiseAndSetIfChanged(ref _surfaceUnitPrice, value);
|
}
|
|
/// <summary>
|
/// 表处理费
|
/// </summary>
|
private double _surfacePrice;
|
public double surfacePrice
|
{
|
get => _surfacePrice;
|
set => RaiseAndSetIfChanged(ref _surfacePrice, value);
|
}
|
|
/// <summary>
|
/// 材料单价
|
/// </summary>
|
private double _heatUnitPrice;
|
public double heatUnitPrice
|
{
|
get => _heatUnitPrice;
|
set => RaiseAndSetIfChanged(ref _heatUnitPrice, value);
|
}
|
|
/// <summary>
|
/// 材料费
|
/// </summary>
|
private double _heatPrice;
|
public double heatPrice
|
{
|
get => _heatPrice;
|
set => RaiseAndSetIfChanged(ref _heatPrice, value);
|
}
|
|
private double _price;
|
public double price
|
{
|
get => _price;
|
set => RaiseAndSetIfChanged(ref _price, value);
|
}
|
|
private bool _round;
|
public bool round
|
{
|
get => _round;
|
set => RaiseAndSetIfChanged(ref _round, value);
|
}
|
|
public bool bj => "钣金" == type;
|
public bool tb => "台板" == type;
|
}
|
}
|