Beispiel #1
0
        private void m_mniOpenGrade_Click(object sender, System.EventArgs e)
        {
            if (m_lsvPatient.SelectedItems.Count > 0)
            {
                ListViewItem item       = m_lsvPatient.SelectedItems[0];
                frmCaseGrade frm        = new frmCaseGrade();
                clsPatient   objPatient = new clsPatient(item.SubItems[1].Text, item.SubItems[9].Text, item.SubItems[7].Text, item.SubItems[8].Text, "");
                //objPatient.m_IntOperationPower = 4;
                try
                {
                    objPatient.m_DtmSelectedInDate = DateTime.Parse(item.SubItems[2].Text);
                }
                catch { }
                MDIParent.s_ObjCurrentPatient = objPatient;
                if (new clsMainMenuFunction().m_blnCheckSamePatientForm(frm))
                {
                    return;
                }

                if (new clsMainMenuFunction().m_blnCheckForFormOpen(frm, false))
                {
                    return;
                }
                frm.MdiParent   = this.MdiParent;
                frm.WindowState = FormWindowState.Maximized;
                frm.m_mthSetPatient(objPatient);
                frm.Show();
            }
        }
Beispiel #2
0
        private void button1_Click(object sender, System.EventArgs e)
        {
            frmCaseGrade frm = new frmCaseGrade();

            frm.Show();
        }
Beispiel #3
0
        public void m_mthFillTree()
        {
            m_mthFillDept();
            frmCaseGrade frmCaseGrade = new frmCaseGrade();

            if (frmCaseGrade.Controls.Count > 0)
            {
                Control ctlTab = null;
                for (int i1 = 0; i1 < frmCaseGrade.Controls.Count; i1++)
                {
                    ctlTab = frmCaseGrade.Controls[i1];
                    if (ctlTab is Crownwood.Magic.Controls.TabControl)
                    {
                        Crownwood.Magic.Controls.TabControl tabObj   = (Crownwood.Magic.Controls.TabControl)frmCaseGrade.Controls[i1];
                        System.Windows.Forms.TreeNode       node     = null;
                        System.Windows.Forms.CheckBox       checkbox = null;
                        if (tabObj.TabPages.Count > 0)
                        {
                            Crownwood.Magic.Controls.TabPage tabPage = null;
                            for (int f2 = 0; f2 < tabObj.TabPages.Count - 1; f2++)
                            {
                                tabPage = tabObj.TabPages[f2];
                                node    = new TreeNode();
                                if (tabPage.Tag is String)
                                {
                                    node.Text = tabPage.Tag.ToString();
                                }
                                else
                                {
                                    node.Text = tabPage.Title + "有缺陷";
                                }
                                if (tabPage.AccessibleName != null)
                                {
                                    if (tabPage.AccessibleName == "1")
                                    {
                                        node.Checked = true;
                                    }
                                }
                                node.Tag = tabPage.AccessibleDescription;
                                this.m_objViewer.m_trvItems.Nodes.Add(node);
                                Control ctlItems = null;
                                for (int f3 = 0; f3 < tabPage.Controls.Count; f3++)
                                {
                                    ctlItems = tabPage.Controls[f3];
                                    switch (ctlItems.GetType().Name)
                                    {
                                    case "CheckBox":
                                        checkbox  = (System.Windows.Forms.CheckBox)ctlItems;
                                        node      = new TreeNode();
                                        node.Text = checkbox.Text;
                                        node.Tag  = checkbox.Name;
                                        if (checkbox.AccessibleName != null)
                                        {
                                            if (checkbox.AccessibleName == "1")
                                            {
                                                node.Checked = true;
                                            }
                                        }
                                        this.m_objViewer.m_trvItems.Nodes[this.m_objViewer.m_trvItems.Nodes.Count - 1].Nodes.Add(node);
                                        break;

                                    case "Panel":
                                        System.Windows.Forms.Panel panel = (System.Windows.Forms.Panel)ctlItems;
                                        for (int f4 = 0; f4 < panel.Controls.Count; f4++)
                                        {
                                            ctlItems = panel.Controls[f4];
                                            if (ctlItems.GetType().Name == "CheckBox")
                                            {
                                                checkbox  = (System.Windows.Forms.CheckBox)ctlItems;
                                                node      = new TreeNode();
                                                node.Text = checkbox.Text;
                                                node.Tag  = checkbox.Name;
                                                if (checkbox.AccessibleName != null)
                                                {
                                                    if (checkbox.AccessibleName == "1")
                                                    {
                                                        node.Checked = true;
                                                    }
                                                }
                                                this.m_objViewer.m_trvItems.Nodes[this.m_objViewer.m_trvItems.Nodes.Count - 1].Nodes.Add(node);
                                            }
                                        }
                                        break;
                                    }
                                }
                            }
                        }
                        break;
                    }
                }
            }
            if (m_objViewer.m_trvItems.Nodes.Count > 0)
            {
                m_objViewer.m_trvItems.Nodes[0].Expand();
            }
        }