public MainWindow() { InitializeComponent(); FormBorderStyle = FormBorderStyle.FixedSingle; m_backend = new Backend(this); download_label.Text = "Downloading build index"; download_label.Visible = true; BackgroundWorker bw = new BackgroundWorker(); bw.DoWork += PostLoadTasks; bw.RunWorkerCompleted += PostLoadTasksCompleted; bw.RunWorkerAsync(); }
private void start_button_Click(object sender, EventArgs e) { int first_build; if (radio_stable.Checked) first_build = 0; else first_build = first_dev_build.SelectedIndex; if (second_dev_build.SelectedIndex <= first_build) { MessageBox.Show("Second build cannot be less than or equal to the first.", "Error", MessageBoxButtons.OK); return; } start_button.Enabled = false; Backend backend = new Backend(first_build, second_dev_build.SelectedIndex, m_build_list, s_major_version); backend.BisectEvent += BisectUserDialog; backend.UpdateProgress += ChangeProgressBar; if (boot_title.Checked) backend.Bisect(file_path_textbox.Text); else backend.Bisect(); }