示例#1
0
文件: MiscUtils.cs 项目: Mrivai/Petir
 public static void AddHotKey(XBrowser form, Action function, Keys key, bool ctrl = false, bool shift = false, bool alt = false)
 {
     form.KeyPreview = true;
     form.KeyDown   += delegate(object sender, KeyEventArgs e) {
         if (e.IsHotkey(key, ctrl, shift, alt))
         {
             function();
         }
     };
 }
示例#2
0
文件: MainForm.cs 项目: Mrivai/Petir
        public void AddNewBrowser(string url)
        {
            XBrowser X = new XBrowser(this, url);

            if (XDock.DocumentStyle == DocumentStyle.SystemMdi)
            {
                X.MdiParent = this;
                X.Show();
            }
            else
            {
                X.Show(XDock);
            }
        }
示例#3
0
文件: MainForm.cs 项目: Mrivai/Petir
 public ChromiumWebBrowser AddNewBrowserTab(string url)
 {
     return((ChromiumWebBrowser)this.Invoke((Func <ChromiumWebBrowser>) delegate
     {
         XBrowser xyz = new XBrowser(this, url);
         if (XDock.DocumentStyle == DocumentStyle.SystemMdi)
         {
             xyz.MdiParent = this;
             xyz.Show();
         }
         else
         {
             xyz.Show(XDock);
         }
         return xyz.Browser;
     }));
 }
示例#4
0
 public SchemeHandler(XBrowser form)
 {
     myForm = form;
 }
示例#5
0
 public static void AddHotKey(XBrowser form, Action function, Keys key, bool ctrl = false, bool shift = false, bool alt = false)
 {
     //Utils.AddHotKey(form, function, key, ctrl, shift, alt);
     //Hotkeys.Add(new SharpHotKey(form, function, key, ctrl, shift, alt));
 }
示例#6
0
 public ScreenShot(XBrowser b)
 {
     myBrowser = b;
 }
示例#7
0
 internal AutomationHandler(XBrowser form)
 {
     MyBrowser = form;
 }