public DevToolsForm(BrowserAgent owner) { _owner = owner; this.Text = "DevTools"; this.Width = 800; this.Height = 600; if (CefWin.ApplicationIcon != null) { this.Icon = CefWin.ApplicationIcon; } this.MinimumSize = new System.Drawing.Size(360, 360); this.Load += DevToolsForm_Load; }
public DefaultBrowserForm(string defaulturl) { InitializeComponent(); if (CefWin.ApplicationIcon != null) { this.Icon = CefWin.ApplicationIcon; } this.Text = CefWin.ApplicationTitle; this.MinimumSize = new Size(360, 360); if (Application.OpenForms.Count - (CefWin._splashForm?.Visible == true ? 1 : 0) == 0) { this.StartPosition = FormStartPosition.CenterScreen; } this.Disposed += DefaultBrowserForm_Disposed; this.Resize += DefaultBrowserForm_Resize; _browserAgent = new BrowserAgent(); _browserAgent.Url = defaulturl; if (CefWin._splashForm != null) { this.Opacity = 0; //this.ShowInTaskbar = false; //TODO:this will affect the Forms collection , handle it later } CefWin.PostToAppThread(delegate { BeforeLoad?.Invoke(this, EventArgs.Empty); CefWin.WriteDebugLine("BeforeLoad Invoked."); }); }