Exemple #1
0
        public static Item ShowOneTextBoxTrueFalseForm(Item textBoxItem, Item trueFalseItem,
                                                       Control parentControl)
        {
            Item result = new Item();
            OneTextBoxTrueFalseForm           popup           = new OneTextBoxTrueFalseForm();
            OneTextBoxTrueFalseFormController popupController = new OneTextBoxTrueFalseFormController(popup);

            popupController.SetTextBoxItem(textBoxItem.Name, textBoxItem.Value);
            popupController.SetTrueFalseItem(trueFalseItem.Name, Convert.ToBoolean(trueFalseItem.Value));

            DialogResult dialogResult = popup.ShowDialog(parentControl);

            if (dialogResult == DialogResult.OK)
            {
                result.Value    = popupController.TextBoxValue;
                result.IsActive = popupController.TrueFalseValue;
            }
            popup.Dispose();
            return(result);
        }
 public void SetController(OneTextBoxTrueFalseFormController controller)
 {
     this.controller = controller;
 }