public void Save(string name, BenchArchive archive) { EnsureStorageFolder(); var formatter = new BinaryFormatter(); using (var stream = File.Create(MakeFileName(name))) { formatter.Serialize(stream, archive); } }
private void Form1_Load(object sender, EventArgs e) { _singleTestWorker = new BackgroundWorker(); _singleTestWorker.DoWork += SingleTestWorkerDoWork; _singleTestWorker.RunWorkerCompleted += SingleTestWorkerRunWorkerCompleted; _allTestsWorker = new BackgroundWorker(); _allTestsWorker.DoWork += AllTestsWorkerDoWork; _allTestsWorker.ProgressChanged += AllTestsWorkerProgressChanged; _allTestsWorker.WorkerReportsProgress = true; _allTestsWorker.WorkerSupportsCancellation = true; _allTestsWorker.RunWorkerCompleted += AllTestsWorkerRunWorkerCompleted; SetupVersion(); this.Archive = new BenchArchive(); // txtAddress.Text = "http://localhost/mvctemplate/home.mvc/clientsiderender"; cbxHistory.Text = "demo"; SearchAB(); ttDotNetMarche.SetToolTip(picDotNetMarcheLogo, "www.dotnetmarche.org"); }
private void btnTestLoad_Click(object sender, EventArgs e) { var loaded = Storage.Load("latest"); if (loaded != null) { Archive = loaded; UpdateVisualization(); } else { MessageBox.Show("File not found!"); } }