using GummingCommon; using GummingControl; using GummingSupport; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace Gumming { /// /// Interaction logic for TemplateListView.xaml /// public partial class ControlDEVManualView : UserControl { public ControlDEVManualView() { InitializeComponent(); this.Loaded += ControlDEVManualView_Loaded; this.Unloaded += ControlDEVManualView_Unloaded; } private void ControlDEVManualView_Unloaded(object sender, RoutedEventArgs e) { } private void ControlDEVManualView_Loaded(object sender, RoutedEventArgs e) { } ControlDEVManualViewModule _vm = null; private ControlDEVManualViewModule GetCurrentMv() { if (null == _vm) { _vm = this.DataContext as ControlDEVManualViewModule; } return _vm; } private void AxisSpeed_LostFocus(object sender, RoutedEventArgs e) { TextBox tb = (TextBox)sender; if (tb != null) { GetCurrentMv().OnAxisSpeedTextChangedCommand(tb.Text); } } private void AxisAcc_LostFocus(object sender, RoutedEventArgs e) { TextBox tb = (TextBox)sender; if (tb != null) { GetCurrentMv().OnAxisAccTextChangedCommand(tb.Text); } } private void AxisDec_LostFocus(object sender, RoutedEventArgs e) { TextBox tb = (TextBox)sender; if (tb != null) { GetCurrentMv().OnAxisDecTextChangedCommand(tb.Text); } } private void Run_PreviewMouseDown(object sender, MouseButtonEventArgs e) { GetCurrentMv().OnRUNStart(); } private void Run_PreviewMouseUp(object sender, MouseButtonEventArgs e) { GetCurrentMv().OnRUNStop(); } } }