40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Input;
|
|
|
|
namespace TabletTester2025
|
|
{
|
|
public partial class MainWindow : Window
|
|
{
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
|
|
|
|
private void OnHardnessUpPress(object sender, MouseButtonEventArgs e)
|
|
{
|
|
if (sender is Button btn && btn.DataContext is ViewModels.StationViewModel vm)
|
|
vm.StartHardnessUp();
|
|
}
|
|
|
|
private void OnHardnessUpRelease(object sender, MouseButtonEventArgs e)
|
|
{
|
|
if (sender is Button btn && btn.DataContext is ViewModels.StationViewModel vm)
|
|
vm.StopHardnessUp();
|
|
}
|
|
|
|
private void OnHardnessDownPress(object sender, MouseButtonEventArgs e)
|
|
{
|
|
if (sender is Button btn && btn.DataContext is ViewModels.StationViewModel vm)
|
|
vm.StartHardnessDown();
|
|
}
|
|
|
|
private void OnHardnessDownRelease(object sender, MouseButtonEventArgs e)
|
|
{
|
|
if (sender is Button btn && btn.DataContext is ViewModels.StationViewModel vm)
|
|
vm.StopHardnessDown();
|
|
}
|
|
}
|
|
} |