System.Windows.Forms.Control.ProcessDialogKey(System.Windows.Forms.Keys)

Here are the examples of the csharp api class System.Windows.Forms.Control.ProcessDialogKey(System.Windows.Forms.Keys) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

33 Examples 7

1. Example

Project: logwizard
Source File: ColorWheel.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
		{
			HSLColor c = SelectedHSLColor;
			double hue = c.Hue;
			int step = 1;
			if ((keyData & Keys.Control) == Keys.Control)
				step = 5;

			if ((keyData & Keys.Up) == Keys.Up)
				hue += step;
			if ((keyData & Keys.Down) == Keys.Down)
				hue -= step;
			if (hue >= 360)
				hue = 0;
			if (hue < 0)
				hue = 359;

			if (hue != c.Hue)
			{
				c.Hue = hue;
				SelectedHSLColor = c;
				return true;
			}
			return base.ProcessDialogKey(keyData);
		}

2. Example

Project: WsdlUI
Source File: TextArea.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
		{
			return ExecuteDialogKey(keyData) || base.ProcessDialogKey(keyData);
		}

3. Example

View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            var keyUp = Keys.Up;
            var keyDown = Keys.Down;

            if (Orientation == MaterialScrollOrientation.Horizontal)
            {
                keyUp = Keys.Left;
                keyDown = Keys.Right;
            }

            if (keyData == keyUp)
            {
                Value -= smallChange;

                return true;
            }

            if (keyData == keyDown)
            {
                Value += smallChange;

                return true;
            }

            if (keyData == Keys.PageUp)
            {
                Value = GetValue(false, true);

                return true;
            }

            if (keyData == Keys.PageDown)
            {
                if (curValue + largeChange > maximum)
                {
                    Value = maximum;
                }
                else
                {
                    Value += largeChange;
                }

                return true;
            }

            if (keyData == Keys.Home)
            {
                Value = minimum;

                return true;
            }

            if (keyData == Keys.End)
            {
                Value = maximum;

                return true;
            }

            return base.ProcessDialogKey(keyData);
        }

4. Example

Project: Pyramid
Source File: TextArea.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
		{
			return ExecuteDialogKey(keyData) || base.ProcessDialogKey(keyData);
		}

5. Example

View license
protected override bool ProcessDialogKey(Keys keyData)
		{
			if (keyData == Keys.Down && DroppedDown == false)
			{
				ShowDropdown();
				return true;
			}
			return base.ProcessDialogKey(keyData);
		}

6. Example

Project: fdotoolbox
Source File: TextArea.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
		{
			return ExecuteDialogKey(keyData) || base.ProcessDialogKey(keyData);
		}

7. Example

Project: LaserGRBL
Source File: ColorSlider.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            if (keyData == Keys.Tab | ModifierKeys == Keys.Shift)
                return base.ProcessDialogKey(keyData);
            else
            {
                OnKeyDown(new KeyEventArgs(keyData));
                return true;
            }
        }

8. Example

Project: winforms-modernui
Source File: MetroScrollBar.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            var keyUp = Keys.Up;
            var keyDown = Keys.Down;

            if (Orientation == MetroScrollOrientation.Horizontal)
            {
                keyUp = Keys.Left;
                keyDown = Keys.Right;
            }

            if (keyData == keyUp)
            {
                Value -= smallChange;

                return true;
            }

            if (keyData == keyDown)
            {
                Value += smallChange;

                return true;
            }

            if (keyData == Keys.PageUp)
            {
                Value = GetValue(false, true);

                return true;
            }

            if (keyData == Keys.PageDown)
            {
                if (curValue + largeChange > maximum)
                {
                    Value = maximum;
                }
                else
                {
                    Value += largeChange;
                }

                return true;
            }

            if (keyData == Keys.Home)
            {
                Value = minimum;

                return true;
            }

            if (keyData == Keys.End)
            {
                Value = maximum;

                return true;
            }

            return base.ProcessDialogKey(keyData);
        }

9. Example

Project: winforms-modernui
Source File: MetroTrackBar.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            if (keyData == Keys.Tab | ModifierKeys == Keys.Shift)
                return base.ProcessDialogKey(keyData);
            else
            {
                OnKeyDown(new KeyEventArgs(keyData));
                return true;
            }
        }

10. Example

Project: ecsharp
Source File: TextArea.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
		{
			return ExecuteDialogKey(keyData) || base.ProcessDialogKey(keyData);
		}

11. Example

Project: Repetier-Host
Source File: ColorSlider.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            if (keyData == Keys.Tab | ModifierKeys == Keys.Shift)
                return base.ProcessDialogKey(keyData);
            else
            {
                OnKeyDown(new KeyEventArgs(keyData));
                return true;
            }
        }

12. Example

Project: ATF
Source File: ArrayEditingControl.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            // Note, this code is duplicated in EmbeddedCollectionEditor.
            int index = 0; //0 means "no child item has focus".
            for (int i = 1; i < Controls.Count; i++) // Controls[0] is the toolstrip
            {
                if (Controls[i].ContainsFocus)
                {
                    index = i;
                    break;
                }
            }
            if (keyData == Keys.Tab || keyData == Keys.Enter)
            {
                // if on last item then don't process tab
                if (index < Controls.Count - 1)
                {
                    Controls[index + 1].Select();
                    return true;                   
                }
            }            
            else if (keyData == (Keys.Tab | Keys.Shift))
            {
                if (index > 1)
                {
                    Controls[index - 1].Select();                    
                    return true;
                }
            }           
            return base.ProcessDialogKey(keyData);
        }

13. Example

Project: ATF
Source File: EmbeddedCollectionEditor.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
            {
                // Note, this code is duplicated in ArrayEditingControl.
                int index = 0; //0 means "no child item has focus".
                for (int i = 1; i < Controls.Count; i++) // Controls[0] is the toolstrip
                {
                    if (Controls[i].ContainsFocus)
                    {
                        index = i;
                        break;
                    }
                }
                if (keyData == Keys.Tab || keyData == Keys.Enter)
                {
                    // if on last item then don't process tab
                    if (index < Controls.Count - 1)
                    {
                        Controls[index + 1].Select();
                        return true;
                    }
                }
                else if (keyData == (Keys.Tab | Keys.Shift))
                {
                    if (index > 1)
                    {
                        Controls[index - 1].Select();
                        return true;
                    }
                }
                return base.ProcessDialogKey(keyData);
            }

14. Example

Project: log2console
Source File: TextArea.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
		{
			return ExecuteDialogKey(keyData) || base.ProcessDialogKey(keyData);
		}

15. Example

Project: justdecompile-plugins
Source File: TextArea.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
		{
			return ExecuteDialogKey(keyData) || base.ProcessDialogKey(keyData);
		}

16. Example

Project: justdecompile-plugins
Source File: TextArea.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
		{
			return ExecuteDialogKey(keyData) || base.ProcessDialogKey(keyData);
		}

17. Example

Project: Mist
Source File: MetroScrollBar.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            var keyUp = Keys.Up;
            var keyDown = Keys.Down;

            if (Orientation == MetroScrollOrientation.Horizontal)
            {
                keyUp = Keys.Left;
                keyDown = Keys.Right;
            }

            if (keyData == keyUp)
            {
                Value -= smallChange;

                return true;
            }

            if (keyData == keyDown)
            {
                Value += smallChange;

                return true;
            }

            if (keyData == Keys.PageUp)
            {
                Value = GetValue(false, true);

                return true;
            }

            if (keyData == Keys.PageDown)
            {
                if (curValue + largeChange > maximum)
                {
                    Value = maximum;
                }
                else
                {
                    Value += largeChange;
                }

                return true;
            }

            if (keyData == Keys.Home)
            {
                Value = minimum;

                return true;
            }

            if (keyData == Keys.End)
            {
                Value = maximum;

                return true;
            }

            return base.ProcessDialogKey(keyData);
        }

18. Example

Project: Mist
Source File: MetroTrackBar.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            if (keyData == Keys.Tab | ModifierKeys == Keys.Shift)
                return base.ProcessDialogKey(keyData);
            else
            {
                OnKeyDown(new KeyEventArgs(keyData));
                return true;
            }
        }

19. Example

Project: winauth
Source File: MetroScrollBar.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            var keyUp = Keys.Up;
            var keyDown = Keys.Down;

            if (Orientation == MetroScrollOrientation.Horizontal)
            {
                keyUp = Keys.Left;
                keyDown = Keys.Right;
            }

            if (keyData == keyUp)
            {
                Value -= smallChange;

                return true;
            }

            if (keyData == keyDown)
            {
                Value += smallChange;

                return true;
            }

            if (keyData == Keys.PageUp)
            {
                Value = GetValue(false, true);

                return true;
            }

            if (keyData == Keys.PageDown)
            {
                if (curValue + largeChange > maximum)
                {
                    Value = maximum;
                }
                else
                {
                    Value += largeChange;
                }

                return true;
            }

            if (keyData == Keys.Home)
            {
                Value = minimum;

                return true;
            }

            if (keyData == Keys.End)
            {
                Value = maximum;

                return true;
            }

            return base.ProcessDialogKey(keyData);
        }

20. Example

Project: winauth
Source File: MetroTrackBar.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            if (keyData == Keys.Tab | ModifierKeys == Keys.Shift)
                return base.ProcessDialogKey(keyData);
            else
            {
                OnKeyDown(new KeyEventArgs(keyData));
                return true;
            }
        }

21. Example

View license
protected override bool ProcessDialogKey(Keys keyData) {
            if (keyData == Keys.Escape) {
                this.FindForm().Close();
                return true;
            }
            else
                return base.ProcessDialogKey(keyData);
        }

22. Example

Project: ATF
Source File: NumericMatrixControl.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            NumericTextBox focusTextBox = null;
            foreach (NumericTextBox ctrl in Controls)
            {
                if (ctrl.Focused)
                {
                    focusTextBox = ctrl;
                    break;
                }
            }

            int index = focusTextBox == null ? -1 : Controls.IndexOf(focusTextBox);
            if (keyData == Keys.Tab || keyData == Keys.Enter)
            {
                // if on last NumericTextBox then don't process tab
                NumericTextBox last = (NumericTextBox)Controls[Controls.Count - 1];
                if (focusTextBox != last)
                {
                    Controls[index + 1].Focus();
                    return true;
                }
            }
            else if (keyData == (Keys.Tab | Keys.Shift))
            {
                NumericTextBox first = (NumericTextBox)Controls[0];
                if (focusTextBox != first && index != -1)
                {
                    Controls[index - 1].Focus();
                    return true;

                }
            }
            return base.ProcessDialogKey(keyData);
        }

23. Example

Project: ATF
Source File: NumericTupleControl.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            NumericTextBox focusTextBox = null;
            foreach (NumericTextBox ctrl in Controls)
            {
                if (ctrl.Focused)
                {
                    focusTextBox = ctrl;
                    break;
                }
            }

            int index = focusTextBox == null ? -1 : Controls.IndexOf(focusTextBox);                
            if (keyData == Keys.Tab || keyData == Keys.Enter)
            {                
                // if on last NumericTextBox then don't process tab
                NumericTextBox last = (NumericTextBox)Controls[Controls.Count - 1];                                                
                if (focusTextBox != last)
                {
                    Controls[index + 1].Focus();
                    return true;                    
                }
            }
            else if (keyData == (Keys.Tab | Keys.Shift))
            {
                NumericTextBox first = (NumericTextBox)Controls[0];
                if (focusTextBox != first && index != -1)
                {
                    Controls[index - 1].Focus();
                    return true;

                }               
            }
            return base.ProcessDialogKey(keyData);
        }

24. Example

Project: tesvsnip
Source File: ObjectListView.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            if (IsCellEditing)
                return CellEditKeyEngine.HandleKey(this, keyData);

            // Treat F2 as a request to edit the primary column
            if (keyData == Keys.F2)
            {
                EditSubItem((OLVListItem) FocusedItem, 0);
                return base.ProcessDialogKey(keyData);
            }

            // Treat Ctrl-C as Copy To Clipboard. 
            if (CopySelectionOnControlC && keyData == (Keys.C | Keys.Control))
            {
                CopySelectionToClipboard();
                return true;
            }

            // Treat Ctrl-A as Select All.
            if (SelectAllOnControlA && keyData == (Keys.A | Keys.Control))
            {
                SelectAll();
                return true;
            }

            return base.ProcessDialogKey(keyData);
        }

25. Example

Project: falloutsnip
Source File: ObjectListView.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            if (IsCellEditing)
                return CellEditKeyEngine.HandleKey(this, keyData);

            // Treat F2 as a request to edit the primary column
            if (keyData == Keys.F2)
            {
                EditSubItem((OLVListItem) FocusedItem, 0);
                return base.ProcessDialogKey(keyData);
            }

            // Treat Ctrl-C as Copy To Clipboard. 
            if (CopySelectionOnControlC && keyData == (Keys.C | Keys.Control))
            {
                CopySelectionToClipboard();
                return true;
            }

            // Treat Ctrl-A as Select All.
            if (SelectAllOnControlA && keyData == (Keys.A | Keys.Control))
            {
                SelectAll();
                return true;
            }

            return base.ProcessDialogKey(keyData);
        }

26. Example

Project: logwizard
Source File: ObjectListView.cs
View license
protected override bool ProcessDialogKey(Keys keyData) {

            if (this.IsCellEditing) 
                return this.CellEditKeyEngine.HandleKey(this, keyData);

            // Treat F2 as a request to edit the primary column
            if (keyData == Keys.F2) {
                this.EditSubItem((OLVListItem)this.FocusedItem, 0);
                return base.ProcessDialogKey(keyData);
            }

            // Treat Ctrl-C as Copy To Clipboard. 
            if (this.CopySelectionOnControlC && keyData == (Keys.C | Keys.Control)) {
                this.CopySelectionToClipboard();
                return true;
            }

            // Treat Ctrl-A as Select All.
            if (this.SelectAllOnControlA && keyData == (Keys.A | Keys.Control)) {
                this.SelectAll();
                return true;
            }

            return base.ProcessDialogKey(keyData);
        }

