示例#1
0
 public static FormEditControl GetForm()
 {
     if (form == null)
     {
         form = new FormEditControl();
     }
     return(form);
 }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            var form = new FormMedicalHistory();

            if (form.ShowDialog() == DialogResult.OK)
            {
                foreach (var img in form.SelectedTooth)
                {
                    var imgForm = new FormImg(img);
                    imgForm.MdiParent = this.MdiParent;
                    imgForm.Show();
                }
                var conForm = FormEditControl.GetForm();
                conForm.MdiParent = this.MdiParent;
                conForm.Show();
            }
        }
示例#3
0
        private void printPreviewToolStripButton_Click(object sender, EventArgs e)
        {
            var form = new FormPicture();

            if (form.ShowDialog() == DialogResult.OK)
            {
                foreach (var img in form.imgList)
                {
                    if (img.InfoType == 0)
                    {
                        var imgForm = new FormImg(img);
                        imgForm.MdiParent = this;
                        imgForm.Show();
                    }
                }
                var conForm = FormEditControl.GetForm();
                conForm.MdiParent = MdiParent;
                conForm.Show();
            }
        }
示例#4
0
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     using (OpenFileDialog file = new OpenFileDialog())
     {
         file.Filter = "BMP Bitmap(*.bmp)|*.bmp|CUR Cursor(*.cur)|*.cur|GIF (*.gif)|*.gif|ICO Icon(*.ico)|*.ico|JPG JPEG Image(*.jpg;*.jpeg;*jpe)|*.jpg;*.jpeg;*jpe|PNG Portable NetworkGraphics(*.png)|*.png";
         if (file.ShowDialog() == DialogResult.OK)
         {
             using (FileStream f = new FileStream(file.FileName, FileMode.Open))
             {
                 Image   img  = Image.FromStream(f);
                 FormImg form = new FormImg(new ImgInfo {
                     Date = DateTime.Now, Img = (Bitmap)img
                 });
                 form.Show();
             }
             var conForm = FormEditControl.GetForm();
             conForm.MdiParent = MdiParent;
             conForm.Show();
         }
     }
 }