Esempio n. 1
0
 public GenericInputBox(String BoxTitle, String Lbl, PostInitializeComponent <T> FillInput, double sizeFactor = 1)
 {
     this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     InitializeComponent(sizeFactor);
     genericLbl.Text = Lbl;
     this.Text       = BoxTitle;
     if (FillInput != null)
     {
         FillInput(genericInput); // 'Callback' for optional genericInput content initialization
     }
 }
        public GenericInputBox(String BoxTitle, String Lbl, PostInitializeComponent <T> FillInput = null, double sizeFactor = 1, bool BtCancelVisible = true, String ToolTipText = null)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            InitializeComponent(sizeFactor, BtCancelVisible);
            genericLbl.Text = Lbl;

            if (ToolTipText != null)
            {
                ToolTip t = new ToolTip();
                t.SetToolTip(genericInput, ToolTipText);
                t.SetToolTip(genericLbl, ToolTipText);
            }

            this.Text = BoxTitle;
            if (FillInput != null)
            {
                FillInput(genericInput); // 'Callback' for optional genericInput content initialization
            }
        }