123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System;
- using System.Collections.ObjectModel;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Controls.Primitives;
- using System.Windows.Data;
- using Aitex.Common.Util;
- using Aitex.Core.UI.MVVM;
- using MECF.Framework.Common.IOCore;
- using CyberX8_Core;
- using CyberX8_Simulator.Instances;
- namespace CyberX8_Simulator.Views
- {
- /// <summary>
- /// IoView.xaml 的交互逻辑
- /// </summary>
- public partial class SimulatorIoTMView : UserControl
- {
-
- public SimulatorIoTMView()
- {
- InitializeComponent();
- //if (SimulatorJetTM.CurrentTM==JetTMType.VenusSE)
- //{
- // port = 6831;
- //}
-
- DataContext = new IoViewModel(6831, "TM.PLC", PathManager.GetCfgDir() + $"_ioDefineVenus_MF.xml", "TM");
-
- this.IsVisibleChanged += IOView_IsVisibleChanged;
- }
- private void IOView_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- if (this.DataContext == null)
- {
- }
- (DataContext as TimerViewModelBase).EnableTimer(IsVisible);
- }
- }
- }
|