Example #1
0
        protected override bool ProcessDialogKey(Keys keyData)
        {
            //LibSys.StatusBar.Trace("ProcessDialogKey: " + keyData);

            bool keystrokeProcessed = true;

            switch (keyData)
            {
            case Keys.Escape:
            case Keys.Alt | Keys.F4:
                this.Close();
                break;

            case Keys.PageUp:
                PhotoWaypoints.FirstWaypoint();
                preview();
                break;

            case Keys.PageDown:
                PhotoWaypoints.LastWaypoint();
                preview();
                break;

            case Keys.Back:
            case Keys.Up:
            case Keys.Left:
                PhotoWaypoints.PreviousWaypoint();
                preview();
                break;

            case Keys.Down:
            case Keys.Right:
                PhotoWaypoints.NextWaypoint();
                preview();
                break;

            default:
                keystrokeProcessed = false;                         // let KeyPress event handler handle this keystroke.
                break;
            }
            if (keystrokeProcessed)
            {
                return(true);
            }
            else
            {
                return(base.ProcessDialogKey(keyData));
            }
        }
Example #2
0
 private void fwdButton_Click(object sender, System.EventArgs e)
 {
     PhotoWaypoints.NextWaypoint();
     preview();
 }