diff --git a/ModbusDemo/App.xaml b/ModbusDemo/App.xaml
index 04c2eea..53a33ed 100644
--- a/ModbusDemo/App.xaml
+++ b/ModbusDemo/App.xaml
@@ -3,8 +3,44 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ModbusDemo"
xmlns:prism="http://prismlibrary.com/"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
>
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ModbusDemo/App.xaml.cs b/ModbusDemo/App.xaml.cs
index 63d701f..4938d93 100644
--- a/ModbusDemo/App.xaml.cs
+++ b/ModbusDemo/App.xaml.cs
@@ -17,7 +17,7 @@ namespace ModbusDemo
/// 启动页面
protected override Window CreateShell()
{
- return Container.Resolve();
+ return Container.Resolve();
}
///
/// 实现控制反转和依赖注入功能
diff --git a/ModbusDemo/MainWindow.xaml b/ModbusDemo/MainWindow.xaml
index 61e2f4c..4ea3813 100644
--- a/ModbusDemo/MainWindow.xaml
+++ b/ModbusDemo/MainWindow.xaml
@@ -1,12 +1,86 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ModbusDemo/MainWindow.xaml.cs b/ModbusDemo/MainWindow.xaml.cs
index 9ab9ea9..e16eb18 100644
--- a/ModbusDemo/MainWindow.xaml.cs
+++ b/ModbusDemo/MainWindow.xaml.cs
@@ -20,5 +20,30 @@ namespace ModbusDemo
{
InitializeComponent();
}
+
+ private void btnClose_Click(object sender, RoutedEventArgs e)
+ {
+ Environment.Exit(0);
+ }
+
+ private void btnMax_Click(object sender, RoutedEventArgs e)
+ {
+ WindowState = WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized;
+ }
+
+ private void btnMin_Click(object sender, RoutedEventArgs e)
+ {
+ WindowState = WindowState.Minimized;
+ }
+
+ private void ColorZone_MouseDoubleClick(object sender, MouseButtonEventArgs e)
+ {
+ WindowState = WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized;
+ }
+
+ private void lbMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ drawerHost.IsLeftDrawerOpen = false;
+ }
}
}
\ No newline at end of file
diff --git a/ModbusDemo/ModbusDemo.csproj b/ModbusDemo/ModbusDemo.csproj
index e3cafc8..6137624 100644
--- a/ModbusDemo/ModbusDemo.csproj
+++ b/ModbusDemo/ModbusDemo.csproj
@@ -13,4 +13,10 @@
+
+
+
+
+
+