2023-04-13 11:51:03 +08:00
|
|
|
|
using System;
|
2023-05-11 10:12:41 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
2023-04-13 11:51:03 +08:00
|
|
|
|
using System.Windows;
|
2023-05-11 10:12:41 +08:00
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
using System.Windows.Documents;
|
|
|
|
|
using System.Windows.Input;
|
2023-04-13 11:51:03 +08:00
|
|
|
|
using System.Windows.Media;
|
2023-05-11 10:12:41 +08:00
|
|
|
|
using System.Windows.Media.Imaging;
|
|
|
|
|
using System.Windows.Shapes;
|
|
|
|
|
using System.Globalization;
|
2023-04-13 11:51:03 +08:00
|
|
|
|
using Aitex.Core.RT.Log;
|
2023-05-11 10:12:41 +08:00
|
|
|
|
using Aitex.Core.Common;
|
2023-04-13 11:51:03 +08:00
|
|
|
|
using MECF.Framework.UI.Client.CenterViews.Editors.Recipe;
|
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
|
using Caliburn.Micro;
|
|
|
|
|
using MECF.Framework.Common.OperationCenter;
|
|
|
|
|
using MECF.Framework.UI.Client.CenterViews.Editors.Sequence;
|
|
|
|
|
|
|
|
|
|
namespace MECF.Framework.UI.Client.CenterViews.Editors
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interaction logic for InputDialogBox.xaml
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class SlotEditorDialogBox : Window
|
|
|
|
|
{
|
|
|
|
|
public SlotEditorDialogBox()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
|
|
DataContext = this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static readonly DependencyProperty ModuleIDProperty = DependencyProperty.Register(
|
|
|
|
|
"ModuleID", typeof(string), typeof(SlotEditorDialogBox),
|
|
|
|
|
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
|
|
|
|
|
public static readonly DependencyProperty RecipeNameProperty = DependencyProperty.Register(
|
|
|
|
|
"RecipeName", typeof(string), typeof(SlotEditorDialogBox),
|
|
|
|
|
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
|
|
|
|
|
public static readonly DependencyProperty TrayProcessCountProperty = DependencyProperty.Register(
|
|
|
|
|
"TrayProcessCount", typeof(int), typeof(SlotEditorDialogBox),
|
|
|
|
|
new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsRender));
|
|
|
|
|
public static readonly DependencyProperty SlotIDProperty = DependencyProperty.Register(
|
|
|
|
|
"SlotID", typeof(int), typeof(SlotEditorDialogBox),
|
|
|
|
|
new FrameworkPropertyMetadata(0, FrameworkPropertyMetadataOptions.AffectsRender));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public string ModuleID
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return (string)this.GetValue(ModuleIDProperty);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.SetValue(ModuleIDProperty, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int TrayProcessCount
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return (int)this.GetValue(TrayProcessCountProperty);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.SetValue(TrayProcessCountProperty, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string RecipeName
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return (string)this.GetValue(RecipeNameProperty);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.SetValue(RecipeNameProperty, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int SlotID
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return (int)this.GetValue(SlotIDProperty);
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this.SetValue(SlotIDProperty, value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void RecipeSelect_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
2023-05-11 10:12:41 +08:00
|
|
|
|
var dialog = new RecipeSelectDialogViewModel();
|
2023-04-13 11:51:03 +08:00
|
|
|
|
dialog.DisplayName = "Select Recipe";
|
|
|
|
|
|
2023-05-11 10:12:41 +08:00
|
|
|
|
var wm = new WindowManager();
|
|
|
|
|
var bret = wm.ShowDialog(dialog);
|
2023-04-13 11:51:03 +08:00
|
|
|
|
if ((bool)bret)
|
|
|
|
|
{
|
|
|
|
|
RecipeName = dialog.DialogResult;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
LOG.Error(ex.Message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void ButtonSet_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
int processCount = TrayProcessCount;
|
|
|
|
|
Int32.TryParse(txtTrayProcessCount.Text, out processCount);
|
|
|
|
|
|
|
|
|
|
InvokeClient.Instance.Service.DoOperation("AlterWaferInfo", ModuleID, SlotID, RecipeName, processCount);
|
|
|
|
|
this.DialogResult = true;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
LOG.Error(ex.Message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void ButtonCancel_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnRender(DrawingContext drawingContext)
|
|
|
|
|
{
|
|
|
|
|
this.txtRecipeName.Text = RecipeName;
|
|
|
|
|
this.txtTrayProcessCount.Text = TrayProcessCount.ToString();
|
|
|
|
|
base.OnRender(drawingContext);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|