示例#1
0
        private void button5_Click(object sender, EventArgs e)
        {
            void ClearAll(Control ctl)
            {
                foreach (Control c in ctl.Controls)
                {
                    if (c is TextBox)
                    {
                        ((TextBox)c).Clear();
                    }
                    if (c.Controls.Count > 0)
                    {
                        ClearAll(c);
                    }
                }
            }

            HastaBilgileri hb3 = new HastaBilgileri();

            if (hb3.IsDisposed)
            {
                HastaBilgileri hb4 = new HastaBilgileri();
                hb4.MdiParent = Form1.ActiveForm;

                hb4.Show();
                ClearAll(hb4);
            }
            else
            {
                hb3.MdiParent = Form1.ActiveForm;
                hb3.Show();
                ClearAll(hb3);
            }
        }
示例#2
0
 private void button3_Click(object sender, EventArgs e)
 {
     dosyano      = textBox1.Text;
     hb.MdiParent = Form1.ActiveForm;
     if (hb.IsDisposed)
     {
         HastaBilgileri hb2 = new HastaBilgileri();
         hb2.MdiParent = Form1.ActiveForm;
         hb2.Show();
     }
     else
     {
         hb.Show();
     }
 }