添加项目文件。
This commit is contained in:
66
WPFWCSDemo/ViewModels/DevicesNavigationViewModel.cs
Normal file
66
WPFWCSDemo/ViewModels/DevicesNavigationViewModel.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 打开设备清单
|
||||
/// </summary>
|
||||
[RelayCommand]
|
||||
void OpenDevicePage()
|
||||
{
|
||||
_navigationFrame.Navigate(new Uri($"Views\\Devices\\DeviceListView.xaml", UriKind.Relative));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 打开堆垛机窗口
|
||||
/// </summary>
|
||||
[RelayCommand]
|
||||
void OpenStackerPage()
|
||||
{
|
||||
_navigationFrame.Navigate(new Uri($"Views\\Devices\\StackersView.xaml", UriKind.Relative));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 打开输送机窗口
|
||||
/// </summary>
|
||||
[RelayCommand]
|
||||
void OpenConvPage()
|
||||
{
|
||||
_navigationFrame.Navigate(new Uri($"Views\\Devices\\ConvsView.xaml", UriKind.Relative));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 打开提升机窗口
|
||||
/// </summary>
|
||||
[RelayCommand]
|
||||
void OpenLiftPage()
|
||||
{
|
||||
_navigationFrame.Navigate(new Uri($"Views\\Devices\\LiftsView.xaml", UriKind.Relative));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 打开RGV窗口
|
||||
/// </summary>
|
||||
[RelayCommand]
|
||||
void OpenRGVPage()
|
||||
{
|
||||
_navigationFrame.Navigate(new Uri($"Views\\Devices\\RGVsView.xaml", UriKind.Relative));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user