}// onRestoreView internal override void TaskPadTaskNotify(Object arg, Object param, IConsole2 con, CData com) { if ((int)arg == 1) { CConfigStore.SetSetting("ShowHTMLForSharedAssem", (bool)param?"yes":"no"); m_fShowHTMLPage = (bool)param; // We'll change the result object but we won't refresh our result view // because the user doesn't necesarily want that to happen. However, // the next time the user visits this node, they will see the new result // view m_oResults = m_fShowHTMLPage?(Object)m_taskPad:(Object)this; } else if ((int)arg == 0) { m_oResults = this; RefreshResultView(); } else if ((int)arg == 2) { MenuCommand(COMMANDS.ADD_GACASSEMBLY, null); // Inform our Command History that we did this CCommandHistory.CommandExecuted(new CDO(this), COMMANDS.ADD_GACASSEMBLY); } }// TaskPadTaskNotify
}// Command //------------------------------------------------------- // Stuff for IExtendPropertySheet2 - This will only be // called for stuff in the scope view //------------------------------------------------------- //------------------------------------------------- // CreatePropertyPages // // MMC calls this function when it wants a property // page for a specified node. //------------------------------------------------- public int CreatePropertyPages(IPropertySheetCallback lpProvider, IntPtr handle, IDataObject lpIDataObject) { // This is really a CDO in disguise CDO victim = (CDO)lpIDataObject; // See if I really need to do this.... if (m_ucsole != null) { IPropertySheetProvider psp = (IPropertySheetProvider)m_ucsole; if (psp.FindPropertySheet(victim.Node.Cookie, null, victim) == HRESULT.S_OK) { return(HRESULT.S_FALSE); } } // Let's see if this node has property pages if (victim.Node != null && victim.Node.HavePropertyPagesCreate) { // If we've fired up a wizard, then that command has already been // logged (either from the menu command or the history list command. // We don't need to record this any further. if (!(victim.Node is CWizard)) { CCommandHistory.CommandExecuted(victim, -1); } victim.Node.CreatePropertyPages(lpProvider, handle); return(HRESULT.S_OK); } // We don't have any property pages, let's return false else { return(HRESULT.S_FALSE); } }// CreatePropertyPages
}// MenuCommand internal override void TaskPadTaskNotify(Object arg, Object param, IConsole2 con, CData com) { // We want to browse this apps properties if ((int)arg == 0) { OpenMyPropertyPage(); } // We want to browse the Assembly Dependencies else if ((int)arg == 1) { CNode node = FindChild("Assembly Dependencies"); CNodeManager.SelectScopeItem(node.HScopeItem); node.MenuCommand(COMMANDS.SHOW_LISTVIEW); } // We want to Configure Assemblies else if ((int)arg == 2) { CNode node = FindChild("Configured Assemblies"); CNodeManager.SelectScopeItem(node.HScopeItem); } // We want to go to remoting node else if ((int)arg == 3) { CNode node = FindChild("Remoting Services"); CNodeManager.SelectScopeItem(node.HScopeItem); node.OpenMyPropertyPage(); } else if ((int)arg == 4) { MenuCommand(COMMANDS.FIX_APPLICATION); // Inform our Command History that we did this CCommandHistory.CommandExecuted(new CDO(this), COMMANDS.FIX_APPLICATION); } }// TaskPadTaskNotify
}// AddMenuItems //------------------------------------------------- // Command // // This function is called whenever an item that we // added to the context menus is called //------------------------------------------------- public void Command(int lCommandID, IDataObject piDataObject) { CDO item = (CDO)piDataObject; // Tell our command history about this CCommandHistory.CommandExecuted(item, lCommandID); item.Node.MenuCommand(lCommandID, item.Data); }// Command
}// MenuCommand internal override void TaskPadTaskNotify(Object arg, Object param, IConsole2 con, CData com) { if ((int)arg == 0) { // We need to pop up the Create New Permission Set wizard MenuCommand(COMMANDS.NEW_PERMISSIONSET); // Inform our Command History that we did this CCommandHistory.CommandExecuted(new CDO(this), COMMANDS.NEW_PERMISSIONSET); } }// TaskPadTaskNotify
}// AddMenuItems //------------------------------------------------- // Command // // This function is called whenever an item that we // added to the context menus is called //------------------------------------------------- public void Command(int lCommandID, IDataObject piDataObject) { CDO item = (CDO)piDataObject; CCommandHistory.CommandExecuted(item, lCommandID); if (item.Data != null) { item.Node.MenuCommand(lCommandID, item.Data); } else { item.Node.MenuCommand(lCommandID); } }// Command
}// CGenAppTaskPad internal override void Notify(Object arg, Object param, IConsole2 con, CData com) { if ((int)arg == 1) { // We need to fire up the Add application wizard. m_myNode.MenuCommand(COMMANDS.ADD_APPLICATION); // Inform our Command History that we did this CCommandHistory.CommandExecuted(new CDO(m_myNode), COMMANDS.ADD_APPLICATION); } else if ((int)arg == 2) { m_myNode.MenuCommand(COMMANDS.FIX_APPLICATION); // Inform our Command History that we did this CCommandHistory.CommandExecuted(new CDO(m_myNode), COMMANDS.FIX_APPLICATION); } }// Notify
}// CheckCurrentPermissions internal override void TaskPadTaskNotify(Object arg, Object param, IConsole2 con, CData com) { if ((int)arg == 0) { // We need to pop up the "Trust an App Wizard" MenuCommand(COMMANDS.TRUST_ASSEMBLY); // Inform our Command History that we did this CCommandHistory.CommandExecuted(new CDO(this), COMMANDS.TRUST_ASSEMBLY); } if ((int)arg == 1) { // We need to pop up the "Adjust Security Settings Wizard" MenuCommand(COMMANDS.ADJUST_SECURITYPOLICY); // Inform our Command History that we did this CCommandHistory.CommandExecuted(new CDO(this), COMMANDS.ADJUST_SECURITYPOLICY); } if ((int)arg == 2) { // We need to pop up the "Evaluate Assembly" MenuCommand(COMMANDS.EVALUATE_ASSEMBLY); // Inform our Command History that we did this CCommandHistory.CommandExecuted(new CDO(this), COMMANDS.EVALUATE_ASSEMBLY); } if ((int)arg == 3) { // We need to pop up the "Create Deployment Package Wizard" MenuCommand(COMMANDS.CREATE_MSI); // Inform our Command History that we did this CCommandHistory.CommandExecuted(new CDO(this), COMMANDS.CREATE_MSI); } if ((int)arg == 4) { // We need to do the reset thing MenuCommand(COMMANDS.RESET_POLICY); // Inform our Command History that we did this CCommandHistory.CommandExecuted(new CDO(this), COMMANDS.RESET_POLICY); } }// TaskPadTaskNotify
}// GetListPadInfo //------------------------------------------------------- // Stuff for IExtendPropertySheet2 - This will only be called // on Property sheets in the result view //------------------------------------------------------- //------------------------------------------------- // CreatePropertyPages // // MMC calls this function when it wants a property // page for a specified node. //------------------------------------------------- public int CreatePropertyPages(IPropertySheetCallback lpProvider, IntPtr handle, IDataObject lpIDataObject) { // This is really a CDO in disguise CDO victim = (CDO)lpIDataObject; // See if we're asking for property pages based on a result item if (victim.Data != null && victim.Node.DoesResultHavePropertyPage(victim.Data)) { CCommandHistory.CommandExecuted(victim, -1); victim.Node.CreateResultPropertyPages(lpProvider, handle, victim.Data); } // We don't have any property pages, let's return false else { MessageBox(0, "Got a false positive", "", 0); return(HRESULT.S_FALSE); } return(HRESULT.S_OK); }// CreatePropertyPages