1234567891011121314151617181920212223242526272829303132333435363738 |
- 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 EfemDualSimulator.Instances;
- namespace EfemDualSimulator.Views
- {
- /// <summary>
- /// IoView.xaml 的交互逻辑
- /// </summary>
- public partial class SimulatorIo2View : UserControl
- {
- public SimulatorIo2View()
- {
- InitializeComponent();
- DataContext = new IoViewModel(6732, "PMB.PLC", PathManager.GetCfgDir() + "_ioDefineVirgo.xml", "PMB");
- this.IsVisibleChanged += IOView_IsVisibleChanged;
- }
- private void IOView_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- if (this.DataContext == null)
- {
- }
- (DataContext as TimerViewModelBase).EnableTimer(IsVisible);
- }
- }
-
- }
|