diff --git a/ADIS_Csharp/ADIS_Csharp.sln b/ADIS_Csharp/ADIS_Csharp.sln
index 3af1a4e..bd84a1d 100644
--- a/ADIS_Csharp/ADIS_Csharp.sln
+++ b/ADIS_Csharp/ADIS_Csharp.sln
@@ -21,6 +21,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RobotLib", "RobotLib\RobotL
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RobotConsoleClient", "RobotConsoleClient\RobotConsoleClient.csproj", "{7FFC4B71-FFC2-45A1-941D-4B0A78C20B89}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RobotClientWpf", "RobotClientWpf\RobotClientWpf.csproj", "{1D715C65-A8D8-45D3-AE63-D88C60337505}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -63,6 +65,10 @@ Global
{7FFC4B71-FFC2-45A1-941D-4B0A78C20B89}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7FFC4B71-FFC2-45A1-941D-4B0A78C20B89}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7FFC4B71-FFC2-45A1-941D-4B0A78C20B89}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1D715C65-A8D8-45D3-AE63-D88C60337505}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1D715C65-A8D8-45D3-AE63-D88C60337505}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1D715C65-A8D8-45D3-AE63-D88C60337505}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1D715C65-A8D8-45D3-AE63-D88C60337505}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/ADIS_Csharp/RobotClientWpf/App.xaml b/ADIS_Csharp/RobotClientWpf/App.xaml
new file mode 100644
index 0000000..5c9fb2b
--- /dev/null
+++ b/ADIS_Csharp/RobotClientWpf/App.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/ADIS_Csharp/RobotClientWpf/App.xaml.cs b/ADIS_Csharp/RobotClientWpf/App.xaml.cs
new file mode 100644
index 0000000..f4231a8
--- /dev/null
+++ b/ADIS_Csharp/RobotClientWpf/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace RobotClientWpf
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/ADIS_Csharp/RobotClientWpf/AssemblyInfo.cs b/ADIS_Csharp/RobotClientWpf/AssemblyInfo.cs
new file mode 100644
index 0000000..8b5504e
--- /dev/null
+++ b/ADIS_Csharp/RobotClientWpf/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/ADIS_Csharp/RobotClientWpf/MainWindow.xaml b/ADIS_Csharp/RobotClientWpf/MainWindow.xaml
new file mode 100644
index 0000000..069ff63
--- /dev/null
+++ b/ADIS_Csharp/RobotClientWpf/MainWindow.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
diff --git a/ADIS_Csharp/RobotClientWpf/MainWindow.xaml.cs b/ADIS_Csharp/RobotClientWpf/MainWindow.xaml.cs
new file mode 100644
index 0000000..4bdc636
--- /dev/null
+++ b/ADIS_Csharp/RobotClientWpf/MainWindow.xaml.cs
@@ -0,0 +1,49 @@
+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.Navigation;
+using System.Windows.Shapes;
+using RobotLib;
+
+namespace RobotClientWpf
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Robot.Instance.Connect("host", 1818);
+ Robot.Instance.Battery.BatteryChanged += BatteryChanged;
+ }
+
+ private void BatteryChanged(object? sender, BatteryEventArgs e)
+ {
+ if (!Dispatcher.CheckAccess())
+ {
+ EventHandler eventDelegate = BatteryChanged;
+ Dispatcher.Invoke(eventDelegate, sender, e);
+ }
+ else
+ {
+ labelBattery.Content = $"Battery: {e.Voltage} V";
+ }
+ }
+
+ private void buttonBuzz_Click(object sender, RoutedEventArgs e)
+ {
+ Robot.Instance.Buzzer.Beep(300, 500);
+ }
+ }
+}
diff --git a/ADIS_Csharp/RobotClientWpf/RobotClientWpf.csproj b/ADIS_Csharp/RobotClientWpf/RobotClientWpf.csproj
new file mode 100644
index 0000000..08b8f5f
--- /dev/null
+++ b/ADIS_Csharp/RobotClientWpf/RobotClientWpf.csproj
@@ -0,0 +1,14 @@
+
+
+
+ WinExe
+ net6.0-windows
+ enable
+ true
+
+
+
+
+
+
+