You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
2.4 KiB

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
{
/// <summary>
/// Interaction logic for TemplateListView.xaml
/// </summary>
public partial class ControlCOTManualView : UserControl
{
public ControlCOTManualView()
{
InitializeComponent();
this.Loaded += ControlCOTManualView_Loaded;
this.Unloaded += ControlCOTManualView_Unloaded;
}
private void ControlCOTManualView_Unloaded(object sender, RoutedEventArgs e)
{
}
private void ControlCOTManualView_Loaded(object sender, RoutedEventArgs e)
{
}
ControlCOTManualViewModule _vm = null;
private ControlCOTManualViewModule GetCurrentMv()
{
if (null == _vm)
{
_vm = this.DataContext as ControlCOTManualViewModule;
}
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();
}
}
}