internal void UpdateWindow(string username, string fullName, ExaminationMode examination) { if (this.InvokeRequired) { UpdateWindowDelegate d = new UpdateWindowDelegate(UpdateWindow); this.Invoke(d, new object[] { username, fullName, examination }); } else { if (examination.Enabled && examination.BrowserMode) { ExaminationBrowser browser = new ExaminationBrowser(username, fullName, examination); browser.Show(); this.Hide(); return; } else if (examination.Enabled) { machineNameLabel.Text = "Examination Mode"; examination.Start(); } else { machineNameLabel.Text = Environment.MachineName; } usernameLabel.Text = username; fullNameLabel.Text = fullName; Opacity = 100; alterSizeLocation(); } }
public ExaminationBrowser(string username, string fullName, ExaminationMode examination) { _examination = examination; InitializeComponent(); usernameLabel.Text = username; fullNameLabel.Text = fullName; machineNameLabel.Text = Environment.MachineName; var settings = new CefSettings { IgnoreCertificateErrors = true }; Cef.Initialize(settings); ChromeBrowser = new ChromiumWebBrowser(_examination.BrowserURL) { MenuHandler = new MenuHandler(), RequestHandler = new RequestHandler(), LifeSpanHandler = new LifeSpanHandler() }; }