public MainViewModel(IDatabaseContext dbService, IMessageBox messageBox) { _dbService = dbService; _messageBox = messageBox; MainNavigation = new MainNavigationManager(); //事件注册 ShutdownProgramCommand = new ProxyRelayCommand(ExecuteShutdownProgramCommand); CloseCaseCommand = new ProxyRelayCommand(ExecuteCloseCaseCommand); }
public MainViewModel(ILogicalDataContext dbService, IMessageBox messageBox) { _dbService = dbService; _messageBox = messageBox; MainNavigation = new MainNavigationManager(); SystemContext.Instance.CaseChanged += Instance_CaseChanged; //事件注册 OpenCaseEditCommand = new RelayCommand(ExecuteOpenCaseEditCommand); MainViewLoadedCommand = new RelayCommand(ExecuteMainViewLoadedCommand); ShutdownProgramCommand = new ProxyRelayCommand(ExecuteShutdownProgramCommand); CloseCaseCommand = new ProxyRelayCommand(ExecuteCloseCaseCommand); ExportCommand = new ProxyRelayCommand(ExecuteExportCommand); UserManagementCommand = new ProxyRelayCommand(ExecuteUserManagementCommand); CaseManagementCommand = new ProxyRelayCommand(ExecuteCaseManagementCommand); SysSettingCommand = new ProxyRelayCommand(ExecuteSysSettingCommand); PluginManagementCommand = new ProxyRelayCommand(ExecutePluginManagementCommand); }