123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- using OpenSEMI.ClientBase;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using FurnaceUI.Models;
- using Caliburn.Micro.Core;
- using Caliburn.Micro;
- namespace FurnaceUI.Views.Operations
- {
- public class RobotCommandViewModel : FurnaceUIViewModelBase
- {
- private Visibility robotCommandVisibility = Visibility.Visible;
- public Visibility RobotCommandVisibility
- {
- get => robotCommandVisibility;
- set
- {
- robotCommandVisibility = value;
- NotifyOfPropertyChange(nameof(RobotCommandVisibility));
- }
- }
- public Visibility waferChargeVisibility = Visibility.Visible;
- public Visibility WaferChargeVisibility
- {
- get => waferChargeVisibility;
- set
- {
- waferChargeVisibility = value;
- NotifyOfPropertyChange(nameof(WaferChargeVisibility));
- }
- }
- public bool IsEnabled { get; set; } = true;
- public bool IsEnabledAction { get; set; } = true;
- private string showTitle="";
- public string ShowTitle
- {
- get => showTitle;
- set
- {
- showTitle = value;
- NotifyOfPropertyChange(nameof(ShowTitle));
- }
- }
- public RobotCommandViewModel()
- {
- ShowRobotVisibilityChanged();
-
- }
- private void ShowRobotVisibilityChanged()
- {
- RobotCommandVisibility = Visibility.Visible;
- WaferChargeVisibility = Visibility.Hidden;
- ShowTitle = "Please select Robot Command";
- }
- private void WaferChargeVisibilityChanged()
- {
- RobotCommandVisibility = Visibility.Hidden;
- WaferChargeVisibility = Visibility.Visible;
- ShowTitle = "Please select Command Type";
- }
- public void RobotCommand(string command)
- {
- switch (command)
- {
- case "Initial":
- break;
- case "Home":
- break;
- case "AlarmReset":
- break;
- case "WaferTransfer":
- WaferChargeVisibilityChanged();
- break;
- case "BoatTransfer":
- break;
- case "MaterialMove":
- break;
- case "MachineMove":
- break;
- case "AbortStatus":
- break;
- default:
- break;
- }
- }
- public void WaferChargeCommand()
- {
- var windowManager = IoC.Get<IWindowManager>();
- SelectProductAndMonitorChargeViewModel selectProductAndMonitorChargeViewModel = new SelectProductAndMonitorChargeViewModel();
- (windowManager as WindowManager)?.ShowDialogWithTitle(selectProductAndMonitorChargeViewModel, null, "Wafer Charge");
- }
- public void WaferDisChargeCommand()
- {
- }
- public void BackCmd()
- {
- ShowRobotVisibilityChanged();
- }
- public void CancelCmd()
- {
- ((Window)GetView()).DialogResult = false;
- }
- }
- }
|