private void Editbutton_MouseClick(object sender, MouseEventArgs e)
 {
     if (FieldslistBox.SelectedItem != null)
     {
         string       s   = (string)FieldslistBox.SelectedItem;
         char[]       sep = { ' ' };
         string[]     st  = s.Split(sep);
         NewFieldForm f   = new NewFieldForm();
         string       row = null;
         f.SetNom(st[0]);
         if (st.Length == 2)
         {
             f.SetType(st[1], "null");
         }
         else
         {
             f.SetType(st[1], st[2]);
         }
         if (f.DialogResult == System.Windows.Forms.DialogResult.OK)
         {
             row = f.GetNom() + " " + f.GetType();
             if (f.GetType().Equals("CHAR"))
             {
                 row += " " + f.getCharN();
             }
             FieldslistBox.SelectedItem = row;
             FieldslistBox.Refresh();
         }
         f.Dispose();
     }
 }
        private void Addbutton_MouseClick(object sender, MouseEventArgs e)
        {
            Addbutton.Enabled = false;

            NewFieldForm f   = new NewFieldForm();
            string       row = null;

            if (f.DialogResult == System.Windows.Forms.DialogResult.OK)
            {
                row = f.GetNom() + " ";
                string t = f.GetFieldType();
                row += t;
                if (t.Equals("CHAR"))
                {
                    row += " " + f.getCharN();
                }

                FieldslistBox.Items.Add(row);
                FieldslistBox.Refresh();
            }
            Addbutton.Enabled = true;
        }