Exemple #1
0
        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");
        }
Exemple #2
0
        public override void OnCreateRibbon(IRibbonManager ribbonManager)
        {
            var br = ribbonManager.GetLineBreak();

            var panelManager = ribbonManager.CreatePanel("CommandErrorHandlerSamples");

            panelManager.AddPushButton <ExceptionControlledByAppCommand>($"Error{br}Handling");
        }
Exemple #3
0
        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");
        }
Exemple #4
0
        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");
        }
Exemple #5
0
 public MsiViewModel(IRibbonManager ribbonManager)
     : base(ribbonManager)
 {
     IMsiModelAdditional model = Model as IMsiModelAdditional;
       WixPropertyGridControlDataSource = new WixPropertyGridControlDataSourceWrapper(model.InstallDirectories, model.CheckInstallDirectoryForDeleting);
 }
Exemple #6
0
 public override BuilderViewModel Create(IRibbonManager ribbonManager)
 {
     return new MsiViewModel(ribbonManager);
 }
Exemple #7
0
 public MspViewModel(IRibbonManager ribbonManager) : base(ribbonManager) { }
Exemple #8
0
 /// <summary>
 /// Lifecycle hook to create Ribbon UI when Revit starts.
 /// </summary>
 public virtual void OnCreateRibbon(IRibbonManager ribbonManager)
 {
 }
Exemple #9
0
 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);