Exemple #1
0
        void UserRender_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            XPictureBox xapPictureBox = sender as XPictureBox;

            using (ToothBitmapView tooth = new ToothBitmapView())
            {
                if (xapPictureBox.Image != null && !string.IsNullOrEmpty(BmpConvertMessage.BitmapOutput((Bitmap)xapPictureBox.Image)))
                {
                    tooth.SickPositionStr = BmpConvertMessage.BitmapOutput((Bitmap)xapPictureBox.Image);
                }
                if (tooth.ShowDialog() == DialogResult.OK)
                {
                    xapPictureBox.Image = tooth.Toothmap;
                    if (xapPictureBox.Name.Equals("def1"))
                    {
                        (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def2 = BmpConvertMessage.BitmapOutput(tooth.Toothmap);
                    }
                }
            }
        }
Exemple #2
0
        void UserRender_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            XPictureBox xapPictureBox = sender as XPictureBox;

            using (ToothBitmapView tooth = new ToothBitmapView())
            {
                if (xapPictureBox.Image != null && !string.IsNullOrEmpty(BmpConvertMessage.BitmapOutput((Bitmap)xapPictureBox.Image)))
                {
                    tooth.SickPositionStr = BmpConvertMessage.BitmapOutput((Bitmap)xapPictureBox.Image);
                }
                if (tooth.ShowDialog() == DialogResult.OK)
                {
                    xapPictureBox.Image = tooth.Toothmap;
                    if (xapPictureBox.Name.Equals("def2"))
                    {
                        (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def2 = BmpConvertMessage.BitmapOutput(tooth.Toothmap);
                        if (!string.IsNullOrEmpty((this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def2))
                        {
                            checkbox1.Checked = true;
                        }
                        xapPictureBox.Invalidate();
                    }
                    else if (xapPictureBox.Name.Equals("def4"))
                    {
                        (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def4 = BmpConvertMessage.BitmapOutput(tooth.Toothmap);
                        if (!string.IsNullOrEmpty((this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def4))
                        {
                            checkbox2.Checked = true;
                        }
                        xapPictureBox.Invalidate();
                    }
                    else if (xapPictureBox.Name.Equals("def6"))
                    {
                        (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def6 = BmpConvertMessage.BitmapOutput(tooth.Toothmap);
                        if (!string.IsNullOrEmpty((this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def6))
                        {
                            checkbox3.Checked = true;
                        }
                        xapPictureBox.Invalidate();
                    }
                    else if (xapPictureBox.Name.Equals("def8"))
                    {
                        (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def8 = BmpConvertMessage.BitmapOutput(tooth.Toothmap);
                        if (!string.IsNullOrEmpty((this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def8))
                        {
                            checkbox4.Checked = true;
                        }
                        xapPictureBox.Invalidate();
                    }
                    else if (xapPictureBox.Name.Equals("def10"))
                    {
                        (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def10 = BmpConvertMessage.BitmapOutput(tooth.Toothmap);
                        if (!string.IsNullOrEmpty((this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def10))
                        {
                            checkbox5.Checked = true;
                        }
                        xapPictureBox.Invalidate();
                    }
                    else if (xapPictureBox.Name.Equals("def12"))
                    {
                        (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def12 = BmpConvertMessage.BitmapOutput(tooth.Toothmap);
                        if (!string.IsNullOrEmpty((this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def12))
                        {
                            checkbox6.Checked = true;
                        }
                        xapPictureBox.Invalidate();
                    }
                    else if (xapPictureBox.Name.Equals("def14"))
                    {
                        (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def14 = BmpConvertMessage.BitmapOutput(tooth.Toothmap);
                        if (!string.IsNullOrEmpty((this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def14))
                        {
                            checkbox7.Checked = true;
                        }
                        xapPictureBox.Invalidate();
                    }
                    else if (xapPictureBox.Name.Equals("def16"))
                    {
                        (this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def16 = BmpConvertMessage.BitmapOutput(tooth.Toothmap);
                        if (!string.IsNullOrEmpty((this.GetViewModel().GetEmsUIDTO() as EmsUIDTO).Emsapobs.Def16))
                        {
                            checkbox8.Checked = true;
                        }
                        xapPictureBox.Invalidate();
                    }
                }
            }
        }