using Aitex.Core.RT.IOCore;
using Aitex.Core.UI.MVVM;
using Aitex.Core.Util;
using athosSimulator.IO;
using athosSimulator.LoadPort;
using athosSimulator.Robot;
using MECF.Framework.Common.IOCore;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data.SqlClient;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using IOs = Aitex.Core.RT.IOCore.IO;
namespace athosSimulator
{
///
/// MainWindow.xaml 的交互逻辑
///
public partial class MainWindow : Window
{
private string[] _lp1slotMap = new string[25];
private string[] _lp2slotMap = new string[25];
public static readonly DependencyProperty LP1SlotMapProperty = DependencyProperty.Register("LP1SlotMap", typeof(string), typeof(MainWindow));
public string LP1SlotMap
{
get { return (string)this.GetValue(LP1SlotMapProperty); }
set { this.SetValue(LP1SlotMapProperty, value); }
}
public static readonly DependencyProperty LP2SlotMapProperty = DependencyProperty.Register("LP2SlotMap", typeof(string), typeof(MainWindow));
public string LP2SlotMap
{
get { return (string)this.GetValue(LP2SlotMapProperty); }
set { this.SetValue(LP2SlotMapProperty, value); }
}
public SimulatorPlc Plc { get; set; }
public ICommand SetCommand { get; private set; }
public ObservableCollection DIs { get; set; }
public ObservableCollection DOs { get; set; }
public ObservableCollection AIs { get; set; }
public ObservableCollection AOs { get; set; }
private PeriodicJob _task;
private RorzeRobot751Simulator _robotSimulator;
private Hirata _lp1Simulator;
private Hirata _lp2Simulator;
private Hirata _lp3Simulator;
public MainWindow()
{
InitializeComponent();
IOShow();
DISource.ItemsSource = DIs;
DOSource.ItemsSource = DOs;
AISource.ItemsSource = AIs;
AOSource.ItemsSource = AOs;
_task = new PeriodicJob(500, IOShow, "Simulator",true);
_robotSimulator = SystemSimulator.Instance.RobotSimulator;
_lp1Simulator = SystemSimulator.Instance.LP1Simulator;
_lp2Simulator = SystemSimulator.Instance.LP2Simulator;
//_lp3Simulator = SystemSimulator.Instance.LP3Simulator;
//SetCommand = new DelegateCommand