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 SimulatorIOPM2View : UserControl
- {
- public SimulatorIOPM2View()
- {
- InitializeComponent();
- DataContext = new IoViewModel(6832, "PMB.PLC", PathManager.GetCfgDir() + "_ioDefinePM.xml", "PMB");
- this.IsVisibleChanged += IOView_IsVisibleChanged;
- }
- private void IOView_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- if (this.DataContext == null)
- {
- }
- (DataContext as TimerViewModelBase).EnableTimer(IsVisible);
- }
- }
- }
|