}// DoesItemHavePropPage public override CPropPage[] CreateNewPropPages(Object o) { int iIndex = (int)o; m_iDisplayedPerm = iIndex - 1; int nPropPageIndex = GetPermissionIndex((IPermission)m_alPermissions[m_iDisplayedPerm]); if (nPropPageIndex == CUSTOM) { CPropPage page = FindCustomPropPage(iIndex - 1); if (page == null) { page = new CCustomPermPropPage((IPermission)m_alPermissions[m_iDisplayedPerm]); AddCustomPropPage(page, iIndex - 1); } return(new CPropPage[] { page }); } else { if (m_permProps == null) { CreatePropertyPages(); } return(new CPropPage[] { m_permProps[nPropPageIndex] }); } }// ApplyPropPages
internal CAddPermissionsWizard(CPSetWrapper ps) { m_ps = ps; m_sName = "Add Permissions Wizard"; m_aPropSheetPage = new CPropPage[] { new CNewPermSetWiz2(Security.CreatePermissionArray(m_ps.PSet)) }; m_fFinished = false; }// CNewPermSetWizard
}// TaskPadTaskNotify protected override void CreatePropertyPages() { if (m_aPropSheetPage == null) { m_aPropSheetPage = new CPropPage[] { new CSinglePermissionSetProp(m_psetWrapper, ReadOnly) } } ; // Create property pages for each permission type we know about if (m_permProps == null) { m_permProps = new CPropPage[19]; m_permProps[0] = new CUIPermPropPage(m_psetWrapper); m_permProps[1] = new CSecPermPropPage(m_psetWrapper); m_permProps[2] = new CReflectPermPropPage(m_psetWrapper); m_permProps[3] = new CIsoStoragePermPropPage(m_psetWrapper); m_permProps[4] = new CDNSPermPropPage(m_psetWrapper); m_permProps[5] = new CEnvPermPropPage(m_psetWrapper); m_permProps[6] = new CFileIOPermPropPage(m_psetWrapper); m_permProps[7] = new CRegPermPropPage(m_psetWrapper); m_permProps[8] = new CSocketPermPropPage(m_psetWrapper); m_permProps[9] = new CWebPermPropPage(m_psetWrapper); m_permProps[10] = new CDirectoryServicesPermPropPage(m_psetWrapper); m_permProps[11] = new CEventLogPermPropPage(m_psetWrapper); m_permProps[12] = new CFileDialogPermPropPage(m_psetWrapper); m_permProps[13] = new CPerformanceCounterPermPropPage(m_psetWrapper); m_permProps[14] = new CPrintingPermPropPage(m_psetWrapper); m_permProps[15] = new CServiceControllerPermPropPage(m_psetWrapper); m_permProps[16] = new CSQLClientPermPropPage(m_psetWrapper); m_permProps[17] = new COleDbPermPropPage(m_psetWrapper); m_permProps[18] = new CMessageQueuePermPropPage(m_psetWrapper); } }// CreatePropertyPages
}// CreatePropertyPages internal void CreateSinglePropertyPage(IPropertySheetCallback lpProvider, CPropPage ppage) { PROPSHEETPAGE psp = new PROPSHEETPAGE(); IntPtr hPage; // Fill in the property sheet page structure with the appropriate info psp.dwSize = 48; psp.dwFlags = PSP.DEFAULT | PSP.DLGINDIRECT | PSP.USETITLE | PSP.USEHEADERTITLE | PSP.USEHEADERSUBTITLE; psp.hInstance = m_hModule; // We're using just a plain resource file as a "placeholder" for our WFC // placed controls psp.pResource = ppage.GetDialogTemplate(); psp.pszTitle = ppage.Title(); psp.hIcon = ppage.Icon(); psp.pszHeaderTitle = ppage.HeaderTitle(); psp.pszHeaderSubTitle = ppage.HeaderSubTitle(); // See if our property page uses a icon if (psp.hIcon != (IntPtr)(-1)) { psp.dwFlags |= PSP.USEHICON; } // See if our property page uses a title if (ppage.Title() != null) { psp.dwFlags |= PSP.USETITLE; } // See if the property page uses a header title if (psp.pszHeaderTitle != null) { psp.dwFlags |= PSP.USEHEADERTITLE; } // See if the property page uses a header subtitle if (psp.pszHeaderSubTitle != null) { psp.dwFlags |= PSP.USEHEADERSUBTITLE; } psp.pfnDlgProc = ppage.DialogProc; hPage = CreatePropertySheetPage(ref psp); // See if we were able to register the property page if (hPage == (IntPtr)0) { MessageBox("Couldn't create the property page", "", 0); throw new Exception("Unable to RegisterPropertyPage"); } else { // Add the page to the property sheet lpProvider.AddPage(hPage); } }// CreateSinglePropertyPage
}// ApplyPropPages private void AddCustomPropPage(CPropPage page, int nIndex) { CustomPages cp = new CustomPages(); cp.nIndex = nIndex; cp.ppage = page; m_alCustomPropPages.Add(cp); }// AddCustomPropPage
internal CConfigAssemWizard(CApplicationDepends appDepends) { m_sName = "Configure Assembly Wizard"; m_sDisplayName = "Assembly Wizard"; m_aPropSheetPage = new CPropPage[] { new CConfigAssemWiz1(appDepends) }; m_bri = null; }// CConfigAssemWizard
internal CCreateDeploymentPackageWizard(CGenSecurity node) { m_secNode = node; m_aPropSheetPage = new CPropPage[] { new CCreateDeploymentPackageWiz1(), new CCreateDeploymentPackageWiz3(), new CCreateDeploymentPackageWiz2() }; }// CCreateDeploymentPackageWizard
internal CSecurityAdjustmentWizard(bool fMachineReadOnly, bool fUserReadOnly) { m_sName = "Security Adjustment Wizard"; m_aPropSheetPage = new CPropPage[] { new CSecurityAdjustmentWiz1(fMachineReadOnly, fUserReadOnly), new CSecurityAdjustmentWiz2(), new CSecurityAdjustmentWiz3() }; m_alNewCodeGroups = new ArrayList(); m_tLevels = null; }// CSecurityAdjustmentWizard
internal CFullTrustWizard(bool fMachineReadOnly, bool fUserReadOnly) { m_aPropSheetPage = new CPropPage[] { new CTrustAppWiz1(fMachineReadOnly, fUserReadOnly), new CTrustAppWiz2(), new CTrustAppWiz3(), new CTrustAppWiz4(), new CTrustAppWiz5(), new CTrustAppWiz7(), new CTrustAppWiz8() }; m_fHasCertOrSName = false; m_fChangesMade = false; m_al = new AssemblyLoader(); }// CFullTrustWizard
}// CSingleCodeGroup protected override void CreatePropertyPages() { if (m_cg is UnionCodeGroup) { m_aPropSheetPage = new CPropPage[] { new CSingleCodeGroupProp(m_pl, m_cg), new CSingleCodeGroupMemCondProp(m_cg), new CSingleCodeGroupPSetProp(ref m_pl, ref m_cg) } } ; else // Non-Union Code group { m_aPropSheetPage = new CPropPage[] { new CSingleCodeGroupProp(m_pl, m_cg), new CCustomCodeGroupProp(m_cg) } }; }// CreatePropertyPages
}// TaskPadTaskNotify protected override void CreatePropertyPages() { // If this is for an application.... if (m_sConfigFilename != null) { m_aPropSheetPage = new CPropPage[] { new CRemotingProp1(m_sConfigFilename), new CRemotingProp2(m_sConfigFilename), new CRemotingProp3(m_sConfigFilename) }; } else { // For the machine level, we only get 1 property page m_aPropSheetPage = new CPropPage[] { new CRemotingProp3(m_sConfigFilename) } }; } // CreatePropertyPages } // class CSubServices
internal CNewCodeGroupWizard(PolicyLevel pl) { m_sName = "Create CodeGroup Wizard"; m_aPropSheetPage = new CPropPage[] { new CNewCodeGroupWiz1(pl), new CNewCodeGroupWiz2(), new CNewCodeGroupWiz3(pl), new CNewCodeGroupWiz4(), /* This wizard also allows the */ new CNewPermSetWiz1(pl), /* user to create a permission */ new CNewPermSetWiz2() /* set, which is why we are */ }; /* including those wizard pages*/ m_pl = pl; m_fOnPage1 = true; m_fNewPermissionSet = false; }// CNewCodeGroupWizard
internal CEvalAssemWizard() { m_sName = "Evaluate an Assembly Wizard"; m_aPropSheetPage = new CPropPage[] { new CEvalAssemWiz1(), new CEvalAssemWiz2(), new CEvalAssemWiz3() }; m_psGrantedPermissionSet = null; m_fGetPermissions = true; m_fPermErrors = false; m_sPermErrorMessage = null; m_fCGErrors = false; m_sCGErrorMessage = null; // Setup the threads we use to determine policy, and give them // appropriate priorities m_tPermissionSet = new Thread(new ThreadStart(CreateGrantedPermissionSet)); m_tpPermissionSet = ThreadPriority.Normal; SetThreadPriority(m_tPermissionSet, m_tpPermissionSet); m_tCodegroup = new Thread(new ThreadStart(CreateGrantedCodegroups)); m_tpCodegroup = ThreadPriority.Lowest; SetThreadPriority(m_tCodegroup, m_tpCodegroup); }// CEvalAssemWizard
}// HavePropertyPages protected override void CreatePropertyPages() { m_aPropSheetPage = new CPropPage[] { new CGeneralMachineProps() }; }// CreatePropertyPages
internal CNewPermSetWizard(PolicyLevel pl) { m_sName = "Add Permission Set Wizard"; m_aPropSheetPage = new CPropPage[] { new CNewPermSetWiz1(pl), new CNewPermSetWiz2() }; m_pl = pl; }// CNewPermSetWizard
}// MyAppInfo protected override void CreatePropertyPages() { m_aPropSheetPage = new CPropPage[] { new CAppProps(m_appInfo, m_bBigPic) }; }// CreatePropertyPages