예제 #1
0
        public FormEditControl()
        {
            InitializeComponent();
            Form owner = this.FindForm();
            int  count = Commons.GetControlMaxNumInForm <FormEditControl>(owner, "formEditControl");

            field = FormItem.Empty(FormItem.FieldNamePrex + Convert.ToString(count + 1));
        }
예제 #2
0
        void fec_AddItemHandler(object sender, EventArgs e)
        {
            FormEditControl thisItem = sender as FormEditControl;
            string          newName;
            int             index = items.GetIndex(thisItem.Field, out newName);

            if (index > -1)
            {
                items.Insert(index + 1, FormItem.Empty(newName));
                LoadItems();
            }
        }