You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AUCMA_SCADA/Aucma.Core.BoxFoam/ViewModels/RealTimeInventoryPageViewMo...

60 lines
2.0 KiB
C#

using Admin.Core.IService;
using Aucma.Core.BoxFoam.Views.UserPage;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using log4net;
namespace Aucma.Core.BoxFoam.ViewModels
{
public partial class RealTimeInventoryPageViewModel : ObservableObject
{
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(RealTimeInventoryPageViewModel));
1 year ago
public readonly IRecordInStoreServices? _recordInstoreServices;
private BeforeFoamingPageView beforeFoaming = new BeforeFoamingPageView();
private AfterFoamingPageView afterFoaming = new AfterFoamingPageView();
1 year ago
LinerInventory linerInventoryView =new LinerInventory();
ShellInventory shellInventoryView =new ShellInventory();
public RealTimeInventoryPageViewModel()
{
InventoryControl = beforeFoaming;
}
#region 参数定义
/// <summary>
/// 切换界面
/// </summary>
public System.Windows.Controls.UserControl _inventoryControl;
public System.Windows.Controls.UserControl InventoryControl
{
get => _inventoryControl;
set => SetProperty(ref _inventoryControl, value);
}
#endregion
#region 泡前库|泡后库 页面切换
[RelayCommand]
public void InventoryOnClick(string content)
{
switch (content)
{
case "PqInventory":
InventoryControl = beforeFoaming;
break;
case "PhInventory":
InventoryControl = afterFoaming;
break;
1 year ago
case "ShellInventory"://壳库
InventoryControl = shellInventoryView;
break;
case "LinerInventory"://胆库
InventoryControl = linerInventoryView;
break;
default:
break;
}
}
#endregion
}
}