Beispiel #1
0
 private void addContext_Click(object sender, EventArgs e) {
     new_context_form new_ = new new_context_form(this);
     new_.Location = Cursor.Position;
     if (new_.ShowDialog() == DialogResult.OK) {
         ui_context new_ctx = new ui_context();
         if (new_.basedOnExisting.Checked)
             new_ctx.copy_from(cur_context());
         // 1.3.33+ - we want unique context names!
         new_ctx.name = util.unique_name( contexts_.Select(x => x.name), new_.name.Text);
         contexts_.Add(new_ctx);
         update_contexts_combos_in_all_forms();
         curContextCtrl.SelectedIndex = curContextCtrl.Items.Count - 1;
     }
 }