diff --git a/Audit.csproj b/Audit.csproj
index d62a5ad..f465c75 100644
--- a/Audit.csproj
+++ b/Audit.csproj
@@ -137,6 +137,9 @@
LogWindow.xaml
+
+ Set_up.xaml
+
MSBuild:Compile
Designer
@@ -153,6 +156,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
@@ -172,8 +179,6 @@
ResXFileCodeGenerator
Resources.Designer.cs
-
-
diff --git a/Windows/LogWindow.xaml b/Windows/LogWindow.xaml
index 93c2d8f..a2d9061 100644
--- a/Windows/LogWindow.xaml
+++ b/Windows/LogWindow.xaml
@@ -12,8 +12,8 @@
-
-
-
+
+
+
diff --git a/Windows/LogWindow.xaml.cs b/Windows/LogWindow.xaml.cs
index bb1b6fd..b1f9479 100644
--- a/Windows/LogWindow.xaml.cs
+++ b/Windows/LogWindow.xaml.cs
@@ -25,14 +25,33 @@ namespace Audit.Windows
InitializeComponent();
}
- private void exit(object sender, RoutedEventArgs e)//退出按钮
+ private void Exit(object sender, RoutedEventArgs e)//退出按钮
{
Application.Current.Shutdown();//关闭程序窗口
}
private void Log(object sender, RoutedEventArgs e)//登录按钮
{
-
+ string user = this.users.Text;
+ string passwd = this.Passwds.Text;
+ if (user == "engineer")
+ {
+ if (passwd == "engineer")
+ {
+ MessageBox.Show("警告:设置模式将会对本机运行造成重大影响,请您明确操作目的及可能需承担的后果");
+ Windows.Set_up steup = new Windows.Set_up();
+ steup.Show();
+ this.Close();
+ }
+ else
+ {
+ MessageBox.Show("错误01:错误的认证信息");
+ }
+ }
+ else
+ {
+
+ }
}
}
}
diff --git a/Windows/Set_up.xaml b/Windows/Set_up.xaml
new file mode 100644
index 0000000..4012201
--- /dev/null
+++ b/Windows/Set_up.xaml
@@ -0,0 +1,12 @@
+
+
+
+
+
diff --git a/Windows/Set_up.xaml.cs b/Windows/Set_up.xaml.cs
new file mode 100644
index 0000000..7f2ae9e
--- /dev/null
+++ b/Windows/Set_up.xaml.cs
@@ -0,0 +1,28 @@
+using MahApps.Metro.Controls;
+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 Audit.Windows
+{
+ ///
+ /// Set_up.xaml 的交互逻辑
+ ///
+ public partial class Set_up : MetroWindow
+ {
+ public Set_up()
+ {
+ InitializeComponent();
+ }
+ }
+}