/// <summary>
        /// Context menu > Show "skill" in browser | Show "certificate class" certificates.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void showInBrowserMenu_Click(object sender, EventArgs e)
        {
            // Retrieve the owner window
            PlanWindow npw = WindowsFactory <PlanWindow> .GetByTag(m_plan);

            if (npw == null || npw.IsDisposed)
            {
                return;
            }

            // Return when nothing is selected
            if (this.treeView.SelectedNode == null)
            {
                return;
            }

            Certificate cert = this.treeView.SelectedNode.Tag as Certificate;

            // When a certificate is selected, we select its class in the left tree
            if (cert != null)
            {
                npw.ShowCertInBrowser(cert);
            }
            // When a skill is selected, we select it in the skill browser
            else
            {
                SkillLevel prereq = (SkillLevel)this.treeView.SelectedNode.Tag;
                npw.ShowSkillInBrowser(prereq.Skill);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Event handler for treenode double click event.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tvCertList_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            // Get selected node
            TreeNode selectedNode = e.Node as TreeNode;

            // Make sure we have a skill to use
            if (selectedNode.Tag == null)
            {
                return;
            }

            if (selectedNode.Tag is Certificate)
            {
                PlanWindow pw = WindowsFactory <PlanWindow> .GetByTag(m_plan);

                Certificate cert = ((Certificate)selectedNode.Tag);
                pw.ShowCertInBrowser(cert);
            }
            else
            {
                // Open skill browser tab for this skill
                PlanWindow pw = WindowsFactory <PlanWindow> .GetByTag(m_plan);

                Skill skill = ((SkillLevel)selectedNode.Tag).Skill;
                pw.ShowSkillInBrowser(skill);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Context menu > Show "skill" in browser | Show "certificate class" certificates.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void showInSkillBrowserMenu_Click(object sender, EventArgs e)
        {
            // Retrieve the owner window
            PlanWindow npw = WindowsFactory <PlanWindow> .GetByTag(m_plan);

            if (npw == null || npw.IsDisposed)
            {
                return;
            }

            Certificate cert = tvCertList.SelectedNode.Tag as Certificate;

            // When a certificate is selected
            if (cert != null)
            {
                npw.ShowCertInBrowser(cert);
            }
            // When a skill is selected
            else
            {
                SkillLevel prereq = (SkillLevel)tvCertList.SelectedNode.Tag;
                npw.ShowSkillInBrowser(prereq.Skill);
            }
        }