private void AddPattern(object sender, EventArgs e) { PatternEditor form = new PatternEditor(null); form.ShowDialog(); if (form.DialogResult == DialogResult.OK) { showPatterns(); } }
private void EditPattern(object sender, DataGridViewCellEventArgs e) { Visible = false; var patterns = JsonConvert.DeserializeObject <List <Pattern> >(Properties.Settings.Default.Patterns); PatternEditor form = new PatternEditor(patterns[patternsGrid.CurrentCell.RowIndex]); form.ShowDialog(); if (form.DialogResult == DialogResult.OK) { showPatterns(); } Visible = true; }