From 48cdfd0e7276e27f811b5752c5b9951144caede3 Mon Sep 17 00:00:00 2001 From: LeapwardKoex Date: Wed, 12 Jun 2024 22:37:09 +1200 Subject: [PATCH] Add ability for emulator to emulate keyboard events for ring button emulation --- App.config | 3 ++ MaiTouchSensorButtonStateManager.cs | 2 +- MainWindow.xaml | 5 +-- MainWindow.xaml.cs | 11 ++++++ MainWindowViewModel.cs | 23 ++++++++++++ Properties/Settings.Designer.cs | 12 +++++++ Properties/Settings.settings | 3 ++ Resources/Strings.Designer.cs | 18 ++++++++++ Resources/Strings.ja-JP.resx | 6 ++++ Resources/Strings.resx | 6 ++++ Resources/Strings.zh-CN.resx | 6 ++++ RingButtonEmulator.cs | 56 +++++++++++++++++++++++++++++ TouchPanel.xaml.cs | 18 +++++++++- 13 files changed, 165 insertions(+), 4 deletions(-) create mode 100644 RingButtonEmulator.cs diff --git a/App.config b/App.config index 931ba7e..0ac343f 100644 --- a/App.config +++ b/App.config @@ -25,6 +25,9 @@ + + False + \ No newline at end of file diff --git a/MaiTouchSensorButtonStateManager.cs b/MaiTouchSensorButtonStateManager.cs index a8eb933..60edf2a 100644 --- a/MaiTouchSensorButtonStateManager.cs +++ b/MaiTouchSensorButtonStateManager.cs @@ -3,7 +3,7 @@ namespace WpfMaiTouchEmulator; -enum TouchValue: long +public enum TouchValue: long { A1 = 1 << 0, // 2^0 A2 = 1 << 1, // 2^1 diff --git a/MainWindow.xaml b/MainWindow.xaml index 496243e..19321d3 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Closing="MainWindow_Closing" - Title="MainWindow" Height="360" Width="500" ResizeMode="NoResize" WindowStartupLocation="CenterScreen"> + Title="MainWindow" Height="384" Width="500" ResizeMode="NoResize" WindowStartupLocation="CenterScreen"> @@ -38,6 +38,7 @@