12345678910111213141516171819202122232425262728293031323334353637 |
- 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 Venus_Simulator.Instances;
- namespace Venus_Simulator.Views
- {
- /// <summary>
- /// IoView.xaml 的交互逻辑
- /// </summary>
- public partial class SimulatorIoTMView : UserControl
- {
- public SimulatorIoTMView()
- {
- InitializeComponent();
- 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);
- }
- }
- }
|