using Aitex.Core.UI.View.Common; using Aitex.Sorter.Common; using Aitex.Sorter.UI.ViewModel.Maintenance; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace Aitex.Sorter.UI.Views.Maintenance { /// /// Robot.xaml 的交互逻辑 /// public partial class RobotView : UserControl, IBaseView { private RobotViewModel robotViewModel; public RobotView() { InitializeComponent(); robotViewModel = new RobotViewModel(4); efem.SubscribeKeys(robotViewModel); robotControl.SubscribeKeys(robotViewModel); DataContext = robotViewModel; IsVisibleChanged += Robot_IsVisibleChanged; } private void Robot_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { robotViewModel.EnableTimer(IsVisible); } } }