diff --git a/DyeingComputer.csproj b/DyeingComputer.csproj
index 11a230f..eddd139 100644
--- a/DyeingComputer.csproj
+++ b/DyeingComputer.csproj
@@ -202,6 +202,12 @@
Sampling.xaml
+
+ TouchKeyboardNumeral.xaml
+
+
+ TouchKeyboard.xaml
+
UserInf.xaml
@@ -286,6 +292,14 @@
MSBuild:Compile
Designer
+
+ MSBuild:Compile
+ Designer
+
+
+ Designer
+ MSBuild:Compile
+
MSBuild:Compile
Designer
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
index ffc9faa..f2a20ef 100644
--- a/MainWindow.xaml.cs
+++ b/MainWindow.xaml.cs
@@ -1,6 +1,7 @@
using DyeingComputer.UserClass;
using DyeingComputer.View;
using DyeingComputer.ViewModel;
+using DyeingComputer.Windows;
using System;
using System.Collections.Generic;
using System.Linq;
diff --git a/Windows/TouchKeyboard.xaml b/Windows/TouchKeyboard.xaml
new file mode 100644
index 0000000..2e30236
--- /dev/null
+++ b/Windows/TouchKeyboard.xaml
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Windows/TouchKeyboard.xaml.cs b/Windows/TouchKeyboard.xaml.cs
new file mode 100644
index 0000000..e57d76a
--- /dev/null
+++ b/Windows/TouchKeyboard.xaml.cs
@@ -0,0 +1,105 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+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.Shapes;
+
+namespace DyeingComputer.Windows
+{
+ ///
+ /// TouchKeyboard.xaml 的交互逻辑
+ ///
+ public partial class TouchKeyboard : Window
+ {
+ private bool isShiftActive = false;
+ private bool isSymbolActive = false;
+ public string KeyValue;
+
+ public TouchKeyboard()
+ {
+ InitializeComponent();
+ }
+
+ private void KeyButton_Click(object sender, RoutedEventArgs e)
+ {
+ Button button = sender as Button;
+ if (button != null)
+ {
+ string key = button.Content.ToString();
+
+ if (key.Length == 1 && char.IsLetter(key[0]))
+ {
+ key = isShiftActive ? key.ToUpper() : key.ToLower();
+ }
+
+ PreviewTextBox.Text += key;
+
+ // 输入后关闭Shift状态
+ if (isShiftActive)
+ {
+ isShiftActive = false;
+ UpdateButtonAppearance();
+ }
+ }
+ }
+
+ private void Shift_Click(object sender, RoutedEventArgs e)
+ {
+ isShiftActive = !isShiftActive;
+ UpdateButtonAppearance();
+ }
+
+ private void Symbol_Click(object sender, RoutedEventArgs e)
+ {
+ isSymbolActive = !isSymbolActive;
+ // 这里可以添加切换符号键盘的逻辑
+ StatusTextBlock.Text = isSymbolActive ? "符号模式" : "字母模式";
+ }
+
+ private void Space_Click(object sender, RoutedEventArgs e)
+ {
+ PreviewTextBox.Text += " ";
+ }
+
+ private void Backspace_Click(object sender, RoutedEventArgs e)
+ {
+ if (!string.IsNullOrEmpty(PreviewTextBox.Text))
+ {
+ PreviewTextBox.Text = PreviewTextBox.Text.Substring(0, PreviewTextBox.Text.Length - 1);
+ }
+ }
+
+ private void Enter_Click(object sender, RoutedEventArgs e)
+ {
+ KeyValue = PreviewTextBox.Text;
+ this.Close();
+ // PreviewTextBox.Text += Environment.NewLine;
+ }
+
+ private void Hide_Click(object sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
+
+ private void UpdateButtonAppearance()
+ {
+ // 更新Shift按钮的外观以反映当前状态
+ if (isShiftActive)
+ {
+ ShiftButton.Background = new SolidColorBrush(Colors.LightBlue);
+ }
+ else
+ {
+ ShiftButton.Background = new SolidColorBrush(Color.FromRgb(224, 224, 224));
+ }
+ }
+ }
+}
diff --git a/Windows/TouchKeyboardNumeral.xaml b/Windows/TouchKeyboardNumeral.xaml
new file mode 100644
index 0000000..fe36424
--- /dev/null
+++ b/Windows/TouchKeyboardNumeral.xaml
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Windows/TouchKeyboardNumeral.xaml.cs b/Windows/TouchKeyboardNumeral.xaml.cs
new file mode 100644
index 0000000..aec6a78
--- /dev/null
+++ b/Windows/TouchKeyboardNumeral.xaml.cs
@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+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.Shapes;
+
+namespace DyeingComputer.Windows
+{
+ ///
+ /// TouchKeyboard.xaml 的交互逻辑
+ ///
+ public partial class TouchKeyboardNumeral : Window
+ {
+ private bool isShiftActive = false;
+ private bool isSymbolActive = false;
+ public string KeyValue;
+
+ public TouchKeyboardNumeral()
+ {
+ InitializeComponent();
+ }
+
+ private void KeyButton_Click(object sender, RoutedEventArgs e)
+ {
+ Button button = sender as Button;
+ if (button != null)
+ {
+ string key = button.Content.ToString();
+
+ if (key.Length == 1 && char.IsLetter(key[0]))
+ {
+ key = isShiftActive ? key.ToUpper() : key.ToLower();
+ }
+
+ PreviewTextBox.Text += key;
+ }
+ }
+
+ private void Backspace_Click(object sender, RoutedEventArgs e)
+ {
+ if (!string.IsNullOrEmpty(PreviewTextBox.Text))
+ {
+ PreviewTextBox.Text = PreviewTextBox.Text.Substring(0, PreviewTextBox.Text.Length - 1);
+ }
+ }
+
+ private void Enter_Click(object sender, RoutedEventArgs e)
+ {
+ KeyValue = PreviewTextBox.Text;
+ this.Close();
+ // PreviewTextBox.Text += Environment.NewLine;
+ }
+
+ private void Hide_Click(object sender, RoutedEventArgs e)
+ {
+ this.Close();
+ }
+
+ }
+}