示例#1
0
 private void scanButton_Click_1(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(pathOfDir.Text))
     {
         MessageBox.Show("Please choose a path!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         if (firefoxRadio.Checked)
         {
             MozillaController mozilla = new MozillaController();
             mozilla.SetPath(pathOfDir.Text);
             MozillaForm mozillaForm = new MozillaForm(mozilla);
             mozillaForm.Show();
         }
         else
         {
             ChromeController chrome = new ChromeController();
             chrome.SetPath(pathOfDir.Text);
             ChromeForm chromeForm = new ChromeForm(chrome);
             chromeForm.Show();
         }
         this.Close();
     }
 }
示例#2
0
 public MozillaForm(MozillaController mozilla)
 {
     InitializeComponent();
     InitializeComboboxes();
     this.mozilla = mozilla;
 }