public MainWindowModelView() : base(typeof(MainWindowModelView).Name) { NewProjectCommand = new RelayCommand(OnNewProjectCommand, x => !ProjectProvider.GetInstance().IsProjectActive()); OpenProjectCommand = new RelayCommand(OnOpenProjectCommand, x => !ProjectProvider.GetInstance().IsProjectActive()); CloseProjectCommand = new RelayCommand(OnCloseProjectCommand, x => ProjectProvider.GetInstance().IsProjectActive()); ExitCommand = new RelayCommand(OnExitCommand); GenerateCSVCommand = new RelayCommand(OnGenerateCSVCommand, x => ProjectProvider.GetInstance().IsProjectActive() && ModelViewsUtil.IsType(x, NavigationType.PROJECT)); GenerateLiquibaseCommand = new RelayCommand(OnGenerateLiquibaseCommand, x => ProjectProvider.GetInstance().IsProjectActive() && ModelViewsUtil.IsType(x, NavigationType.PROJECT)); GenerateGuidCommand = new RelayCommand(OnGenerateGuidCommand); SettingsCommand = new RelayCommand(OnSettingsCommand, x => ProjectProvider.GetInstance().IsProjectActive()); AboutCommand = new RelayCommand(OnAboutCommand); }
protected override void OnSuccessful(ExecutionEvent executionEvent, Guid affectedObjectId) { Publisher.GetInstance().ServerChanged(null); ProjectProvider.GetInstance().SetProjectActive(false); }