2026-05-05 15:31:24 +08:00
|
|
|
|
using System.Windows;
|
2026-05-15 15:48:43 +08:00
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
|
using System.Windows.Input;
|
2026-05-05 15:31:24 +08:00
|
|
|
|
|
|
|
|
|
|
namespace TabletTester2025
|
|
|
|
|
|
{
|
|
|
|
|
|
public partial class MainWindow : Window
|
|
|
|
|
|
{
|
|
|
|
|
|
public MainWindow()
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
2026-05-15 15:48:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
|
}
|
2026-05-05 15:31:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|