예제 #1
0
        private void AddPattern(object sender, EventArgs e)
        {
            PatternEditor form = new PatternEditor(null);

            form.ShowDialog();
            if (form.DialogResult == DialogResult.OK)
            {
                showPatterns();
            }
        }
예제 #2
0
        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;
        }