}// class PropPagePairs internal CSharedAssemblies() { m_sGuid = "96821C0B-CBE2-4dc9-AC52-756A3361B07F"; m_sHelpSection = ""; m_hIcon = CResourceStore.GetHIcon("sharedassemblies_ico"); DisplayName = CResourceStore.GetString("CSharedAssemblies:DisplayName"); Name = "Assembly Cache"; m_taskPad = new CGenericTaskPad(this, "SHAREDASSEM_HTML"); m_fReadShowHTML = false; m_olAssems = Fusion.ReadFusionCache(); m_alResultPropPages = new ArrayList(); // Set up the blank icon m_hBlankIcon = CResourceStore.GetHIcon("blank_ico"); m_iBlankIconIndex = CResourceStore.GetIconCookie(m_hBlankIcon); m_hGACIcon = CResourceStore.GetHIcon("gac_ico"); m_iGACIconIndex = CResourceStore.GetIconCookie(m_hGACIcon); m_hZAPIcon = CResourceStore.GetHIcon("zap_ico"); m_iZAPIconIndex = CResourceStore.GetIconCookie(m_hZAPIcon); m_fAllowMultiSelectResults = true; }// CSharedAssemblies
}// AddAssemblyInfo internal void GenerateDependentAssemblies() { // Ok, let's see if we're currently being worked on.... m_thread.Suspend(); if (m_olAssems == null) { m_taskPadWaiting = new CGenericTaskPad(this, "LOADINGDEPENDASSEM_HTML"); m_oResults = m_taskPadWaiting; CNodeManager.Console.SelectScopeItem(HScopeItem); // If the thread is currently working on this node, m_ThreadNode will be this node. // The second case is a little more tricky. If this node is next in line, there's // the possibility that our thread that handles this will be a few instructions // away from getting him. We won't bother working with it then. if (!m_fIKnowMyDependencies && m_ThreadNode != this && m_alNodes[0] != this) { FindDependenciesForThisNode(this); m_fIKnowMyDependencies = true; } // Our thread is working on it... let's give it high priority... else { m_thread.Priority = ThreadPriority.Highest; } } m_thread.Resume(); }// GenerateDependentAssemblies
}// GetTaskPadBackground internal MMC_LISTPAD_INFO GetTaskPadListPadInfo(String pszGroup) { if (m_oResults is CTaskPad) { CTaskPad padinfo = (CTaskPad)m_oResults; return(padinfo.GetListPadInfo()); } throw new Exception("I don't have a taskpad!"); }// GetTaskPadListPadInfo
}// GetTaskPadDescription internal MMC_TASK_DISPLAY_OBJECT GetTaskPadBackground(String pszGroup) { if (m_oResults is CTaskPad) { CTaskPad padinfo = (CTaskPad)m_oResults; return(padinfo.GetBackground()); } throw new Exception("I don't have a taskpad!"); }// GetTaskPadBackground
}// GetTaskPadTitle internal String GetTaskPadDescription(String pszGroup) { if (m_oResults is CTaskPad) { CTaskPad padinfo = (CTaskPad)m_oResults; return(padinfo.GetDescription()); } throw new Exception("I don't have a taskpad!"); }// GetTaskPadDescription
internal CApplicationDepends(String sAppFile) { m_sGuid = "96821C0B-CBE2-4dc9-AC52-756A3361B07F"; m_sHelpSection = ""; m_hIcon = CResourceStore.GetHIcon("sharedassemblies_ico"); DisplayName = CResourceStore.GetString("CApplicationDepends:DisplayName"); Name = "Assembly Dependencies"; m_taskPadWaiting = new CGenericTaskPad(this, "WAITINGDEPENDASSEM_HTML"); m_taskPad = new CGenericTaskPad(this, "DEPENDASSEM_HTML"); m_fIKnowMyDependencies = false; m_fAllowListView = false; m_fAllowMultiSelectResults = true; m_fReadShowHTML = false; m_oResults = m_taskPadWaiting; m_olAssems = null; m_sAppFile = sAppFile; // Get icons for the assemblies we show m_hAssemIcon = CResourceStore.GetHIcon("gac_ico"); m_iAssemIconIndex = CResourceStore.GetIconCookie(m_hAssemIcon); // If we're not managed, then don't bother trying to have our dependencies // found if (!Fusion.isManaged(m_sAppFile)) { m_taskPad = new CGenericTaskPad(this, "UNMANAGEDDEPENDASSEM_HTML"); m_oResults = m_taskPad; m_fIKnowMyDependencies = true; } else { // Get ourselves in a queue to have our dependent assemblies discovered.... if (m_alNodes == null) { m_alNodes = ArrayList.Synchronized(new ArrayList()); } m_alNodes.Add(this); if (m_thread == null) { m_thread = new Thread(new ThreadStart(DependencyFinder)); } if (!m_thread.IsAlive) { m_thread.Priority = ThreadPriority.Lowest; m_thread.Start(); } } }// CApplicationDepends
}// 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
}// Paste internal bool HaveThisGroup(String group) { if (m_oResults is CTaskPad) { CTaskPad padinfo = (CTaskPad)m_oResults; if (padinfo.HaveGroup(group)) { return(true); } } return(false); }// HaveThisGroup
}// struct CustomPages internal CSinglePermissionSet(NamedPermissionSet permSet, PolicyLevel pl, bool fReadOnly) { base.ReadOnly = fReadOnly; m_sGuid = "E90A7E88-FB3C-4734-8245-0BEBCB4E6D63"; m_sHelpSection = ""; m_fReadShowHTML = false; m_fDeleted = false; m_pl = pl; m_psetWrapper = new CPSetWrapper(); m_psetWrapper.PSet = permSet; m_psetWrapper.PolLevel = m_pl; m_hIcon = CResourceStore.GetHIcon("permissionset_ico"); m_sDisplayName = permSet.Name; m_alCustomPropPages = new ArrayList(); // Set up the icons we'll be displaying for each permission m_hRestrictedIcon = CResourceStore.GetHIcon("permission_ico"); m_iRestrictedIndex = CResourceStore.GetIconCookie(m_hRestrictedIcon); m_hUnRestrictedIcon = CResourceStore.GetHIcon("permission_ico"); m_iUnRestrictedIndex = CResourceStore.GetIconCookie(m_hUnRestrictedIcon); m_fReadOnlyPermissionSet = false; try { // This line will throw an exception if we're trying to do this with a // reserved permission set m_pl.ChangeNamedPermissionSet(permSet.Name, permSet); } catch (Exception) { m_fReadOnlyPermissionSet = true; } m_taskpad = new CSinglePermSetTaskPad(this); m_oResults = m_taskpad; m_aPropSheetPage = null; // Get the permissions GenerateGivenPermissionsStringList(); m_permProps = null; }// CSinglePermissionSet
}// AddMenuItems internal override void MenuCommand(int iCommandID, Object oResultItem) { if (iCommandID == COMMANDS.FIND_DEPENDENTASSEMBLIES) { // Ok, let's see if we're currently being worked on.... m_thread.Suspend(); m_taskPadWaiting = new CGenericTaskPad(this, "LOADINGDEPENDASSEM_HTML"); m_oResults = m_taskPadWaiting; RefreshResultView(); // If the thread is currently working on this node, m_ThreadNode will be this node. // The second case is a little more tricky. If this node is next in line, there's // the possibility that our thread that handles this will be a few instructions // away from getting him. We won't bother working with it then. if (!m_fIKnowMyDependencies && m_ThreadNode != this && m_alNodes[0] != this) { FindDependenciesForThisNode(this); m_fIKnowMyDependencies = true; } // Our thread is working on it... let's give it high priority... else { m_thread.Priority = ThreadPriority.Highest; } m_thread.Resume(); } else if (iCommandID == COMMANDS.SHOW_LISTVIEW && m_fAllowListView) { m_oResults = this; RefreshResultView(); m_fShowHTMLPage = false; } else if (iCommandID == COMMANDS.SHOW_TASKPAD) { m_oResults = m_taskPad; m_fShowHTMLPage = true; // The HTML pages comes displayed with this checkbox marked. Make // sure we update the xml setting CConfigStore.SetSetting("ShowHTMLForDependAssem", "yes"); RefreshResultView(); } }// MenuCommand
}// MenuCommand internal override void Showing() { // Figure out what to display if (!m_fReadShowHTML) { m_taskPad = new CGenericTaskPad(this, "FULLTRUSTASSEM_HTML"); m_fShowHTMLPage = ((String)CConfigStore.GetSetting("ShowHTMLForFullTrustAssem")).Equals("yes"); if (m_fShowHTMLPage) { m_oResults = m_taskPad; } else { m_oResults = this; } m_fReadShowHTML = true; } }// Showing
}// TaskPadTaskNotify internal IEnumTASK GetIEnumTASK(String szTaskGroup) { if (m_oResults is CTaskPad) { CTaskPad padinfo = (CTaskPad)m_oResults; if (padinfo.HaveGroup(szTaskGroup)) { if (padinfo is IEnumTASK) { return((IEnumTASK)padinfo); } // We'll be using custom HTML pages to put in // tasks, so we'll give MMC a generic (aka dummy) IEnumTASK implementation else { return((IEnumTASK)this); } } throw new Exception("I don't have that group!"); } throw new Exception("I don't have a taskpad!"); }// GetIEnumTASK
}// CVersionPolicy (String) private void Setup(String sConfigFile) { m_sGuid = "1F84E89D-6357-47c0-AA50-F1F438A7EA6E"; m_sHelpSection = ""; m_hIcon = CResourceStore.GetHIcon("configassemblies_ico"); m_oResults = this; DisplayName = CResourceStore.GetString("CVersionPolicy:DisplayName"); Name = "Configured Assemblies"; m_aPropSheetPage = null; m_taskPad = new CVersionPolicyTaskPad(this, sConfigFile == null); m_fReadShowHTML = false; m_ol = null; m_sConfigFile = sConfigFile; m_fAllowMultiSelectResults = true; m_alResultPropPages = new ArrayList(); m_hGACIcon = CResourceStore.GetHIcon("gac_ico"); m_iGACIconIndex = CResourceStore.GetIconCookie(m_hGACIcon); }// Setup