示例#1
0
        protected override void OnMouseUp(MouseEventArgs e)
        {
            base.OnMouseUp(e);

            if (e.Button == MouseButtons.Left)
            {
                //当鼠标松开时,标示变量为按下并松开了控件
                IsSelect = false;
                //刷新面板触发OnPaint重绘
                MainForm.Instance.Invoke(new Action(() =>
                {
                    if (MainForm.Instance.faTabStrip1.SelectedItem.splic.Panel1.Controls.Count > 0)
                    {
                        if (MainForm.Instance.faTabStrip1.SelectedItem.ItemBrowser != null)
                        {
                            MainForm.Instance.faTabStrip1.SelectedItem.ItemBrowser.GetMainFrame().LoadUrl(this.URL);
                        }
                        else
                        {
                            ((CefWebBrowser)MainForm.Instance.faTabStrip1.SelectedItem.splic.Panel1.Controls[0]).Browser.GetMainFrame().LoadUrl(this.URL);
                        }
                    }
                    else
                    {
                        MainForm.Instance.faTabStrip1.SelectedItem.splic.Panel1.Controls.Add(MainForm.Instance.NewChromiumWeb(this.URL, MainForm.Instance.faTabStrip1.SelectedItem.TabIndex));
                    }

                    if (MainForm.Instance.faTabStrip1.SelectedItem != null)
                    {
                        MainForm.Instance.textBoxXP1.Text = MainForm.Instance.faTabStrip1.SelectedItem.URL = this.uRL;
                    }

                    PublicClass.BrowserLoadingInfo(MainForm.Instance.faTabStrip1.SelectedItem);
                }

                                                    ));
            }
            GC.Collect();
        }