1234567891011121314151617181920212223242526272829303132 |
- using System.Windows;
- using System.Windows.Controls;
- using Aitex.Common.Util;
- using Aitex.Core.UI.MVVM;
- namespace EfemDualSimulator.Views
- {
- /// <summary>
- /// SimulatorPMIOView.xaml 的交互逻辑
- /// </summary>
- public partial class SimulatorIOSystemView : UserControl
- {
- public SimulatorIOSystemView()
- {
- InitializeComponent();
- DataContext = new IoViewModel(6831, "System.PLC", PathManager.GetCfgDir() + "_ioDefineMF.xml", "System");
- this.IsVisibleChanged += IOView_IsVisibleChanged;
- }
- private void IOView_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- if (this.DataContext == null)
- {
- }
- (DataContext as TimerViewModelBase).EnableTimer(IsVisible);
- }
- }
- }
|