コード例 #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
ファイル: HtmlEditor.cs プロジェクト: jpespartero/WorldWind
 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
ファイル: HtmlEditor.cs プロジェクト: jpespartero/WorldWind
 /// <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;
        }