| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 | using Caliburn.Micro;using Caliburn.Micro.Core;using FurnaceUI.Models;using MECF.Framework.Common.DataCenter;using OpenSEMI.ClientBase;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Text.RegularExpressions;using System.Threading.Tasks;using System.Windows;namespace FurnaceUI.Views.Jobs{    public class InputCarrierInfoViewModel: FurnaceModuleUIViewModelBase    {        private string _carrierID;        public string CarrierID        {            get => _carrierID;            set            {                _carrierID = value;                NotifyOfPropertyChange(nameof(CarrierID));            }        }        private string _waferCount = "0";        public string WaferCount        {            get => _waferCount;            set            {                _waferCount = value;                NotifyOfPropertyChange(nameof(WaferCount));            }        }        private string _waferType;        public string WaferType        {            get => _waferType;            set            {                _waferType = value;                NotifyOfPropertyChange(nameof(WaferType));            }        }        private string _waferNo;        public string WaferNo        {            get => _waferNo;            set            {                _waferNo = value;                NotifyOfPropertyChange(nameof(WaferNo));            }        }        private bool _isExistChecked = true;        public bool IsExistChecked        {            get => _isExistChecked;            set            {                _isExistChecked = value;                NotifyOfPropertyChange(nameof(IsExistChecked));            }        }        private bool _isNoneChecked = true;        public bool IsNoneChecked        {            get => _isNoneChecked;            set            {                _isNoneChecked = value;                NotifyOfPropertyChange(nameof(IsNoneChecked));            }        }        private string _slotMap;        public string SlotMap        {            get => _slotMap;            set            {                _slotMap = value;                NotifyOfPropertyChange(nameof(SlotMap));            }        }        protected override void OnActivate()        {            base.OnActivate();            for (int i = 0; i < (int)QueryDataClient.Instance.Service.GetConfig("System.CassetteSlotCount"); i++)            {                SlotMap += 0;            }        }        public void EditMap()        {            var windowManager = IoC.Get<IWindowManager>();            SpecifiedMapViewModel specifiedMapViewModel = new SpecifiedMapViewModel();            specifiedMapViewModel.WaferType = WaferType;            if((bool)(windowManager as WindowManager)?.ShowDialogWithTitle(specifiedMapViewModel, null, "Slot Map Info"))            {                SlotMap = specifiedMapViewModel.SlotMap;                WaferCount = Regex.Matches(SlotMap, "1").Count.ToString();                if (SlotMap.Contains("1"))                    IsExistChecked = true;                else                    IsNoneChecked = !IsExistChecked;            }        }        public void AcceptCmd()        {            if (string.IsNullOrEmpty(SlotMap))            {                DialogBox.ShowWarning("Specified Map is empty");                return;            }            ((Window)GetView()).DialogResult = true;        }        public void ClosedCmd(string cmdPar)        {            ((Window)GetView()).DialogResult = false;        }    }}
 |