using Aitex.Core.RT.DataCenter;
using Aitex.Core.Util;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using Venus_MainPages.Sequence;
using Venus_MainPages.ViewModels;
using Venus_Unity;
namespace Venus_MainPages.Views
{
///
/// UserControl1.xaml 的交互逻辑
///
public partial class NewRecipeSequenceSelectView : Window
{
private FileNode pre_currentFileNode;
private FileNode process_currentFileNode;
private FileNode wtw_currentFileNode;
private FileNode post_currentFileNode;
SerializableDictionary recipeDictionary = new SerializableDictionary();
public string FullPath { get; private set; }
string value;
public NewRecipeSequenceSelectView(string path)
{
InitializeComponent();
//this.buttonOK.IsEnabled = false;
value = path;
}
private void buttonCancel_Click(object sender, RoutedEventArgs e)
{
this.DialogResult = false;
}
private void buttonOK_Click(object sender, RoutedEventArgs e)
{
this.DialogResult = true;
//if (this.currentFileNode != null)
//{
// if (this.currentFileNode.IsFile)
// {
// this.FullPath = this.currentFileNode.FullPath.Trim();
// }
//}
//StringBuilder recipeInfo = new StringBuilder(); ;
if (pre_currentFileNode != null)
{
recipeDictionary.Add("PreLotClean", pre_currentFileNode.Name);
}
else
{
recipeDictionary.Add("PreLotClean", "");
}
if (process_currentFileNode != null)
{
recipeDictionary.Add("Process", process_currentFileNode.Name);
}
else
{
recipeDictionary.Add("Process", "");
}
if (wtw_currentFileNode != null)
{
recipeDictionary.Add("WTWClean", wtw_currentFileNode.Name);
}
else
{
recipeDictionary.Add("WTWClean", "");
}
if (post_currentFileNode != null)
{
recipeDictionary.Add("PostLotClean", post_currentFileNode.Name);
}
else
{
recipeDictionary.Add("PostLotClean", "");
}
this.FullPath = SerializeHelper.Instance.DictionaryToString(recipeDictionary);
}
private void PreClean_PART_TREE_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs