using System.Collections.ObjectModel; using MECF.Framework.Common.CommonData; using MECF.Framework.UI.Client.CenterViews.Editors.Sequence; namespace MECF.Framework.UI.Client.CenterViews.Editors { public class ProcessTypeFileItem : NotifiableItem { #region Variablers private ObservableCollection _filterFileListByProcessType; #endregion #region Constructors public ProcessTypeFileItem() { FileListByProcessType = new ObservableCollection(); FilterFileListByProcessType = new ObservableCollection(); } public ProcessTypeFileItem(RecipeType type) : this() { ProcessType = type; } #endregion #region Properties public RecipeType ProcessType { get; set; } public ObservableCollection FileListByProcessType { get; set; } public ObservableCollection FilterFileListByProcessType { get => _filterFileListByProcessType; set { _filterFileListByProcessType = value; InvokePropertyChanged(nameof(FilterFileListByProcessType)); } } #endregion #region Methods /// /// 根据指定的工艺文件类型获取工艺文件前缀。 /// /// /// public static string GetProcessFilesPrefix(string fileTypes) { if (string.IsNullOrEmpty(fileTypes)) return string.Empty; switch (fileTypes.ToLower()) { case "process": return GetProcessFilesPrefix(RecipeType.Process); case "routine": return GetProcessFilesPrefix(RecipeType.Routine); case "clean": return GetProcessFilesPrefix(RecipeType.Clean); default: return string.Empty; } } /// /// 根据指定的工艺文件类型获取工艺文件前缀。 /// /// /// public static string GetProcessFilesPrefix(RecipeType type) { switch (type) { case RecipeType.Process: return "Sic\\Process"; case RecipeType.Routine: return "Sic\\Routine"; case RecipeType.Clean: return "Sic\\Clean"; default: return string.Empty; } } #endregion } }