/// <summary> /// OVERLOAD Add onClick listener. /// </summary> /// <param name="_view"></param> /// <param name="_methodName"></param> /// <returns>IMyButton</returns> public IMyButton addOnClick(IMyView _view, string _methodName) { myButton_btn.Click += delegate(object sender, RoutedEventArgs e) { _view.callMethod(_methodName); }; return(this); }
/// <summary> /// OVERLOAD Add onMouseHover listener. /// </summary> /// <param name=""></param> /// <param name="_methodName"></param> /// <returns>IMyButton</returns> public IMyButton addOnMouseHover(IMyView _view, string _methodName) { myButton_btn.MouseEnter += delegate(object sender, MouseEventArgs e) { _view.callMethod(_methodName); }; return(this); }
/// <summary> /// Add onGotFocus listener. /// </summary> /// <param name="_view"></param> /// <param name="_methodName"></param> /// <returns></returns> public IMyProgressBar addOnGotFocus(IMyView _view, string _methodName) { myProgressBar_pb.GotFocus += delegate(object sender, RoutedEventArgs e) { _view.callMethod(_methodName); }; return(this); }
/// <summary> /// Add onSelectionChanged listener. /// </summary> /// <param name="_view"></param> /// <param name="_methodName"></param> /// <returns>IMyListView</returns> public IMyListView addOnSelectionChanged(IMyView _view, string _methodName) { myListView_lv.SelectionChanged += delegate(object sender, SelectionChangedEventArgs e) { _view.callMethod(_methodName, myListView_lv.SelectedItem); }; return(this); }
/// <summary> /// Add onPreviewMouseDown listener. /// </summary> /// <param name="_controller"></param> /// <param name="_methodName"></param> /// <returns>IMyTextBlock</returns> public IMyTextBlock addOnPreviewMouseDown(IMyView _view, string _methodName) { myTextBlock_tb.PreviewMouseDown += delegate(object sender, MouseButtonEventArgs e) { _view.callMethod(_methodName); }; return(this); }
/// <summary> /// Add onValueChanged listener. /// </summary> /// <param name="_view"></param> /// <param name="_methodName"></param> /// <returns>IMyProgressBar</returns> public IMyProgressBar addOnValueChanged(IMyView _view, string _methodName) { myProgressBar_pb.ValueChanged += delegate(object sender, RoutedPropertyChangedEventArgs <double> e) { _view.callMethod(_methodName); }; return(this); }
/// <summary> /// Add onDropDownClosed listener. /// </summary> /// <param name="_view"></param> /// <param name="_methodName"></param> /// <returns>IMyComboBox</returns> public IMyComboBox addOnDropDownClosed(IMyView _view, string _methodName) { myComboBox_cbo.DropDownClosed += delegate(object sender, EventArgs e) { _view.callMethod(_methodName); }; return(this); }
/// <summary> /// Add onSelectionChanged listener. /// </summary> /// <param name="_view"></param> /// <param name="_methodName"></param> /// <returns>IMyComboBox</returns> public IMyComboBox addOnSelectionChanged(IMyView _view, string _methodName) { myComboBox_cbo.SelectionChanged += delegate(object sender, SelectionChangedEventArgs e) { _view.callMethod(_methodName, ((sender as System.Windows.Controls.ComboBox).SelectedItem as ComboBoxItem)); }; return(this); }
/// <summary> /// Add onGotFocus listener. /// </summary> /// <param name="_controller"></param> /// <param name="_methodName"></param> /// <returns></returns> public IMyPasswordBox addOnGotFocus(IMyView _view, string _methodName) { myPasswordBox_pwd.GotFocus += delegate(object sender, RoutedEventArgs e) { _view.callMethod(_methodName); }; return(this); }
/// <summary> /// Add onPreviewMouseDown listener. /// </summary> /// <param name="_view"></param> /// <param name="_methodName"></param> /// <returns></returns> public IMyPasswordBox addOnPreviewMouseDown(IMyView _view, string _methodName) { myPasswordBox_pwd.PreviewMouseDown += delegate(object sender, MouseButtonEventArgs e) { _view.callMethod(_methodName); }; return(this); }
/// <summary> /// Add onTextChanged listener. /// </summary> /// <param name="_view"></param> /// <param name="_methodName"></param> /// <returns>IMyPasswordBox</returns> public IMyPasswordBox addOnTextChanged(IMyView _view, string _methodName) { myPasswordBox_pwd.PasswordChanged += delegate(object sender, RoutedEventArgs e) { _view.callMethod(_methodName); }; return(this); }
/// <summary> /// OVERLOAD Add onUnchecked listener. /// </summary> /// <param name="_view"></param> /// <param name="_methodName"></param> /// <returns>IMyCheckBox</returns> public IMyCheckBox addOnUnchecked(IMyView _view, string _methodName) { myCheckBox_chk.Unchecked += delegate(object sender, System.Windows.RoutedEventArgs e) { _view.callMethod(_methodName); }; return(this); }
/// <summary> /// Add onChecked listener. /// </summary> /// <param name="_view"></param> /// <param name="_methodName"></param> /// <returns>IMyRadioButton</returns> public IMyRadioButton addOnChecked(IMyView _view, string _methodName) { myRadioButton_rdo.Checked += delegate(object sender, System.Windows.RoutedEventArgs e) { _view.callMethod(_methodName); }; return(this); }
/// <summary> /// Add onGotFocus listener /// </summary> /// <param name="_view"></param> /// <param name="_methodName"></param> /// <returns>IMyTextBox</returns> public IMyTextBox addOnGotFocus(IMyView _view, string _methodName) { myTextBox_txt.GotFocus += delegate(object sender, System.Windows.RoutedEventArgs e) { _view.callMethod(_methodName); }; return(this); }
/// <summary> /// Add onTextChanged listener. /// </summary> /// <param name="_view"></param> /// <param name="_methodName"></param> /// <returns>IMyTextBox</returns> public IMyTextBox addOnTextChanged(IMyView _view, string _methodName) { myTextBox_txt.TextChanged += delegate(object sender, TextChangedEventArgs e) { _view.callMethod(_methodName); }; return(this); }