Exemplo n.º 1
0
 private void btnNewField_Click(object sender, EventArgs e)
 {
     // show the field editor form
     EditFieldForm frm = new EditFieldForm();
     if (frm.ShowDialog() == DialogResult.OK)
     {
         Field f = frm.GetField();
         FieldList.AddCustomField(f);
         checkedFields.Items.Add(f, frm.GetActive());
         FieldList.SaveCustomFields();
     }
 }
Exemplo n.º 2
0
        void item_Edit(object sender, EventArgs e)
        {
            Field f = (Field)checkedFields.Items[selected_index];
            Boolean active = checkedFields.GetItemChecked(selected_index);

            // show the field editor form
            EditFieldForm frm = new EditFieldForm(f, active);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                checkedFields.SetItemChecked(selected_index, frm.GetActive());
                checkedFields.Refresh();
                FieldList.SaveCustomFields();
            }
        }
Exemplo n.º 3
0
        void contextMenu_EditClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            Field f = (Field)checkedFields.Items[selected_index];
            Boolean active = checkedFields.GetItemChecked(selected_index);

            // show the field editor form
            EditFieldForm frm = new EditFieldForm(f, active);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                checkedFields.SetItemChecked(selected_index, frm.GetActive());
                checkedFields.Refresh();
                /*
                Field f = frm.GetField();
                FieldList.AddCustomField(f);
                checkedFields.Items.Add(f, frm.GetActive());
                */
                FieldList.SaveCustomFields();
            }
        }