private void chkOnOff_CheckedChanged(object sender, EventArgs e) { CheckBox box = sender as CheckBox; if (box == null) { return; } box.Enabled = false; try { if (box.Checked) { txtHostFilter.Enabled = false; numMultiplicator.Enabled = false; this.LogClear(); Application.DoEvents(); if (!FiddlerEngine.Startup()) { box.Checked = false; } } else { FiddlerEngine.Shutdown(); txtHostFilter.Enabled = true; numMultiplicator.Enabled = true; } } finally { box.Enabled = true; } }
protected override void OnFormClosing(FormClosingEventArgs e) { base.OnFormClosing(e); FiddlerEngine.Shutdown(); FiddlerEngine.RemoveCertificates(); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); FiddlerEngine.ValidateCertificates(); }