public override void OnCreateRibbon(IRibbonManager ribbonManager) { var br = ribbonManager.GetLineBreak(); var panelManager = ribbonManager.CreatePanel("App Command Panel"); panelManager.AddPushButton <SingleGuardOnAppCommand>($"Single Guard{br}on App"); }
public override void OnCreateRibbon(IRibbonManager ribbonManager) { var br = ribbonManager.GetLineBreak(); var panelManager = ribbonManager.CreatePanel("CommandErrorHandlerSamples"); panelManager.AddPushButton <ExceptionControlledByAppCommand>($"Error{br}Handling"); }
public override void OnCreateRibbon(IRibbonManager ribbonManager) { // Here you can create Ribbon tabs, panels and buttons var br = ribbonManager.GetLineBreak(); // Adds a Ribbon Panel to the Addins tab var addinPanelManager = ribbonManager.CreatePanel("Grid Generator"); addinPanelManager.AddPushButton <GridGeneratorCommand, AvailableOnProject>($"Grid{br}Generator", "onbox_logo"); }
public override void OnCreateRibbon(IRibbonManager ribbonManager) { // Here you can create Ribbon tabs, panels and buttons var br = ribbonManager.GetLineBreak(); // Adds a Ribbon Panel to the Addins tab var addinPanelManager = ribbonManager.CreatePanel("$safeprojectname$"); addinPanelManager.AddPushButton <HelloCommand, AvailableOnProject>($"Hello{br}Framework", "onbox_logo"); // Adds a new Ribbon Tab with a new Panel var panelManager = ribbonManager.CreatePanel("$safeprojectname$", "Hello Panel"); panelManager.AddPushButton <HelloCommand, AvailableOnProject>($"Hello{br}Framework", "onbox_logo"); }
public MsiViewModel(IRibbonManager ribbonManager) : base(ribbonManager) { IMsiModelAdditional model = Model as IMsiModelAdditional; WixPropertyGridControlDataSource = new WixPropertyGridControlDataSourceWrapper(model.InstallDirectories, model.CheckInstallDirectoryForDeleting); }
public override BuilderViewModel Create(IRibbonManager ribbonManager) { return new MsiViewModel(ribbonManager); }
public MspViewModel(IRibbonManager ribbonManager) : base(ribbonManager) { }
/// <summary> /// Lifecycle hook to create Ribbon UI when Revit starts. /// </summary> public virtual void OnCreateRibbon(IRibbonManager ribbonManager) { }
public override void OnCreateRibbon(IRibbonManager ribbonManager) { }
public BuilderViewModel(IRibbonManager ribbonManager) { ribbonTransactionName = Guid.NewGuid().ToString(); // Начинаем транзакцию Ribbon. Удаление в Dispose()->DisposeUnmanagedResources(). RibbonManager = ribbonManager; RibbonManager.BeginTransaction(ribbonTransactionName); // Создаем модель. Model = BuilderModelFactory.Create(); // Все измененные свойства пересылаем View. Model.PropertyChanged += (sender, e) => { NotifyPropertyChanged(e.PropertyName); }; CustomizeRibbon(); // Удаление выделенного элемента. // Используется в TreeListControl в контекстном меню. // Запрещаем удаление для элеметов "только чтение". RemoveSelectedItemCommand = new RelayCommand(param => RemoveSelectedItem(), (obj) => { return !SelectedItem.IsReadOnly; }); }
public abstract BuilderViewModel Create(IRibbonManager ribbonManager);