예제 #1
0
 private void frmMain_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Control && e.KeyCode == Keys.O) { // Open
         e.SuppressKeyPress = true;
         showOpenDialog();
     }
     if (e.KeyCode == Keys.Left) {
         e.SuppressKeyPress = true;
         switchImage(-1);
     }
     if (e.KeyCode == Keys.Right) {
         e.SuppressKeyPress = true;
         switchImage(1);
     }
     if (e.KeyCode == Keys.D0 || e.KeyCode == Keys.NumPad0) {
         e.SuppressKeyPress = true;
         pbox.SizeMode = PictureBoxSizeMode.Zoom;
         resizePBox();
     }
     if (e.KeyCode == Keys.Oemplus || e.KeyCode == Keys.OemPeriod) {
         e.SuppressKeyPress = true;
         pbox.SizeMode = PictureBoxSizeMode.AutoSize;
         resizePBox();
     }
     if(e.Alt && e.KeyCode == Keys.Enter) {
         e.SuppressKeyPress = true;
         showImageProperties();
     }
     if(e.Control && e.KeyCode == Keys.Oemcomma || e.Control && e.Shift && e.KeyCode == Keys.P) {
         e.SuppressKeyPress = true;
         frmSettings frm = new frmSettings();
         frm.ShowDialog(this);
     }
     if(e.KeyCode == Keys.Escape) {
         e.SuppressKeyPress = true;
         Close();
     }
 }
예제 #2
0
 private void btnSettings_Click(object sender, EventArgs e)
 {
     frmSettings frm = new frmSettings();
     frm.ShowDialog(this);
 }