}// InsertPropSheetPageControls internal bool PutValuesinPage() { m_txtAssemEval.Text = m_sAssemName; // Make sure this starts off enabled m_btnViewPerm.Enabled = true; m_lblLevelEvalVal.Text = CEvalAssemWizard.GetDisplayString(m_nPolicyLevel); // Display the various permissions in the currently selected permission set m_lvPermissions.Items.Clear(); if (m_ps != null) { if (m_ps.IsUnrestricted()) { ListViewItem lvi = new ListViewItem(CResourceStore.GetString("Unrestricted"), UNRESTRICTEDIMAGEINDEX); m_lvPermissions.Items.Add(lvi); m_btnViewPerm.Enabled = false; } else { IEnumerator permEnumerator = m_ps.GetEnumerator(); while (permEnumerator.MoveNext()) { IPermission perm = (IPermission)permEnumerator.Current; int nImageIndex = DeterminePermissionIcon(perm); ListViewItem lvi = new ListViewItem(Security.GetDisplayStringForPermission(perm), nImageIndex); m_lvPermissions.Items.Add(lvi); } } } m_txtAssemEval.Select(0, 0); return(true); }// PutValuesinPage
}// InsertPropSheetPageControls internal bool PutValuesinPage() { m_txtAssemEval.Text = m_sAssemName; m_txtAssemEval.Select(0, 0); m_txtLevelEval.Select(0, 0); m_txtLevelEval.Text = CEvalAssemWizard.GetDisplayString(m_nPolicyLevel); m_tvCodegroups.Nodes.Clear(); // Figure out the real policy level if (m_nPolicyLevel != CEvalAssemWizard.ALL_CODEGROUPS) { // We only want to show one policy level // Figure out what Icon, index, and display string to use int nImageIndex = ENTERPRISENODE; if (m_nPolicyLevel == CEvalAssemWizard.ENTERPRISE_CODEGROUPS) { nImageIndex = ENTERPRISENODE; } else if (m_nPolicyLevel == CEvalAssemWizard.MACHINE_CODEGROUPS) { nImageIndex = MACHINENODE; } else { nImageIndex = USERNODE; } // Let's start walking our tree MyTreeNode tn = new MyTreeNode(m_txtLevelEval.Text, null); tn.ImageIndex = tn.SelectedImageIndex = nImageIndex; m_tvCodegroups.Nodes.Add(tn); PutInCodeGroup(m_cgMatchingCGs[m_nPolicyLevel], tn); } else // They want to look at all the code groups... { String[] sNodeNames = new String[] { CResourceStore.GetString("Enterprise Policy"), CResourceStore.GetString("Machine Policy"), CResourceStore.GetString("User Policy") }; int[] nImageIndex = new int[] { ENTERPRISENODE, MACHINENODE, USERNODE }; for (int i = 0; i < 3; i++) { MyTreeNode tn = new MyTreeNode(sNodeNames[i], null); tn.ImageIndex = tn.SelectedImageIndex = nImageIndex[i]; m_tvCodegroups.Nodes.Add(tn); // If no codegroups evaulated for this level.... if (m_cgMatchingCGs == null || m_cgMatchingCGs[i] == null) { MyTreeNode newtn = new MyTreeNode(CResourceStore.GetString("CEvalAssemWiz3:NoCodegroups"), null); newtn.ImageIndex = newtn.SelectedImageIndex = INFOICON; tn.Nodes.Add(newtn); } // If we didn't evaluate codegroups for this policy level because // a higher policy level contained a 'Level Final' codegroup else if (m_cgMatchingCGs[i] is NotEvalCodegroup) { MyTreeNode newtn = new MyTreeNode(CResourceStore.GetString("CEvalAssemWiz3:NotEvalCodegroups"), null); newtn.ImageIndex = newtn.SelectedImageIndex = INFOICON; tn.Nodes.Add(newtn); } // We actually did get some codegroups else { PutInCodeGroup(m_cgMatchingCGs[i], tn); } } } return(true); }// PutValuesinPage