示例#1
0
        public MainViewModel(IDatabaseContext dbService, IMessageBox messageBox)
        {
            _dbService  = dbService;
            _messageBox = messageBox;

            MainNavigation = new MainNavigationManager();

            //事件注册
            ShutdownProgramCommand = new ProxyRelayCommand(ExecuteShutdownProgramCommand);
            CloseCaseCommand       = new ProxyRelayCommand(ExecuteCloseCaseCommand);
        }
示例#2
0
        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);
        }