2023-08-22 16:48:45 +08:00
|
|
|
|
using System.Collections.ObjectModel;
|
2023-05-11 10:12:41 +08:00
|
|
|
|
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<FileNode> _filterFileListByProcessType;
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Constructors
|
|
|
|
|
|
|
|
|
|
public ProcessTypeFileItem()
|
|
|
|
|
{
|
|
|
|
|
FileListByProcessType = new ObservableCollection<FileNode>();
|
|
|
|
|
FilterFileListByProcessType = new ObservableCollection<FileNode>();
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-22 16:48:45 +08:00
|
|
|
|
public ProcessTypeFileItem(RecipeType type) : this()
|
2023-05-11 10:12:41 +08:00
|
|
|
|
{
|
2023-08-22 16:48:45 +08:00
|
|
|
|
ProcessType = type;
|
2023-05-11 10:12:41 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Properties
|
|
|
|
|
|
2023-08-22 16:48:45 +08:00
|
|
|
|
public RecipeType ProcessType { get; set; }
|
2023-05-11 10:12:41 +08:00
|
|
|
|
|
|
|
|
|
public ObservableCollection<FileNode> FileListByProcessType { get; set; }
|
|
|
|
|
|
|
|
|
|
public ObservableCollection<FileNode> FilterFileListByProcessType
|
|
|
|
|
{
|
|
|
|
|
get => _filterFileListByProcessType;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_filterFileListByProcessType = value;
|
|
|
|
|
InvokePropertyChanged(nameof(FilterFileListByProcessType));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region Methods
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 根据指定的工艺文件类型获取工艺文件前缀。
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="fileTypes"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static string GetProcessFilesPrefix(string fileTypes)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(fileTypes))
|
|
|
|
|
return string.Empty;
|
|
|
|
|
|
|
|
|
|
switch (fileTypes.ToLower())
|
|
|
|
|
{
|
|
|
|
|
case "process":
|
2023-08-22 16:48:45 +08:00
|
|
|
|
return GetProcessFilesPrefix(RecipeType.Process);
|
2023-05-11 10:12:41 +08:00
|
|
|
|
case "routine":
|
2023-08-22 16:48:45 +08:00
|
|
|
|
return GetProcessFilesPrefix(RecipeType.Routine);
|
2023-05-11 10:12:41 +08:00
|
|
|
|
case "clean":
|
2023-08-22 16:48:45 +08:00
|
|
|
|
return GetProcessFilesPrefix(RecipeType.Clean);
|
2023-05-11 10:12:41 +08:00
|
|
|
|
default:
|
|
|
|
|
return string.Empty;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 根据指定的工艺文件类型获取工艺文件前缀。
|
|
|
|
|
/// </summary>
|
2023-08-22 16:48:45 +08:00
|
|
|
|
/// <param name="type"></param>
|
2023-05-11 10:12:41 +08:00
|
|
|
|
/// <returns></returns>
|
2023-08-22 16:48:45 +08:00
|
|
|
|
public static string GetProcessFilesPrefix(RecipeType type)
|
2023-05-11 10:12:41 +08:00
|
|
|
|
{
|
2023-08-22 16:48:45 +08:00
|
|
|
|
switch (type)
|
2023-05-11 10:12:41 +08:00
|
|
|
|
{
|
2023-08-22 16:48:45 +08:00
|
|
|
|
case RecipeType.Process:
|
2023-05-11 10:12:41 +08:00
|
|
|
|
return "Sic\\Process";
|
|
|
|
|
|
2023-08-22 16:48:45 +08:00
|
|
|
|
case RecipeType.Routine:
|
2023-05-11 10:12:41 +08:00
|
|
|
|
return "Sic\\Routine";
|
|
|
|
|
|
2023-08-22 16:48:45 +08:00
|
|
|
|
case RecipeType.Clean:
|
2023-05-11 10:12:41 +08:00
|
|
|
|
return "Sic\\Clean";
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
return string.Empty;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|