Ejemplo n.º 1
0
        static bool Execute(EventHandler <EditingManagerEventArgs> d)
        {
            if (d == null)
            {
                return(false);
            }
            EditingManagerEventArgs e = new EditingManagerEventArgs();

            Delegate[] delegates = d.GetInvocationList();
            foreach (EventHandler <EditingManagerEventArgs> dg in delegates)
            {
                dg(null, e);
                if (e.Handled)
                {
                    return(true);
                }
            }
            return(false);
        }
Ejemplo n.º 2
0
 static bool Execute(EventHandler<EditingManagerEventArgs> d)
 {
     if(d == null) return false;
     EditingManagerEventArgs e = new EditingManagerEventArgs();
     Delegate[] delegates = d.GetInvocationList();
     foreach(EventHandler<EditingManagerEventArgs> dg in delegates)
     {
         dg(null, e);
         if(e.Handled)
             return true;
     }
     return false;
 }
Ejemplo n.º 3
0
        void OnCopy(object sender, EditingManagerEventArgs e)
        {
            System.Windows.Forms.WebBrowser webbrowser = FreeCL.Forms.Application.ActiveControl as System.Windows.Forms.WebBrowser;

            if(webbrowser == wBrowser)
            {
                WebBrowserHelper.ExecCopy(wBrowser);
                e.Handled = true;
                //replace rtf with simple text
                try
                {
                    string text = System.Windows.Forms.Clipboard.GetText();
                    if(!string.IsNullOrEmpty(text))
                    {
                        text = text.Trim().Replace("\r\n\r\n", "\r\n");
                        System.Windows.Forms.Clipboard.SetText(text);
                    }
                }
                catch(System.Runtime.InteropServices.ExternalException)
                {

                }
            }
        }