public FiddlerCapture(StressTestForm form) { InitializeComponent(); CaptureConfiguration = App.Configuration.UrlCapture; MainForm = form; if (!string.IsNullOrEmpty(App.Configuration.UrlCapture.Cert)) { FiddlerApplication.Prefs.SetStringPref("fiddler.certmaker.bc.key", App.Configuration.UrlCapture.Key); FiddlerApplication.Prefs.SetStringPref("fiddler.certmaker.bc.cert", App.Configuration.UrlCapture.Cert); } }
static void Main(string[] args) { string fileName = null; if (args != null && args.Length > 0) { fileName = args[0]; } // Force config to apply im var obj = App.UserDataPath; var limit = ServicePointManager.DefaultConnectionLimit; if (ServicePointManager.DefaultConnectionLimit < 5) { ServicePointManager.DefaultConnectionLimit = 50; } //ServicePointManager.MaxServicePoints = 50; //ServicePointManager.MaxServicePointIdleTime = 100; // setting using config file switch //ServicePointManager.Expect100Continue = false; ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; if (App.Configuration.StressTester.IgnoreCertificateErrors) { ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true; } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var mainForm = new StressTestForm(fileName); Thread newThread = new Thread(RunSplash); newThread.SetApartmentState(ApartmentState.STA); newThread.Name = "Splash"; newThread.Start(mainForm); Application.ThreadException += Application_ThreadException; try { Application.Run(mainForm); } catch (Exception ex) { Application_ThreadException(null, new ThreadExceptionEventArgs(ex)); } }
void FadeOut() { if (InFadeOut) { return; } if (SystemInformation.TerminalServerSession) { if (Startup) { Application.ExitThread(); } StressForm = null; base.Close(); return; } int duration = 500;//in milliseconds int steps = 50; Timer timer = new Timer(); timer.Interval = duration / steps; timer.Enabled = true; int currentStep = steps; timer.Tick += (arg1, arg2) => { Opacity = ((double)currentStep) / steps; currentStep--; if (currentStep <= 0) { timer.Stop(); timer.Dispose(); if (Startup) { Application.ExitThread(); } Visible = false; base.Close(); } }; timer.Start(); }
private void Splash_FormClosed(object sender, FormClosedEventArgs e) { if (StressForm != null && StressForm.Visible) { StressForm.Invoke(new Action(() => { if (StressForm != null) { StressForm.TopMost = true; Application.DoEvents(); StressForm.TopMost = false; } })); } StressForm = null; }
public FiddlerCapture(StressTestForm form) { InitializeComponent(); CaptureConfiguration = App.Configuration.UrlCapture; MainForm = form; // Future use (Win7+): No dependencies on certmaker and bouncy castle libs // FiddlerApplication.Prefs.SetBoolPref("fiddler.certmaker.PreferCertEnroll", true); // IF PROBLEMS WITH SSL NOT WORKING // Delete the C:\Users\rstrahl\AppData\Roaming\Microsoft\Crypto\RSA folder if (!string.IsNullOrEmpty(App.Configuration.UrlCapture.Cert)) { FiddlerApplication.Prefs.SetStringPref("fiddler.certmaker.bc.key", App.Configuration.UrlCapture.Key); FiddlerApplication.Prefs.SetStringPref("fiddler.certmaker.bc.cert", App.Configuration.UrlCapture.Cert); } }
private void FiddlerCapture_FormClosing(object sender, FormClosingEventArgs e) { Stop(); MainForm = null; }
//private StressTestForm WebSurgeForm; public AceInterop(StressTestForm webSurgeForm) { Program.WebSurgeForm = webSurgeForm; InitializeInterop(); }