Пример #1
0
 public static DataGridView Listen(this DataGridView src, ControlListenGroup listen)
 {
     if (listen != null)
     {
         src.RowsAdded        += (s, e) => listen.Trigger();
         src.RowsRemoved      += (s, e) => listen.Trigger();
         src.CellValueChanged += (s, e) => listen.Trigger();
     }
     return(src);
 }
Пример #2
0
 public static RadioButton Listen(this RadioButton src, ControlListenGroup listen)
 {
     if (listen != null)
     {
         src.CheckedChanged += (s, e) => listen.Trigger();
     }
     return(src);
 }
Пример #3
0
 public static CheckBox Listen(this CheckBox src, ControlListenGroup listen)
 {
     if (listen != null)
     {
         src.CheckedChanged += (s, e) => listen.Trigger();
     }
     return(src);
 }
Пример #4
0
 public static TextBox Listen(this TextBox src, ControlListenGroup listen)
 {
     if (listen != null)
     {
         src.TextChanged += (s, e) => listen.Trigger();
     }
     return(src);
 }
Пример #5
0
 public static DateTimePicker Listen(this DateTimePicker src, ControlListenGroup listen)
 {
     if (listen != null)
     {
         src.ValueChanged += (s, e) => listen.Trigger();
     }
     return(src);
 }
Пример #6
0
 public static NumericUpDown Listen(this NumericUpDown src, ControlListenGroup listen)
 {
     if (listen != null)
     {
         src.ValueChanged += (s, e) => listen.Trigger();
     }
     return(src);
 }
Пример #7
0
 public static ComboBox Listen(this ComboBox src, ControlListenGroup listen, Action action = null)
 {
     if (listen != null)
     {
         src.SelectionChangeCommitted += (s, e) => listen.Trigger();
     }
     action?.Invoke();
     return(src);
 }