using CefSharp.WinForms; using DevExpress.XtraEditors; using System; using System.Collections.Generic; using System.ComponentModel; using System.Configuration; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Gs.DevApp.DevFrm.IPQC { public partial class Frm_ShouJianDetect01H5 : DevExpress.XtraEditors.XtraForm { private string guid = ""; private string WebApiUrl = "http://192.168.1.145:86/AutoUpdater/h5/shoujian.html"; private ChromiumWebBrowser chromeBrowser; public Frm_ShouJianDetect01H5(string _guid) { this.guid = _guid; this.WebApiUrl = (WebApiUrl + "?guid=" + guid); InitializeComponent(); this.Load += ShowFile_Load; this.FormClosed += ShowFile_FormClosed; } private void ShowFile_FormClosed(object sender, FormClosedEventArgs e) { chromeBrowser.Dispose(); } private void ShowFile_Load(object sender, EventArgs e) { chromeBrowser = new ChromiumWebBrowser(WebApiUrl); this.pane1.Controls.Add(chromeBrowser); chromeBrowser.Dock = DockStyle.Fill; txtUrl.Text = WebApiUrl; txtUrl.ReadOnly = true; } } }