Beispiel #1
0
 private void UpdateAction(Microsoft.ManagementConsole.Action action, ModuleAction moduleAction)
 {
     action.Enabled = moduleAction.IsEnabled();
 }
Beispiel #2
0
        private void AddAction(ModuleAction moduleAction, string name)
        {
            Microsoft.ManagementConsole.Action action = new Microsoft.ManagementConsole.Action();
            action.DisplayName = name;
            moduleAction.Tag = action;
            action.Tag = moduleAction;
            action.Triggered += ActionTriggeredHandler;

            // set image
            if(imageIndex.ContainsKey(moduleAction.ImageName)) {
                action.ImageIndex = imageIndex[moduleAction.ImageName];
            }

            UpdateAction(action, moduleAction);
            view.ActionsPaneItems.Add(action);
        }