private void FullScreenForm_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { switch (e.KeyData) { case Keys.Down: _parentForm.NextImage(); this.Refresh(); break; case Keys.Up: _parentForm.PreviousImage(); this.Refresh(); break; case Keys.Escape: this.Visible = false; break; } }
private void PreviewForm_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { switch (e.KeyCode) { case Keys.Down: if (e.Control) { _parentForm.UpdateOffset(0, 10); } else { _parentForm.NextImage(); } this.Refresh(); break; case Keys.Up: if (e.Control) { _parentForm.UpdateOffset(0, -10); } else { _parentForm.PreviousImage(); } this.Refresh(); break; case Keys.OemMinus: if (e.Shift) { _parentForm.UpdateScaleFactor(false); this.Refresh(); } break; case Keys.Oemplus: if (e.Shift) { _parentForm.UpdateScaleFactor(true); this.Refresh(); } break; case Keys.Escape: this.Visible = false; this._parentForm.ClosePreview(); break; case Keys.Right: //Make these with the CTRL key and program up and down that way. if (e.Control) { _parentForm.UpdateOffset(10, 0); this.Refresh(); } break; case Keys.Left: if (e.Control) { _parentForm.UpdateOffset(-10, 0); this.Refresh(); } break; } }