Ejemplo n.º 1
0
 /// <summary>
 /// Converts AtfMessage to WfMessage</summary>
 /// <param name="msg">AtfMessage</param>
 /// <returns>WfMessage</returns>
 public static WfMessage ToWf(AtfMessage msg)
 {
     var newMsg = new WfMessage();
     newMsg.HWnd = msg.Result;
     newMsg.Msg = msg.Msg;
     newMsg.WParam = msg.WParam;
     newMsg.LParam = msg.LParam;
     newMsg.Result = msg.Result;
     return newMsg;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Converts AtfMessage to WfMessage</summary>
        /// <param name="msg">AtfMessage</param>
        /// <returns>WfMessage</returns>
        public static WfMessage ToWf(AtfMessage msg)
        {
            var newMsg = new WfMessage();

            newMsg.HWnd   = msg.Result;
            newMsg.Msg    = msg.Msg;
            newMsg.WParam = msg.WParam;
            newMsg.LParam = msg.LParam;
            newMsg.Result = msg.Result;
            return(newMsg);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Constructor with ATF message</summary>
 /// <param name="msg">ATF message</param>
 public MessageInterop(AtfMessage msg)
     : this(msg.HWnd, msg.Msg, msg.WParam, msg.LParam, msg.Result)
 {
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructor with ATF message</summary>
 /// <param name="msg">ATF message</param>
 public MessageInterop(AtfMessage msg)
     : this(msg.HWnd, msg.Msg, msg.WParam, msg.LParam, msg.Result)
 {
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Process ATF message and command key by calling the base ProcessCmdKey with converted arguments,
        /// which allows this key press to be consumed by owning
        /// controls like PropertyView and PropertyGridView and be seen by ControlHostService.
        /// Returning false allows the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc.
        /// Returning true means that this key press has been consumed by this method and this
        /// event is not passed on to any other methods or controls.</summary>
        /// <param name="msg">ATF message to process</param>
        /// <param name="keyData">ATF key data</param>
        /// <returns>False to allow the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc.
        /// True to consume this key press, so this
        /// event is not passed on to any other methods or controls.</returns>
        protected virtual bool ProcessCmdKey(ref AtfMessage msg, AtfKeys keyData)
        {
            WfMessage wfMsg = MessageInterop.ToWf(msg);

            return(base.ProcessCmdKey(ref wfMsg, KeysInterop.ToWf(keyData)));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Process Windows message and command key by calling ATF ProcessCmdKey with converted arguments.
        /// Returning false allows the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc.
        /// Returning true means that this key press has been consumed by this method and this
        /// event is not passed on to any other methods or controls.</summary>
        /// <param name="msg">Windows message to process</param>
        /// <param name="keyData">Windows key data</param>
        /// <returns>False to allow the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc.
        /// True to consume this key press, so this
        /// event is not passed on to any other methods or controls.</returns>
        protected override bool ProcessCmdKey(ref WfMessage msg, WfKeys keyData)
        {
            AtfMessage atfMsg = MessageInterop.ToAtf(msg);

            return(ProcessCmdKey(ref atfMsg, KeysInterop.ToAtf(keyData)));
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Process ATF message and command key by calling the base ProcessCmdKey with converted arguments, 
 /// which allows this key press to be consumed by owning
 /// controls like PropertyView and PropertyGridView and be seen by ControlHostService.
 /// Returning false allows the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc.
 /// Returning true means that this key press has been consumed by this method and this
 /// event is not passed on to any other methods or controls.</summary>
 /// <param name="msg">ATF message to process</param>
 /// <param name="keyData">ATF key data</param>
 /// <returns>False to allow the key press to escape to IsInputKey, OnKeyDown, OnKeyUp, etc.
 /// True to consume this key press, so this
 /// event is not passed on to any other methods or controls.</returns>
 protected virtual bool ProcessCmdKey(ref AtfMessage msg, AtfKeys keyData) 
 {
     WfMessage wfMsg = MessageInterop.ToWf(msg);
     return base.ProcessCmdKey(ref wfMsg, KeysInterop.ToWf(keyData)); 
 }