}// CIntroTaskPad internal override void Notify(Object arg, Object param, IConsole2 con, CData com) { String sNodeToOpen = null; // We want to browse the shared assemblies if ((int)arg == 1) { sNodeToOpen = "Assembly Cache"; } // We want to Configure Assemblies else if ((int)arg == 2) { sNodeToOpen = "Configured Assemblies"; } // We want to set Security Policy else if ((int)arg == 3) { sNodeToOpen = "Runtime Security Policy"; } // We want to go to remoting node else if ((int)arg == 4) { CNode node = m_myNode.FindChild("Remoting Services"); CNodeManager.SelectScopeItem(node.HScopeItem); node.OpenMyPropertyPage(); } // We want to go to the applications node else if ((int)arg == 5) { sNodeToOpen = "Applications"; } // This is a CommandHistory item else if ((int)arg >= 100) { CCommandHistory.FireOffCommand((int)arg); } else { MessageBox(0, "Error in web page! I don't know what to do!", "", 0); } if (sNodeToOpen != null) { CNode node = m_myNode.FindChild(sNodeToOpen); // This node must have a shared assemblies node... if it doesn't, then the // node hasn't added it's children yet. We'll force it to do that, and try // again if (node == null) { m_myNode.CreateChildren(); node = m_myNode.FindChild(sNodeToOpen); } CNodeManager.Console.SelectScopeItem(node.HScopeItem); } }// Notify
public LWHost() { // Create the form AddWinformsControls(); // Now build our MMC stuff m_cData = new CData(); // This will give CData access to the interfaces we implement m_cData.Initialize(this); m_cData.CreateComponent(out m_component); ExpandNodeList(); }// LWHost
}// Init internal override void Notify(Object arg, Object param, IConsole2 con, CData com) { if ((int)arg == 1) { // We want to add a code condition for this machine } else if ((int)arg == 2) { // We want to edit a code condition for this machine } else if ((int)arg == 3) { // We want to Add a code condition for a specific user } else if ((int)arg == 4) { // We want to edit a code condition for a specific user } else if ((int)arg == 5) { // We want to add a permission set for a specific machine } else if ((int)arg == 6) { // We want to edit a permission set for a specific machine } else if ((int)arg == 7) { // We want to add a permission set for a specific user } else if ((int)arg == 8) { // We want to edit a permission set for a specific user } else if ((int)arg == 9) { // We want to add permissions } else if ((int)arg == 10) { // We want to remove permissions } else if ((int)arg == 11) { } else { base.Notify(arg, param, con, com); } }// Notify
// Methods to implement IEnumTask internal void BaseTaskPadTaskNotify(Object arg, Object param, IConsole2 con, CData com) { // Check to see if this is a HTML page telling us that it finished // loading.... if (arg is int && (int)arg == 100) { m_fStartResultRefresh = false; if (m_fWantToMakePropertyPageVisible) { ShowMyPropertyPageIfOpen(); } } TaskPadTaskNotify(arg, param, con, com); }// TaskPadTaskNotify
}// 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
}// onRestoreView internal override void TaskPadTaskNotify(Object arg, Object param, IConsole2 con, CData com) { if ((int)arg == 1) { CConfigStore.SetSetting("ShowHTMLForDependAssem", (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.FIND_DEPENDENTASSEMBLIES, null); } }// TaskPadTaskNotify
}// PSet internal override void TaskPadTaskNotify(Object arg, Object param, IConsole2 con, CData com) { if ((int)arg == 0) { m_oResults = this; RefreshResultView(); } else if ((int)arg == 1) { MenuCommand(COMMANDS.ADD_PERMISSIONS); } else if ((int)arg == 2) { OpenMyPropertyPage(); } else if ((int)arg == 3) { CConfigStore.SetSetting("ShowHTMLForPermissionSet", (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; } }// TaskPadTaskNotify
}// MenuCommand internal override void TaskPadTaskNotify(Object arg, Object param, IConsole2 con, CData com) { if ((int)arg == 1) { OpenMyPropertyPage(); } else if ((int)arg == 2) { // We want to Add a child code group to this codegroup MenuCommand(COMMANDS.CREATE_CODEGROUP); } }// TaskPadTaskNotify
}// 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
}// TaskPadTaskNotify internal virtual void TaskPadTaskNotify(Object arg, Object param, IConsole2 con, CData com) { if (m_oResults is CTaskPad) { CTaskPad padinfo = (CTaskPad)m_oResults; padinfo.Notify(arg, param, con, com); } else { throw new Exception("I don't have a taskpad!"); } }// TaskPadTaskNotify
}// 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
}// HaveGroup internal virtual void Notify(Object arg, Object param, IConsole2 con, CData com) { throw new Exception("I don't support his notification"); }// Notify
}// CRemoting internal override void TaskPadTaskNotify(Object arg, Object param, IConsole2 con, CData com) { if ((int)arg == 0) { // We need to pop up this node's property page OpenMyPropertyPage(); } }// TaskPadTaskNotify
private CData m_Data; // Holds the ComponentData //------------------------------------------------- // CComponent // // The constructor takes in a reference to the nodes // used in the snapin and saves it //------------------------------------------------- internal CComponent(CData data) { m_hToolbarBMP = (IntPtr)0; m_Data = data; }// CComponent
}// 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