private void CheckBox_Click(object sender, EventArgs e) { CheckBox checkbox = (sender as CheckBox); string region = checkbox.Tag as string; this.profile.EnableRegion(region, checkbox.Checked); if (checkbox.Checked) { ModernMessageBox.Show(String.Format("Region enabled for {0}", region)); } else { ModernMessageBox.Show(String.Format("Region disabled for {0}", region)); } }
private void SaveResultsToolStripMenuItem_Click(object sender, EventArgs e) { FormAction("Ready", delegate() { SaveFileDialog saveFileDialog = new SaveFileDialog(); saveFileDialog.DefaultExt = ".js"; saveFileDialog.Filter = "JSON (*.js)|*.js"; DialogResult dr = saveFileDialog.ShowDialog(); if (dr == DialogResult.OK) { this.cloudObjects.Export(saveFileDialog.FileName); ModernMessageBox.Show(string.Format("Saved to '{0}'", saveFileDialog.FileName)); } }); }
private void SaveProfileAction_Click(object sender, System.EventArgs e) { SaveFileDialog savefile = new SaveFileDialog(); savefile.FileName = this.profile.Name; savefile.Filter = Profile.FileFilter; if (savefile.ShowDialog() == DialogResult.OK) { try { this.profile.SaveAs(savefile.FileName); ModernMessageBox.Show(String.Format("Saved to '{0}'.", savefile.FileName)); } catch (Exception ex) { ModernMessageBox.ShowError(ex); } } }