/// <summary>
        /// Sets Minimum value of NumericUpDown control
        /// </summary>
        /// <typeparam name="TValue"></typeparam>
        /// <param name="builder"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public static DialogSetOptionsWithSpecifiedControlBuilder <NumericUpDown, TValue> HasMinimum <TValue>
            (this DialogSetOptionsWithSpecifiedControlBuilder <NumericUpDown, TValue> builder, decimal value)
        {
            var control = builder.Item.Data.Control as NumericUpDown;

            control.Minimum = value;
            return(builder);
        }
        /// <summary>
        /// Sets DecimalPlaces value of NumericUpDown control
        /// </summary>
        /// <typeparam name="TValue"></typeparam>
        /// <param name="builder"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public static DialogSetOptionsWithSpecifiedControlBuilder <NumericUpDown, TValue> HasDecimalPlaces <TValue>
            (this DialogSetOptionsWithSpecifiedControlBuilder <NumericUpDown, TValue> builder, int value)
        {
            var control = builder.Item.Data.Control as NumericUpDown;

            control.DecimalPlaces = value;
            return(builder);
        }
Пример #3
0
        /// <summary>
        /// Sets MinDate of DateTimePicker control
        /// </summary>
        /// <param name="builder"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public static DialogSetOptionsWithSpecifiedControlBuilder <DateTimePicker, DateTime> HasMinimumDate
            (this DialogSetOptionsWithSpecifiedControlBuilder <DateTimePicker, DateTime> builder, DateTime value)
        {
            var control = builder.Item.Data.Control as DateTimePicker;

            control.MinDate = value;
            return(builder);
        }
Пример #4
0
        /// <summary>
        /// Sets Format of DateTimePicker control
        /// </summary>
        /// <param name="builder"></param>
        /// <param name="format"></param>
        /// <returns></returns>
        public static DialogSetOptionsWithSpecifiedControlBuilder <DateTimePicker, DateTime> HasFormat
            (this DialogSetOptionsWithSpecifiedControlBuilder <DateTimePicker, DateTime> builder, DateTimePickerFormat format)
        {
            var control = builder.Item.Data.Control as DateTimePicker;

            control.Format = format;
            return(builder);
        }
Пример #5
0
        /// <summary>
        /// Sets TextAlign value of TextBox control
        /// </summary>
        /// <param name="builder"></param>
        /// <param name="textAlign"></param>
        /// <returns></returns>
        public static DialogSetOptionsWithSpecifiedControlBuilder <TextBox, string> HasTextAlign
            (this DialogSetOptionsWithSpecifiedControlBuilder <TextBox, string> builder, HorizontalAlignment textAlign)
        {
            var control = builder.Item.Data.Control as TextBox;

            control.TextAlign = textAlign;
            return(builder);
        }
Пример #6
0
        /// <summary>
        /// Sets PasswordChar value of TextBox control
        /// </summary>
        /// <param name="builder"></param>
        /// <param name="passwordChar"></param>
        /// <returns></returns>
        public static DialogSetOptionsWithSpecifiedControlBuilder <TextBox, string> UsePasswordChar
            (this DialogSetOptionsWithSpecifiedControlBuilder <TextBox, string> builder, char passwordChar = '*')
        {
            var control = builder.Item.Data.Control as TextBox;

            control.PasswordChar = passwordChar;
            return(builder);
        }
Пример #7
0
        /// <summary>
        /// Sets Text value of TextBox control
        /// </summary>
        /// <param name="builder"></param>
        /// <param name="text"></param>
        /// <returns></returns>
        public static DialogSetOptionsWithSpecifiedControlBuilder <Label, string> HasText
            (this DialogSetOptionsWithSpecifiedControlBuilder <Label, string> builder, string text)
        {
            var control = builder.Item.Data.Control as Label;

            control.Text = text;
            return(builder);
        }
Пример #8
0
        /// <summary>
        /// Sets TextAlign value of TextBox control
        /// </summary>
        /// <param name="builder"></param>
        /// <param name="textAlign"></param>
        /// <returns></returns>
        public static DialogSetOptionsWithSpecifiedControlBuilder <Label, string> HasTextAlign
            (this DialogSetOptionsWithSpecifiedControlBuilder <Label, string> builder, ContentAlignment textAlign)
        {
            var control = builder.Item.Data.Control as Label;

            control.TextAlign = textAlign;
            return(builder);
        }
Пример #9
0
        /// <summary>
        /// Sets Multiline value of TextBox control
        /// </summary>
        /// <param name="builder"></param>
        /// <param name="size"></param>
        /// <returns></returns>
        public static DialogSetOptionsWithSpecifiedControlBuilder <TextBox, string> IsMultiline
            (this DialogSetOptionsWithSpecifiedControlBuilder <TextBox, string> builder, int size = 100)
        {
            var control = builder.Item.Data.Control as TextBox;

            control.Multiline = true;
            builder.Item.Data.ControlHeight = size;
            return(builder);
        }