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); }
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)); }