/// <summary> /// check /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sender, EventArgs e) { //get the config string volume = (string)this.comboBox1.SelectedItem; if (string.IsNullOrWhiteSpace(volume)) { MessageBox.Show("please select the volume."); return; } string baseline = this.textBox1.Text; if (string.IsNullOrWhiteSpace(baseline)) { MessageBox.Show("please input the baseline."); return; } Config config = new Config() { Volume = volume, Baseline = baseline }; OperationController opCtrl = new OperationController(); opCtrl.Check(config); this.button1.Enabled = false; this.button2.Enabled = true; }