using Laservall.Solidworks.Model; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; namespace Laservall.Solidworks.Windows.ViewModel { public class ItemsViewModel : INotifyPropertyChanged { #region INotifyPropertyChanged public event PropertyChangedEventHandler PropertyChanged; protected void OnPropertyChanged([CallerMemberName] string propertyName = null) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } #endregion public ItemsViewModel() { } private ObservableCollection swAssDocTrees; public ObservableCollection SwAssDocTrees { get { return swAssDocTrees; } set { swAssDocTrees = value; OnPropertyChanged(); } } private ObservableCollection bomItems; public ObservableCollection BomItems { get { return bomItems; } set { bomItems = value; OnPropertyChanged(); } } private List allPropertyKeys = new List(); public List AllPropertyKeys { get { return allPropertyKeys; } set { allPropertyKeys = value; OnPropertyChanged(); } } private bool isLoading = true; public bool IsLoading { get { return isLoading; } set { isLoading = value; OnPropertyChanged(); } } private double loadingProgress; public double LoadingProgress { get { return loadingProgress; } set { loadingProgress = value; OnPropertyChanged(); } } private double loadingProgressMaximum = 1; public double LoadingProgressMaximum { get { return loadingProgressMaximum; } set { loadingProgressMaximum = value <= 0 ? 1 : value; OnPropertyChanged(); } } private string loadingText = "正在读取数据..."; public string LoadingText { get { return loadingText; } set { loadingText = value; OnPropertyChanged(); } } private bool isFlatView; public bool IsFlatView { get { return isFlatView; } set { isFlatView = value; OnPropertyChanged(); } } } }