using Aitex.Core.RT.DataCenter;
using Aitex.Core.RT.Log;
using Aitex.Core.UI.Dialog;
using Aitex.Core.UI.MVVM;
using Aitex.Core.Utilities;
using Caliburn.Micro.Core;
using MECF.Framework.Common.DataCenter;
using MECF.Framework.Common.RecipeCenter;
using CyberX8_Core;
using CyberX8_MainPages.PMs;
using CyberX8_Themes.UserControls;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Remoting.Contexts;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
namespace CyberX8_MainPages.ViewModels
{
public class RecipeManageViewModel : BindableBase
{
#region 常量
private const string ENGINEERING = "Engineering";
private const string PRODUCTION = "Production";
private const string HVD = "hvd";
#endregion
#region 内部变量
///
/// Recipe节点字典
///
private Dictionary _recipeNodeDic = new Dictionary();
private Dictionary _recipeName = new Dictionary();
///
/// Recipe节点集合
///
private ObservableCollection _recipeNodes;
///
/// Archive节点集合
///
private ObservableCollection _archiveNodes;
///
/// uiRecipeManager
///
private UiRecipeManager _uiRecipeManager = new UiRecipeManager();
// 选中文件名
private List _filePaths = new List();
private List _fileNames = new List();
//目录文件
List ProductionFileList = new List();
private SequenceRecipe _recipe;
#endregion
#region 属性
public SequenceRecipe SeqRecipe
{
get { return _recipe; }
set { SetProperty(ref _recipe, value); }
}
public List FilePaths
{
get { return _filePaths; }
set { SetProperty(ref _filePaths, value); }
}
public List FileNames
{
get { return _fileNames; }
set { SetProperty(ref _fileNames, value); }
}
public ObservableCollection RecipeNodes
{
get { return _recipeNodes; }
set { SetProperty(ref _recipeNodes, value); }
}
public ObservableCollection ArchiveNodes
{
get { return _archiveNodes; }
set { SetProperty(ref _archiveNodes, value); }
}
#endregion
#region 指令
[IgnorePropertyChange]
public ICommand OperationCommand
{
get;
private set;
}
[IgnorePropertyChange]
public ICommand SelectedCommand
{
get;
private set;
}
[IgnorePropertyChange]
public ICommand PromoteCommand { get; private set; }
[IgnorePropertyChange]
public ICommand DeleteRecipeCommand { get; private set; }
#endregion
///
/// 构造函数
///
public RecipeManageViewModel()
{
OperationCommand = new DelegateCommand