95 lines
2.6 KiB
C#
95 lines
2.6 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.ComponentModel;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Runtime.CompilerServices;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace Laservall.Solidworks.Model
|
|||
|
|
{
|
|||
|
|
public class BomItemModel : INotifyPropertyChanged
|
|||
|
|
{
|
|||
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|||
|
|
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
|||
|
|
{
|
|||
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public int Level { get; set; }
|
|||
|
|
|
|||
|
|
public string LevelDisplay { get; set; }
|
|||
|
|
|
|||
|
|
public string DrawingNo { get; set; }
|
|||
|
|
|
|||
|
|
public string ConfigName { get; set; }
|
|||
|
|
|
|||
|
|
private string _partName;
|
|||
|
|
public string PartName
|
|||
|
|
{
|
|||
|
|
get => _partName;
|
|||
|
|
set { if (_partName != value) { _partName = value; OnPropertyChanged(); } }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private string _materialProp;
|
|||
|
|
public string MaterialProp
|
|||
|
|
{
|
|||
|
|
get => _materialProp;
|
|||
|
|
set { if (_materialProp != value) { _materialProp = value; OnPropertyChanged(); } }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private string _material;
|
|||
|
|
public string Material
|
|||
|
|
{
|
|||
|
|
get => _material;
|
|||
|
|
set { if (_material != value) { _material = value; OnPropertyChanged(); } }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private string _classification;
|
|||
|
|
public string Classification
|
|||
|
|
{
|
|||
|
|
get => _classification;
|
|||
|
|
set { if (_classification != value) { _classification = value; OnPropertyChanged(); } }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public int Quantity { get; set; }
|
|||
|
|
|
|||
|
|
public bool IsAssembly { get; set; }
|
|||
|
|
|
|||
|
|
public bool IsOutSourcing { get; set; }
|
|||
|
|
|
|||
|
|
public string DocPath { get; set; }
|
|||
|
|
|
|||
|
|
public Dictionary<string, string> Props { get; set; }
|
|||
|
|
|
|||
|
|
public bool HasChildren { get; set; }
|
|||
|
|
|
|||
|
|
public int NodeId { get; set; }
|
|||
|
|
|
|||
|
|
public int ParentNodeId { get; set; }
|
|||
|
|
|
|||
|
|
private bool _isExpanded = true;
|
|||
|
|
public bool IsExpanded
|
|||
|
|
{
|
|||
|
|
get => _isExpanded;
|
|||
|
|
set { if (_isExpanded != value) { _isExpanded = value; OnPropertyChanged(); } }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private bool _isVisible = true;
|
|||
|
|
public bool IsVisible
|
|||
|
|
{
|
|||
|
|
get => _isVisible;
|
|||
|
|
set { if (_isVisible != value) { _isVisible = value; OnPropertyChanged(); } }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public string GetProp(string key)
|
|||
|
|
{
|
|||
|
|
if (Props != null && Props.ContainsKey(key))
|
|||
|
|
{
|
|||
|
|
return Props[key];
|
|||
|
|
}
|
|||
|
|
return "";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|