123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Linq;
- using System.Text;
- using System.Windows;
- using System.Windows.Input;
- using Aitex.Core.Common.DeviceData;
- using Aitex.Core.UI.MVVM;
- using Aitex.Core.Util;
- using Aitex.Sorter.UI.ViewModel;
- using MECF.Framework.Common.IOCore;
- namespace Aitex.Sorter.UI.ViewModel
- {
- public class IoViewModel2LP : UIViewModelBase
- {
- public ObservableCollection<NotifiableIoItem> Card1DiList { get; set; }
- public ObservableCollection<NotifiableIoItem> Card2DoList { get; set; }
- public ObservableCollection<NotifiableIoItem> Card3DiList { get; set; }
- public ObservableCollection<NotifiableIoItem> Card4DoList { get; set; }
- public ObservableCollection<NotifiableIoItem> IOAiList { get; set; }
- public ObservableCollection<NotifiableIoItem> IOAoList { get; set; }
- private List<NotifiableIoItem> _di1;
- [Subscription("System.dio000.DIList")]
- public List<NotifiableIoItem> DiListData1
- {
- get
- {
- return _di1;
- }
- set
- {
- _di1 = value;
- Application.Current.Dispatcher.Invoke(new Action(() =>
- {
- Card1DiList.Clear();
- _di1.ForEach(x =>
- {
- if (x.Provider.ToLower() == "system.dio000")
- Card1DiList.Add(x);
- });
- }));
- }
- }
-
- private List<NotifiableIoItem> _do2;
- [Subscription("System.dio001.DOList")]
- public List<NotifiableIoItem> DoListData2
- {
- get
- {
- return _do2;
- }
- set
- {
- _do2 = value;
- Application.Current.Dispatcher.Invoke(new Action(() =>
- {
- Card2DoList.Clear();
- _do2.ForEach(x =>
- {
- if (x.Provider.ToLower() == "system.dio001")
- Card2DoList.Add(x);
- });
- }));
- }
- }
- private List<NotifiableIoItem> _di3;
- [Subscription("System.dio002.DIList")]
- public List<NotifiableIoItem> DiListData3
- {
- get
- {
- return _di3;
- }
- set
- {
- _di3 = value;
- Application.Current.Dispatcher.Invoke(new Action(() =>
- {
- Card3DiList.Clear();
- _di3.ForEach(x =>
- {
- if (x.Provider.ToLower() == "system.dio002")
- Card3DiList.Add(x);
- });
- }));
- }
- }
-
- private List<NotifiableIoItem> _do4;
- [Subscription("System.dio003.DOList")]
- public List<NotifiableIoItem> DoListData4
- {
- get
- {
- return _do4;
- }
- set
- {
- _do4 = value;
- Application.Current.Dispatcher.Invoke(new Action(() =>
- {
- Card4DoList.Clear();
- _do4.ForEach(x =>
- {
- if (x.Provider.ToLower() == "system.dio003")
- Card4DoList.Add(x);
- });
- }));
- }
- }
- private List<NotifiableIoItem> _ai;
- [Subscription("System.MotionAxis.AIList")]
- public List<NotifiableIoItem> AiListData
- {
- get
- {
- return _ai;
- }
- set
- {
- _ai = value;
- Application.Current.Dispatcher.Invoke(new Action(() =>
- {
- IOAiList.Clear();
- _ai.ForEach(x =>
- {
- if (x.Provider.ToLower() == "system.motionaxis")
- IOAiList.Add(x);
- });
- }));
- }
- }
- private List<NotifiableIoItem> _ao;
- [Subscription("System.MotionAxis.AOList")]
- public List<NotifiableIoItem> AoListData
- {
- get
- {
- return _ao;
- }
- set
- {
- _ao = value;
- Application.Current.Dispatcher.Invoke(new Action(() =>
- {
- IOAoList.Clear();
- _ao.ForEach(x =>
- {
- if (x.Provider.ToLower() == "system.motionaxis")
- IOAoList.Add(x);
- });
- }));
- }
- }
- public ICommand SetDoCommand
- {
- get; set;
- }
- public IoViewModel2LP() : base("IoViewModel2LP")
- {
- Card1DiList = new ObservableCollection<NotifiableIoItem>();
- Card2DoList = new ObservableCollection<NotifiableIoItem>();
- Card3DiList = new ObservableCollection<NotifiableIoItem>();
- Card4DoList = new ObservableCollection<NotifiableIoItem>();
- IOAiList = new ObservableCollection<NotifiableIoItem>();
- IOAoList = new ObservableCollection<NotifiableIoItem>();
- SetDoCommand = new DelegateCommand<string>(PerformSetDo);
- }
- private void PerformSetDo(string ioName)
- {
- }
- private void SetDo()
- {
- }
- protected override void InvokeBeforeUpdateProperty(Dictionary<string, object> data)
- {
- //data[UIKey(UnitName.System.ToString(), ParamName.WaferInfoRobotAligner01)] = new WaferInfo("dummy", WaferStatus.Normal);
- }
- }
- }
|