Exemple #1
0
        public MenuItemFeature(ResourceManager resourceManager, XmlNode node, PluginDescriptor plugin, ParentMenuItemFeature parentFeature)
            : base(resourceManager, node, plugin)
        {
            _parentFeature = parentFeature;
            _menu = Helpers.GetEnumXmlAttribute<PluginMenu>(node, ATT_MENU, PluginMenu.none);
            _contextMenu = Helpers.GetEnumXmlAttribute<PluginContextMenu>(node, ATT_CONTEXT_MENU, GetContextMenuFromMenu(_menu));
            _serialization = Helpers.GetEnumXmlAttribute<PluginSerializationLevel>(node, ATT_SERIALIZED, PluginSerializationLevel.none);

            foreach (XmlNode child in node.ChildNodes)
            {   
                switch (child.Name)
                {
                    case TYPE_SHELL:
                        _shellCmd = new ShellCmd(child, paramsFromXML(child));
                        break;
                    case TYPE_POWERSHELL:
                        _shellCmd = new PowerShellCmd(child, paramsFromXML(child));
                        break;
                    case TYPE_XENSERVER_POWERSHELL:
                        _shellCmd = new XenServerPowershellCmd(child, paramsFromXML(child));
                        break;
                }
                return;
            }
        }
 public ParentMenuItemFeatureCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection, ParentMenuItemFeature owner, Search search)
     : base(mainWindow, selection)
 {
     Util.ThrowIfParameterNull(owner, "owner");
     _owner = owner;
     _search = search;
 }
 public ParentMenuItemFeatureCommand(IMainWindow mainWindow, IEnumerable <SelectedItem> selection, ParentMenuItemFeature owner, Search search)
     : base(mainWindow, selection)
 {
     Util.ThrowIfParameterNull(owner, "owner");
     _owner  = owner;
     _search = search;
 }
Exemple #4
0
        public MenuItemFeature(ResourceManager resourceManager, XmlNode node, PluginDescriptor plugin, ParentMenuItemFeature parentFeature)
            : base(resourceManager, node, plugin)
        {
            _parentFeature = parentFeature;
            _menu          = Helpers.GetEnumXmlAttribute <PluginMenu>(node, ATT_MENU, PluginMenu.none);
            _contextMenu   = Helpers.GetEnumXmlAttribute <PluginContextMenu>(node, ATT_CONTEXT_MENU, GetContextMenuFromMenu(_menu));
            _serialization = Helpers.GetEnumXmlAttribute <PluginSerializationLevel>(node, ATT_SERIALIZED, PluginSerializationLevel.none);

            foreach (XmlNode child in node.ChildNodes)
            {
                switch (child.Name)
                {
                case TYPE_SHELL:
                    _shellCmd = new ShellCmd(child, paramsFromXML(child));
                    break;

                case TYPE_POWERSHELL:
                    _shellCmd = new PowerShellCmd(child, paramsFromXML(child));
                    break;

                case TYPE_XENSERVER_POWERSHELL:
                    _shellCmd = new XenServerPowershellCmd(child, paramsFromXML(child));
                    break;
                }
                return;
            }
        }