using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Controls; namespace WPFWCSDemo.ViewModels { public partial class DevicesNavigationViewModel:ObservableObject { private readonly Frame _navigationFrame; public DevicesNavigationViewModel(Frame navigationFrame) { _navigationFrame = navigationFrame; } /// /// 打开设备清单 /// [RelayCommand] void OpenDevicePage() { _navigationFrame.Navigate(new Uri($"Views\\Devices\\DeviceListView.xaml", UriKind.Relative)); } /// /// 打开堆垛机窗口 /// [RelayCommand] void OpenStackerPage() { _navigationFrame.Navigate(new Uri($"Views\\Devices\\StackersView.xaml", UriKind.Relative)); } /// /// 打开输送机窗口 /// [RelayCommand] void OpenConvPage() { _navigationFrame.Navigate(new Uri($"Views\\Devices\\ConvsView.xaml", UriKind.Relative)); } /// /// 打开提升机窗口 /// [RelayCommand] void OpenLiftPage() { _navigationFrame.Navigate(new Uri($"Views\\Devices\\LiftsView.xaml", UriKind.Relative)); } /// /// 打开RGV窗口 /// [RelayCommand] void OpenRGVPage() { _navigationFrame.Navigate(new Uri($"Views\\Devices\\RGVsView.xaml", UriKind.Relative)); } } }