Exemplo n.º 1
0
 private void glCanvas1_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == '1')
     {
         var frmPropertyGrid = new FormProperyGrid(this.scene);
         frmPropertyGrid.Show();
     }
     else if (e.KeyChar == '2')
     {
         var frmPropertyGrid = new FormProperyGrid(this.glCanvas1);
         frmPropertyGrid.Show();
     }
     else if (e.KeyChar == '3')
     {
         var frmPropertyGrid = new FormProperyGrid(this);
         frmPropertyGrid.Show();
     }
     else if (e.KeyChar == '4')
     {
         if (dlgSaveFile.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             lock (synObj)
             {
                 string filename = dlgSaveFile.FileName;
                 Bitmap bitmap   = Save2PictureHelper.ScreenShot(0, 0, this.glCanvas1.Width, this.glCanvas1.Height);
                 bitmap.Save(filename);
                 Process.Start("explorer", "/select, " + filename);
             }
         }
     }
 }
Exemplo n.º 2
0
 private void saveImageToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (dlgSaveFile.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         string filename = dlgSaveFile.FileName;
         Bitmap bitmap   = Save2PictureHelper.ScreenShot(0, 0, this.glCanvas1.Width, this.glCanvas1.Height);
         bitmap.Save(filename);
         Process.Start("explorer", "/select, " + filename);
     }
 }
Exemplo n.º 3
0
 private void glCanvas1_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 's')
     {
         if (dlgSaveFile.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             lock (this.synObj)
             {
                 Save2PictureHelper.Save2Picture(0, 0,
                                                 this.glCanvas1.Width, this.glCanvas1.Height,
                                                 dlgSaveFile.FileName);
             }
         }
     }
 }