Ejemplo n.º 1
0
 void mDatabaseInstance_OnSchemaError(FFRKMySqlInstance.ConnectResult ConnectResult)
 {
     mTabPage.BeginInvoke((Action)(() =>
                                   MessageBox.Show("FFRK Inspector has been updated.  Please download the latest release " +
                                                   "from https://github.com/cppisking/ffrk-inspector/releases.  Database " +
                                                   "connectivity will be unavailable for the remainder of this session.")));
 }
Ejemplo n.º 2
0
        private static void RemoveQueryTab(Control queryTab)
        {
            TabPage    tabPage    = (TabPage)queryTab.Parent;
            TabControl tabControl = tabPage.Parent as TabControl;

            tabControl.TabPages.Remove(tabPage);

            // Due MDA exception "RaceOnRCWCleanup error when closing a form with WebBrowser control", tab page is destroyed as below
            tabPage.BeginInvoke((MethodInvoker) delegate { tabPage.Dispose(); });
        }
Ejemplo n.º 3
0
        /// <summary>Returns TabPage Display Text</summary>
        /// <param name="tp">TabPage Name</param>
        public string TabPageText(TabPage tp)
        {
            string text = "";

            // return text from control (from any thread)
            if (tp.InvokeRequired)
            {
                tp.BeginInvoke((MethodInvoker) delegate() { text = tp.Text; });
            }
            else
            {
                text = tp.Text;
            }

            return(text);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            TabPage myTabPage = new TabPage("Nueva Pestaña");

            tc_pestanas.TabPages.Add(myTabPage);
            Navegador nav = new Navegador((TabPage)myTabPage);

            nav.TopLevel = false;
            myTabPage.Controls.Add(nav);
            myTabPage.Tag = nav;
            var  @delegate = new showForm(nuevaVentana);
            Task hilo      = new Task(() => myTabPage.BeginInvoke(@delegate, nav));

            hilo.Start();
            hilos.Add(hilo);
            ventanas.Add(nav);
        }
        public void nuevaVentana(String url)
        {
            TabPage myTabPage = new TabPage(url);

            tc_pestanas.TabPages.Add(myTabPage);
            Navegador nav = new Navegador((TabPage)myTabPage);

            nav.TopLevel = false;
            myTabPage.Controls.Add(nav);
            myTabPage.Tag = nav;
            var  @delegate = new showForm(nuevaVentana);
            Task hilo      = new Task(() => myTabPage.BeginInvoke(@delegate, nav));

            hilo.Start();
            hilos.Add(hilo);
            ventanas.Add(nav);
            nav.Navegar(url);
        }