/// <summary>
        /// Sets the visible status of the context menu submenu.
        /// </summary>
        /// <param name="menu"></param>
        /// <param name="certClass"></param>
        /// <param name="grade"></param>
        private void SetAdditionMenuStatus(ToolStripMenuItem menu, Certificate cert)
        {
            if (cert == null)
            {
                menu.Visible = false;
                return;
            }

            menu.Visible = true;
            menu.Enabled = !m_plan.WillGrantEligibilityFor(cert);
        }
 /// <summary>
 /// Expands the node representing this certificate.
 /// </summary>
 /// <param name="cert"></param>
 public void ExpandCert(Certificate cert)
 {
     foreach (TreeNode n in this.treeView.Nodes)
     {
         if (n.Tag.Equals(cert))
         {
             this.treeView.SelectedNode = n;
             n.Expand();
             if (this.SelectionChanged != null)
             {
                 this.SelectionChanged(this, new EventArgs());
             }
             break;
         }
     }
 }
        /// <summary>
        /// Create a node from a prerequisite certificate
        /// </summary>
        /// <param name="cert"></param>
        /// <returns></returns>
        private TreeNode CreateNode(Certificate cert)
        {
            TreeNode node = new TreeNode();
            node.Text = cert.ToString();
            node.Tag = cert;

            foreach (var prereqCert in cert.PrerequisiteCertificates)
            {
                node.Nodes.Add(CreateNode(prereqCert));
            }

            foreach (var prereqSkill in cert.PrerequisiteSkills)
            {
                node.Nodes.Add(CreateNode(prereqSkill));
            }

            return node;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Checks whether the provided certificate is an immediate prerequisite
 /// </summary>
 /// <param name="certificate">The certificate to test</param>
 /// <returns></returns>
 public bool HasAsImmediatePrerequisite(Certificate certificate)
 {
     return(m_prereqCertificates.Contains(certificate));
 }