예제 #1
0
        public int TranslateAccelerator(MSG msg, ref Guid group, int nCmdID)
        {
            //illustrates how to trap and cancel an accelerator command
            // Debug.WriteLine("Translate Accel");

            if (nCmdID == commandids.IDM_PASTE)
            {
                BeforePasteArgs e = new BeforePasteArgs();
                container.OnBeforePaste(e);
                if (e.Cancel)
                {
                    return(HRESULT.S_OK); //cancel the paste
                }
            }

            return(HRESULT.S_FALSE);
        }
예제 #2
0
 public bool Paste()
 {
     BeforePasteArgs e = new BeforePasteArgs();
     this.OnBeforePaste(e);
     if (e.Cancel)
     {
         return false;
     }
     else
         return this.execCommand(commandids.IDM_PASTE, null, false, true);
 }
예제 #3
0
 /// <summary>
 /// Fires the BeforePaste event
 /// </summary>
 /// <param name="e"></param>
 protected internal virtual void OnBeforePaste(BeforePasteArgs e)
 {
     if (BeforePaste != null) BeforePaste(this, e);
 }
예제 #4
0
파일: HtmlSite.cs 프로젝트: gahadzikwa/GAPP
        public int TranslateAccelerator(MSG msg, ref Guid group, int nCmdID)
        {
            //illustrates how to trap and cancel an accelerator command
            // Debug.WriteLine("Translate Accel");

            if (nCmdID == commandids.IDM_PASTE)
            {
                BeforePasteArgs e = new BeforePasteArgs();
                container.OnBeforePaste(e);
                if (e.Cancel)
                {
                    return HRESULT.S_OK; //cancel the paste
                }

            }

            return HRESULT.S_FALSE;
        }