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)); public readonly IRecordInStoreServices? _recordInstoreServices; private BeforeFoamingPageView beforeFoaming = new BeforeFoamingPageView(); private AfterFoamingPageView afterFoaming = new AfterFoamingPageView(); LinerInventory linerInventoryView =new LinerInventory(); ShellInventory shellInventoryView =new ShellInventory(); public RealTimeInventoryPageViewModel() { InventoryControl = beforeFoaming; } #region 参数定义 /// /// 切换界面 /// 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; case "ShellInventory"://壳库 InventoryControl = shellInventoryView; break; case "LinerInventory"://胆库 InventoryControl = linerInventoryView; break; default: break; } } #endregion } }