public CompositeTypeDetailsTreeModelView()
     : base("CompositeTypeDetailsTreeModelView")
 {
     NewPresetCommand    = new RelayCommand(OnNewPresetCommand, x => ModelViewsUtil.IsType(x, NavigationType.FOLDER));
     DeleteCommand       = new RelayCommand(OnDeleteCommand, x => ModelViewsUtil.IsType(x, NavigationType.PRESET) && !ModelViewsUtil.IsBuiltIn(x));
     UpdateCommand       = new RelayCommand(OnUpdateCommand, x => ModelViewsUtil.IsType(x, NavigationType.PRESET, NavigationType.COMPOSITE_PRESET_ELEMENT) && !ModelViewsUtil.IsBuiltIn(x));
     SetAsDefaultCommand = new RelayCommand(OnSetAsDefaultCommand, x => ModelViewsUtil.IsType(x, NavigationType.PRESET));
 }
 public CompositeTypeTreeModelView()
     : base("CompositeTypeTreeModelView")
 {
     NewFolderCommand                = new RelayCommand(OnNewFolderCommand, x => ModelViewsUtil.IsType(x, NavigationType.PROJECT, NavigationType.FOLDER) && !ModelViewsUtil.IsBuiltIn(x));
     NewCompositeTypeCommand         = new RelayCommand(OnNewCompositeTypeCommand, x => ModelViewsUtil.IsType(x, NavigationType.FOLDER) && !ModelViewsUtil.IsBuiltIn(x));
     NewCompmositeTypeElementCommand = new RelayCommand(OnNewCompmositeTypeElementCommand, x => ModelViewsUtil.IsType(x, NavigationType.COMPOSITE_TYPE) && !ModelViewsUtil.IsBuiltIn(x));
     GenerateClassCommand            = new RelayCommand(OnGenerateClassCommand, x => ModelViewsUtil.IsType(x, NavigationType.COMPOSITE_TYPE));
     DeleteCommand = new RelayCommand(OnDeleteCommand, x => !ModelViewsUtil.IsBuiltIn(x) && ModelViewsUtil.IsType(x, NavigationType.FOLDER, NavigationType.COMPOSITE_TYPE, NavigationType.TYPE_ELEMENT));
     UpdateCommand = new RelayCommand(OnUpdateCommand, x => !ModelViewsUtil.IsBuiltIn(x) && ModelViewsUtil.IsType(x, NavigationType.FOLDER, NavigationType.COMPOSITE_TYPE, NavigationType.TYPE_ELEMENT));
     CutCommand    = new RelayCommand(OnCutCommand, x => false);
     CopyCommand   = new RelayCommand(OnCopyCommand, x => false);
     PasteCommand  = new RelayCommand(OnPasteCommand, x => false);
 }
Beispiel #3
0
 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);
 }