Win.CodeNavi.frmMain.frmMain_KeyDown C# (CSharp) Method

frmMain_KeyDown() private method

Key handler for the main form
private frmMain_KeyDown ( object sender, KeyEventArgs e ) : void
sender object
e KeyEventArgs
return void
        private void frmMain_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Control && e.KeyCode.ToString().Equals("F"))
            {
                DoSearch();
                e.SuppressKeyPress = true; // this stops the annoying ding
                e.Handled = true;
            }
            else if (e.Control && e.KeyCode.ToString().Equals("S"))
            {
                DoSearch();
                e.SuppressKeyPress = true; // this stops the annoying ding
                e.Handled = true;
            }
            else if (e.Control && e.KeyCode.Equals(System.Windows.Forms.Keys.Space))
            {
                /*
                if (this.MdiChildren.Count() == 0)
                {
                    e.SuppressKeyPress = true; // this stops the annoying ding
                    e.Handled = true;
                    return;
                }

                int intCurrent = 0;
                int intCount = 0;

                foreach (Form frmTest in this.MdiChildren)
                {
                    if (frmTest.Text.Equals(this.ActiveMdiChild.Text))
                    {
                        intCurrent = intCount;
                        break;
                    }
                    intCount++;
                }

                int intTotal = this.MdiChildren.Count();
                if (intCurrent == intTotal-1)
                {
                    this.SuspendLayout();
                    this.MdiChildren[0].BringToFront();
                    this.ResumeLayout();
                }
                else
                {
                    this.SuspendLayout();
                    this.MdiChildren[intCurrent + 1].BringToFront();
                    this.ResumeLayout();
                }

                e.SuppressKeyPress = true; // this stops the annoying ding
                e.Handled = true;
                 */
                MessageBox.Show("Use Ctrl-Tab instead", "Depreciated", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }