ClearCanvas.ImageViewer.View.WinForms.TileInputTranslator.ConsumeKeyStroke(System.Windows.Forms.Keys)

Here are the examples of the csharp api class ClearCanvas.ImageViewer.View.WinForms.TileInputTranslator.ConsumeKeyStroke(System.Windows.Forms.Keys) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

1. Example

Project: ClearCanvas
Source File: TileInputTranslator.cs
public object OnKeyDown(KeyEventArgs e)
		{
			if (ConsumeKeyStroke(e.KeyCode))
				return null;

			return new KeyboardButtonMessage((XKeys)e.KeyData, KeyboardButtonMessage.ButtonActions.Down);
		}

2. Example

Project: ClearCanvas
Source File: TileInputTranslator.cs
public object OnKeyUp(KeyEventArgs e)
		{
			if (ConsumeKeyStroke(e.KeyCode))
				return null;

			return new KeyboardButtonMessage((XKeys)e.KeyData, KeyboardButtonMessage.ButtonActions.Up);
		}

3. Example

Project: ClearCanvas
Source File: TileInputTranslator.cs
public object PostProcessMessage(Message msg, bool alreadyHandled)
		{
			if (msg.Msg == 0x100 && alreadyHandled)
			{
				Keys keyData = (Keys)msg.WParam;
				if (!ConsumeKeyStroke(keyData))
				{
					//when a keystroke gets handled by a control other than the tile, we release the capture.
					return new ReleaseCaptureMessage();
				}
			}

			return null;
		}

4. Example

Project: ClearCanvas
Source File: TileInputTranslator.cs
public object PreProcessMessage(Message msg)
		{
			if (msg.Msg == 0x100)
			{
				Keys keyData = (Keys)msg.WParam;
				if (!ConsumeKeyStroke(keyData))
					return new KeyboardButtonDownPreview((XKeys)msg.WParam);
			}

			return null;
		}