Exemple #1
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Watch for keys to do the cut/copy/paste operations
 /// </summary>
 /// <param name="e"></param>
 /// ------------------------------------------------------------------------------------
 protected override void OnKeyDown(KeyEventArgs e)
 {
     m_sda.GetActionHandler().BeginUndoTask("dummy undo Key Down", "dummy redo Key Down");
     if (!EditingHelper.HandleOnKeyDown(e))
     {
         base.OnKeyDown(e);
     }
     m_sda.GetActionHandler().EndUndoTask();
 }
Exemple #2
0
        public void HandleKeyDownAndKeyPress(Keys key)
        {
            KeyEventArgs kea = new KeyEventArgs(key);

            if (EditingHelper.HandleOnKeyDown(kea))
            {
                return;
            }
            OnKeyDown(kea);
            // for some reason OnKeyPress does not handle Delete key
            // In FLEX, OnKeyPress does not even get called for Delete key.
            if (key != Keys.Delete)
            {
                OnKeyPress(new KeyPressEventArgs((char)kea.KeyValue));
            }
        }