Esempio n. 1
0
        public static DateTimePicker BindValueTo(this DateTimePicker src, Action <DateTime?> action, CheckBox enabled = null, ControlListenGroup clg = null)
        {
            void evt() => action(src.GetValue(enabled));

            src.ValueChanged += (s, e) => evt();
            if (enabled != null)
            {
                enabled.CheckedChanged += (e, s) => evt();
            }

            evt();
            src.Listen(clg);
            enabled?.Listen(clg);
            return(src);
        }