27. Example

View license
protected override bool ProcessDialogKey(Keys keyData) {

            if (this.IsCellEditing) 
                return this.CellEditKeyEngine.HandleKey(this, keyData);

            // Treat F2 as a request to edit the primary column
            if (keyData == Keys.F2) {
                this.EditSubItem((OLVListItem)this.FocusedItem, 0);
                return base.ProcessDialogKey(keyData);
            }

            // Treat Ctrl-C as Copy To Clipboard. 
            if (this.CopySelectionOnControlC && keyData == (Keys.C | Keys.Control)) {
                this.CopySelectionToClipboard();
                return true;
            }

            // Treat Ctrl-A as Select All.
            if (this.SelectAllOnControlA && keyData == (Keys.A | Keys.Control)) {
                this.SelectAll();
                return true;
            }

            return base.ProcessDialogKey(keyData);
        }

28. Example

Project: ATF
Source File: PropertyEditingControl.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            if (keyData == Keys.Ent/n ..... /n //View Source file for more details /n }

29. Example

Project: SquareOne
Source File: TextArea.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
    {
      // Try, if a dialog key is handled by a subscriber of the DialogKeyPress event.
      KeyEventArgs keyEventArgs = new KeyEventArgs(keyData);
      OnDialogKeyPress(keyEventArgs);
      if (keyEventArgs.Handled)
        return true;

      // if not (or the process was 'silent'), use the standard edit actions
      IEditAction action = _motherTextEditorControl.GetEditAction(keyData);
      AutoClearSelection = true;
      if (action != null)
      {
        BeginUpdate();
        try
        {
          lock (Document)
          {
            action.Execute(this);
            if (SelectionManager.HasSomethingSelected && AutoClearSelection /*&& caretchanged*/)
              if (Document.TextEditorProperties.DocumentSelectionMode == DocumentSelectionMode.Normal)
                SelectionManager.ClearSelection();
          }
        }
        finally
        {
          EndUpdate();
        }
        return true;
      }

      return base.ProcessDialogKey(keyData);
    }

30. Example

Project: SquareOne
Source File: ObjectListView.cs
View license
protected override bool ProcessDialogKey(Keys keyData) {

            if (this.IsCellEditing) 
                return this.CellEditKeyEngine.HandleKey(this, keyData);

            // Treat F2 as a request to edit the primary column
            if (keyData == Keys.F2) {
                this.EditSubItem((OLVListItem)this.FocusedItem, 0);
                return base.ProcessDialogKey(keyData);
            }

            // Treat Ctrl-C as Copy To Clipboard. 
            if (this.CopySelectionOnControlC && keyData == (Keys.C | Keys.Control)) {
                this.CopySelectionToClipboard();
                return true;
            }

            // Treat Ctrl-A as Select All.
            if (this.SelectAllOnControlA && keyData == (Keys.A | Keys.Control)) {
                this.SelectAll();
                return true;
            }

            return base.ProcessDialogKey(keyData);
        }

31. Example

Project: MapViewer
Source File: ObjectListView.cs
View license
protected override bool ProcessDialogKey(Keys keyData) {

            if (this.IsCellEditing) 
                return this.CellEditKeyEngine.HandleKey(this, keyData);

            // Treat F2 as a request to edit the primary column
            if (keyData == Keys.F2) {
                this.EditSubItem((OLVListItem)this.FocusedItem, 0);
                return base.ProcessDialogKey(keyData);
            }

            // Treat Ctrl-C as Copy To Clipboard. 
            if (this.CopySelectionOnControlC && keyData == (Keys.C | Keys.Control)) {
                this.CopySelectionToClipboard();
                return true;
            }

            // Treat Ctrl-A as Select All.
            if (this.SelectAllOnControlA && keyData == (Keys.A | Keys.Control)) {
                this.SelectAll();
                return true;
            }

            return base.ProcessDialogKey(keyData);
        }

32. Example

Project: ATF
Source File: TreeControl.cs
View license
protected override bool ProcessDialogKey(Keys keyData)
        {
            Node nextNode = null;
 /n ..... /n //View Source file for more details /n }

33. Example

Project: poderosa
Source File: TerminalControl.cs
View license
protected override bool ProcessDialogKey(Keys key) {
            Keys modifiers = key & Keys.Modifie/n ..... /n //View Source file for more details /n }