diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
index fe248b7..f1c7af9 100644
--- a/SubCabinetSolution/Views/MonitorQueryPage.xaml
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
index fe248b7..f1c7af9 100644
--- a/SubCabinetSolution/Views/MonitorQueryPage.xaml
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
index db7b499..b94faac 100644
--- a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
index fe248b7..f1c7af9 100644
--- a/SubCabinetSolution/Views/MonitorQueryPage.xaml
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
index db7b499..b94faac 100644
--- a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
index 9d51467..fb942ba 100644
--- a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
index fe248b7..f1c7af9 100644
--- a/SubCabinetSolution/Views/MonitorQueryPage.xaml
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
index db7b499..b94faac 100644
--- a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
index 9d51467..fb942ba 100644
--- a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutGoodsPage.xaml b/SubCabinetSolution/Views/PutGoodsPage.xaml
index 7b19cd7..051dcae 100644
--- a/SubCabinetSolution/Views/PutGoodsPage.xaml
+++ b/SubCabinetSolution/Views/PutGoodsPage.xaml
@@ -3,18 +3,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="PutGoodsPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding PutGoodsPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
index fe248b7..f1c7af9 100644
--- a/SubCabinetSolution/Views/MonitorQueryPage.xaml
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
index db7b499..b94faac 100644
--- a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
index 9d51467..fb942ba 100644
--- a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutGoodsPage.xaml b/SubCabinetSolution/Views/PutGoodsPage.xaml
index 7b19cd7..051dcae 100644
--- a/SubCabinetSolution/Views/PutGoodsPage.xaml
+++ b/SubCabinetSolution/Views/PutGoodsPage.xaml
@@ -3,18 +3,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="PutGoodsPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding PutGoodsPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
index fe248b7..f1c7af9 100644
--- a/SubCabinetSolution/Views/MonitorQueryPage.xaml
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
index db7b499..b94faac 100644
--- a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
index 9d51467..fb942ba 100644
--- a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutGoodsPage.xaml b/SubCabinetSolution/Views/PutGoodsPage.xaml
index 7b19cd7..051dcae 100644
--- a/SubCabinetSolution/Views/PutGoodsPage.xaml
+++ b/SubCabinetSolution/Views/PutGoodsPage.xaml
@@ -3,18 +3,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="PutGoodsPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding PutGoodsPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
index fe248b7..f1c7af9 100644
--- a/SubCabinetSolution/Views/MonitorQueryPage.xaml
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
index db7b499..b94faac 100644
--- a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
index 9d51467..fb942ba 100644
--- a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutGoodsPage.xaml b/SubCabinetSolution/Views/PutGoodsPage.xaml
index 7b19cd7..051dcae 100644
--- a/SubCabinetSolution/Views/PutGoodsPage.xaml
+++ b/SubCabinetSolution/Views/PutGoodsPage.xaml
@@ -3,18 +3,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="PutGoodsPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding PutGoodsPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
index fe248b7..f1c7af9 100644
--- a/SubCabinetSolution/Views/MonitorQueryPage.xaml
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
index db7b499..b94faac 100644
--- a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
index 9d51467..fb942ba 100644
--- a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutGoodsPage.xaml b/SubCabinetSolution/Views/PutGoodsPage.xaml
index 7b19cd7..051dcae 100644
--- a/SubCabinetSolution/Views/PutGoodsPage.xaml
+++ b/SubCabinetSolution/Views/PutGoodsPage.xaml
@@ -3,18 +3,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="PutGoodsPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding PutGoodsPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
index fe248b7..f1c7af9 100644
--- a/SubCabinetSolution/Views/MonitorQueryPage.xaml
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
index db7b499..b94faac 100644
--- a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
index 9d51467..fb942ba 100644
--- a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutGoodsPage.xaml b/SubCabinetSolution/Views/PutGoodsPage.xaml
index 7b19cd7..051dcae 100644
--- a/SubCabinetSolution/Views/PutGoodsPage.xaml
+++ b/SubCabinetSolution/Views/PutGoodsPage.xaml
@@ -3,18 +3,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="PutGoodsPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding PutGoodsPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
index fe248b7..f1c7af9 100644
--- a/SubCabinetSolution/Views/MonitorQueryPage.xaml
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
index db7b499..b94faac 100644
--- a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
index 9d51467..fb942ba 100644
--- a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutGoodsPage.xaml b/SubCabinetSolution/Views/PutGoodsPage.xaml
index 7b19cd7..051dcae 100644
--- a/SubCabinetSolution/Views/PutGoodsPage.xaml
+++ b/SubCabinetSolution/Views/PutGoodsPage.xaml
@@ -3,18 +3,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="PutGoodsPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding PutGoodsPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
+
@@ -60,14 +58,15 @@
BorderBrush="#F1F1F1"
BorderThickness="0,0,0,1">
-
+ BorderThickness="0"
+ IsEnabled="False"
+ Opacity="1">
-
+
-
+ ShowClearButton="True" />
@@ -152,16 +150,15 @@
-
+ BorderThickness="0"
+ Command="{Binding AddUserCommand}">
-
+
\ No newline at end of file
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
index fe248b7..f1c7af9 100644
--- a/SubCabinetSolution/Views/MonitorQueryPage.xaml
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
index db7b499..b94faac 100644
--- a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
index 9d51467..fb942ba 100644
--- a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutGoodsPage.xaml b/SubCabinetSolution/Views/PutGoodsPage.xaml
index 7b19cd7..051dcae 100644
--- a/SubCabinetSolution/Views/PutGoodsPage.xaml
+++ b/SubCabinetSolution/Views/PutGoodsPage.xaml
@@ -3,18 +3,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="PutGoodsPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding PutGoodsPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
+
@@ -60,14 +58,15 @@
BorderBrush="#F1F1F1"
BorderThickness="0,0,0,1">
-
+ BorderThickness="0"
+ IsEnabled="False"
+ Opacity="1">
-
+
-
+ ShowClearButton="True" />
@@ -152,16 +150,15 @@
-
+ BorderThickness="0"
+ Command="{Binding AddUserCommand}">
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/SpdQueryPage.xaml b/SubCabinetSolution/Views/SpdQueryPage.xaml
index e3e1345..0392d92 100644
--- a/SubCabinetSolution/Views/SpdQueryPage.xaml
+++ b/SubCabinetSolution/Views/SpdQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo
index 12a3574..dc3feab 100644
--- a/.vs/SubCabinetSolution/v17/.suo
+++ b/.vs/SubCabinetSolution/v17/.suo
Binary files differ
diff --git a/SubCabinetSolution/App.config b/SubCabinetSolution/App.config
index 89c5774..e7f1514 100644
--- a/SubCabinetSolution/App.config
+++ b/SubCabinetSolution/App.config
@@ -3,16 +3,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/App.xaml b/SubCabinetSolution/App.xaml
index c404cff..447b314 100644
--- a/SubCabinetSolution/App.xaml
+++ b/SubCabinetSolution/App.xaml
@@ -6,7 +6,7 @@
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:SubCabinetSolution.ViewModel"
d1P1:Ignorable="d"
- StartupUri="/MainWindow.xaml">
+ StartupUri="/Views/MainWindow.xaml">
@@ -39,6 +39,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
index fe248b7..f1c7af9 100644
--- a/SubCabinetSolution/Views/MonitorQueryPage.xaml
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
index db7b499..b94faac 100644
--- a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
index 9d51467..fb942ba 100644
--- a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutGoodsPage.xaml b/SubCabinetSolution/Views/PutGoodsPage.xaml
index 7b19cd7..051dcae 100644
--- a/SubCabinetSolution/Views/PutGoodsPage.xaml
+++ b/SubCabinetSolution/Views/PutGoodsPage.xaml
@@ -3,18 +3,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="PutGoodsPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding PutGoodsPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
+
@@ -60,14 +58,15 @@
BorderBrush="#F1F1F1"
BorderThickness="0,0,0,1">
-
+ BorderThickness="0"
+ IsEnabled="False"
+ Opacity="1">
-
+
-
+ ShowClearButton="True" />
@@ -152,16 +150,15 @@
-
+ BorderThickness="0"
+ Command="{Binding AddUserCommand}">
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/SpdQueryPage.xaml b/SubCabinetSolution/Views/SpdQueryPage.xaml
index e3e1345..0392d92 100644
--- a/SubCabinetSolution/Views/SpdQueryPage.xaml
+++ b/SubCabinetSolution/Views/SpdQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/TotalQueryPage.xaml b/SubCabinetSolution/Views/TotalQueryPage.xaml
index 8f09522..31536e5 100644
--- a/SubCabinetSolution/Views/TotalQueryPage.xaml
+++ b/SubCabinetSolution/Views/TotalQueryPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="TotalQueryPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding TotalQueryPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
index fe248b7..f1c7af9 100644
--- a/SubCabinetSolution/Views/MonitorQueryPage.xaml
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
index db7b499..b94faac 100644
--- a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
index 9d51467..fb942ba 100644
--- a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutGoodsPage.xaml b/SubCabinetSolution/Views/PutGoodsPage.xaml
index 7b19cd7..051dcae 100644
--- a/SubCabinetSolution/Views/PutGoodsPage.xaml
+++ b/SubCabinetSolution/Views/PutGoodsPage.xaml
@@ -3,18 +3,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="PutGoodsPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding PutGoodsPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
+
@@ -60,14 +58,15 @@
BorderBrush="#F1F1F1"
BorderThickness="0,0,0,1">
-
+ BorderThickness="0"
+ IsEnabled="False"
+ Opacity="1">
-
+
-
+ ShowClearButton="True" />
@@ -152,16 +150,15 @@
-
+ BorderThickness="0"
+ Command="{Binding AddUserCommand}">
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/SpdQueryPage.xaml b/SubCabinetSolution/Views/SpdQueryPage.xaml
index e3e1345..0392d92 100644
--- a/SubCabinetSolution/Views/SpdQueryPage.xaml
+++ b/SubCabinetSolution/Views/SpdQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/TotalQueryPage.xaml b/SubCabinetSolution/Views/TotalQueryPage.xaml
index 8f09522..31536e5 100644
--- a/SubCabinetSolution/Views/TotalQueryPage.xaml
+++ b/SubCabinetSolution/Views/TotalQueryPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="TotalQueryPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding TotalQueryPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml b/SubCabinetSolution/MainWindow.xaml
deleted file mode 100644
index 7605bc8..0000000
--- a/SubCabinetSolution/MainWindow.xaml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SubCabinetSolution/MainWindow.xaml.cs b/SubCabinetSolution/MainWindow.xaml.cs
deleted file mode 100644
index 4f14fbe..0000000
--- a/SubCabinetSolution/MainWindow.xaml.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaSoft.MvvmLight.Messaging;
-
-namespace SubCabinetSolution
-{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
- public partial class MainWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- Messenger.Default.Register(this, "2022093001", s => { Close(); });
- }
- }
-}
\ No newline at end of file
diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj
index 7e12d8f..ee396f2 100644
--- a/SubCabinetSolution/SubCabinetSolution.csproj
+++ b/SubCabinetSolution/SubCabinetSolution.csproj
@@ -78,6 +78,9 @@
..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll
+
+ ..\packages\HandyControl.3.3.0\lib\net48\HandyControl.dll
+
..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll
@@ -257,6 +260,10 @@
InventoryQueryPage.xaml
+
+ MainWindow.xaml
+ Code
+
MonitorQueryPage.xaml
@@ -275,6 +282,9 @@
RefundSpdPage.xaml
+
+ RegisterFaceWindow.xaml
+
ReturnGoodsPage.xaml
@@ -287,18 +297,10 @@
TotalQueryPage.xaml
-
- MSBuild:Compile
- Designer
-
App.xaml
Code
-
- MainWindow.xaml
- Code
-
@@ -313,12 +315,17 @@
+
+ MSBuild:Compile
+ Designer
+
+
diff --git a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
index a0470b8..d8c3043 100644
--- a/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/AddUserDialogViewModel.cs
@@ -1,91 +1,12 @@
-using System.Windows;
-using System.Windows.Media;
-using GalaSoft.MvvmLight;
-using GalaSoft.MvvmLight.Command;
-using SubCabinetSolution.Views;
+using GalaSoft.MvvmLight;
namespace SubCabinetSolution.ViewModel
{
public class AddUserDialogViewModel : ViewModelBase
{
- public RelayCommand CloseWindowCommand { get; set; }
- public RelayCommand AccountTextChangedCommand { get; set; }
- public RelayCommand InputPasswordChangedCommand { get; set; }
- public RelayCommand ConfirmPasswordChangedCommand { get; set; }
- public RelayCommand NameTextChangedCommand { get; set; }
-
public AddUserDialogViewModel()
{
- this.CloseWindowCommand = new RelayCommand(CloseWindow);
- this.AccountTextChangedCommand = new RelayCommand(AccountTextChanged);
- this.InputPasswordChangedCommand = new RelayCommand(InputPasswordTextChanged);
- this.ConfirmPasswordChangedCommand = new RelayCommand(ConfirmPasswordTextChanged);
- this.NameTextChangedCommand = new RelayCommand(NameTextChanged);
- }
-
- private void CloseWindow(Window window)
- {
- window.Close();
- }
-
- private void AccountTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.AccountTextBox.Text.Length > 0)
- {
- dialog.AccountTextBox.Background = Brushes.White;
- dialog.AccountHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.AccountTextBox.Background = Brushes.Transparent;
- dialog.AccountHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void InputPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.InputPasswordTextBox.Password.Length > 0)
- {
- dialog.InputPasswordTextBox.Background = Brushes.White;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.InputPasswordTextBox.Background = Brushes.Transparent;
- dialog.InputPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void ConfirmPasswordTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.ConfirmPasswordTextBox.Password.Length > 0)
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.White;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.ConfirmPasswordTextBox.Background = Brushes.Transparent;
- dialog.ConfirmPasswordHintTextBlock.Visibility = Visibility.Visible;
- }
- }
-
- private void NameTextChanged(Window window)
- {
- var dialog = (AddUserDialog)window;
- if (dialog.NameTextBox.Text.Length > 0)
- {
- dialog.NameTextBox.Background = Brushes.White;
- dialog.NameHintTextBlock.Visibility = Visibility.Hidden;
- }
- else
- {
- dialog.NameTextBox.Background = Brushes.Transparent;
- dialog.NameHintTextBlock.Visibility = Visibility.Visible;
- }
+
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
index d6b4d96..0c365c7 100644
--- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs
+++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs
@@ -134,13 +134,7 @@
private void ItemSelectionChanged(object sender)
{
- var listBox = (ListBox)sender;
- if (listBox.SelectedIndex == -1)
- {
- return;
- }
-
- var functionModel = (FunctionModel)listBox.SelectedItem;
+ var functionModel = (FunctionModel)sender;
MainTopImage = functionModel.Image;
MainTopTitle = functionModel.Title;
@@ -181,8 +175,6 @@
navigationService.NavigateTo("CabinetMainPage");
break;
}
-
- listBox.SelectedIndex = -1;
}
private void SettingsSelectionChanged(object sender)
diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
index 012c32a..05d6af8 100644
--- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs
@@ -4,6 +4,7 @@
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using SubCabinetSolution.Model;
+using SubCabinetSolution.Views;
namespace SubCabinetSolution.ViewModel
{
@@ -39,9 +40,35 @@
private void ItemSelectionChanged(object sender)
{
var listBox = (ListBox)sender;
- var functionModel = (AdminFuncModel)listBox.SelectedItem;
+ switch (listBox.SelectedIndex)
+ {
+ case 0: //角色转换
- MessageBox.Show(functionModel.Title);
+ break;
+ case 1: //人脸登记
+ new RegisterFaceWindow().ShowDialog();
+ break;
+ case 2: //登记卡号
+
+ break;
+ case 3: //重置密码
+
+ break;
+ case 4: //删除用户
+
+ break;
+ case 5: //锁定用户
+
+ break;
+ case 6: //解除锁定
+
+ break;
+ case 7: //解除人脸
+
+ break;
+ }
+
+ listBox.SelectedIndex = -1;
}
}
}
\ No newline at end of file
diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
index fdf6b75..e5a7f83 100644
--- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/ViewModel/MainViewModel.cs b/SubCabinetSolution/ViewModel/MainViewModel.cs
index ddfd76c..fbcd7af 100644
--- a/SubCabinetSolution/ViewModel/MainViewModel.cs
+++ b/SubCabinetSolution/ViewModel/MainViewModel.cs
@@ -33,11 +33,6 @@
*/
private string _userName;
- /*
- * PasswordBox双向绑定
- */
- private string _userPassword;
-
public string UserName
{
get => _userName;
@@ -48,6 +43,11 @@
}
}
+ /*
+ * PasswordBox双向绑定
+ */
+ private string _userPassword;
+
public string UserPassword
{
get => _userPassword;
diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
index 883abdc..03f306b 100644
--- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
+++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs
@@ -23,7 +23,6 @@
new GoodsModel("疝环充填补片", "[19]"),
new GoodsModel("微创扩展引流套", "[29]"),
new GoodsModel("创口贴", "[69]"),
- new GoodsModel("一次性医用口罩", "[2]")
};
this.SecondDoorGoods = new ObservableCollection
{
diff --git a/SubCabinetSolution/Views/AddUserDialog.xaml b/SubCabinetSolution/Views/AddUserDialog.xaml
index 12e7867..0fed460 100644
--- a/SubCabinetSolution/Views/AddUserDialog.xaml
+++ b/SubCabinetSolution/Views/AddUserDialog.xaml
@@ -3,48 +3,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="新增用户"
Width="400"
- Height="415"
- AllowsTransparency="True"
- Background="Transparent"
- ShowInTaskbar="False"
+ Height="405"
+ DataContext="{Binding AddUserDialog, Source={StaticResource Locator}}"
+ ResizeMode="NoResize"
Topmost="True"
WindowStartupLocation="CenterScreen"
- WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+ FontFamily="/SubCabinetSolution;component/IconFont/#iconfont"
+ FontSize="24"
+ Foreground="{StaticResource MainThemeColor}"
+ Text="" />
-
+ FontSize="16"
+ ShowClearButton="True" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Style="{DynamicResource PasswordBoxExtend}" />
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
-
+
+
+
-
-
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml
index dce1f75..a148f7f 100644
--- a/SubCabinetSolution/Views/AdoptionPage.xaml
+++ b/SubCabinetSolution/Views/AdoptionPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="AdoptionPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding AdoptionPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
@@ -42,21 +34,19 @@
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -87,23 +77,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -134,23 +122,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -181,23 +167,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -228,23 +212,21 @@
-
+
-
-
-
-
+ Effect="{StaticResource EffectShadow3}">
-
+
@@ -275,6 +257,6 @@
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/CabinetWindow.xaml b/SubCabinetSolution/Views/CabinetWindow.xaml
index e2ae234..513e1e7 100644
--- a/SubCabinetSolution/Views/CabinetWindow.xaml
+++ b/SubCabinetSolution/Views/CabinetWindow.xaml
@@ -3,6 +3,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:interactivity="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
@@ -10,15 +11,12 @@
Width="1366"
Height="768"
Background="White"
+ DataContext="{Binding CabinetWindow, Source={StaticResource Locator}}"
ResizeMode="CanResize"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
mc:Ignorable="d">
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MainWindow.xaml.cs b/SubCabinetSolution/Views/MainWindow.xaml.cs
new file mode 100644
index 0000000..4f14fbe
--- /dev/null
+++ b/SubCabinetSolution/Views/MainWindow.xaml.cs
@@ -0,0 +1,16 @@
+using GalaSoft.MvvmLight.Messaging;
+
+namespace SubCabinetSolution
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ Messenger.Default.Register(this, "2022093001", s => { Close(); });
+ }
+ }
+}
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/MonitorQueryPage.xaml b/SubCabinetSolution/Views/MonitorQueryPage.xaml
index fe248b7..f1c7af9 100644
--- a/SubCabinetSolution/Views/MonitorQueryPage.xaml
+++ b/SubCabinetSolution/Views/MonitorQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
index db7b499..b94faac 100644
--- a/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
+++ b/SubCabinetSolution/Views/NotReturnedQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
index 9d51467..fb942ba 100644
--- a/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
+++ b/SubCabinetSolution/Views/PutCabinetQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/PutGoodsPage.xaml b/SubCabinetSolution/Views/PutGoodsPage.xaml
index 7b19cd7..051dcae 100644
--- a/SubCabinetSolution/Views/PutGoodsPage.xaml
+++ b/SubCabinetSolution/Views/PutGoodsPage.xaml
@@ -3,18 +3,15 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="PutGoodsPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding PutGoodsPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-
-
-
-
-
-
+
@@ -60,14 +58,15 @@
BorderBrush="#F1F1F1"
BorderThickness="0,0,0,1">
-
+ BorderThickness="0"
+ IsEnabled="False"
+ Opacity="1">
-
+
-
+ ShowClearButton="True" />
@@ -152,16 +150,15 @@
-
+ BorderThickness="0"
+ Command="{Binding AddUserCommand}">
-
+
\ No newline at end of file
diff --git a/SubCabinetSolution/Views/SpdQueryPage.xaml b/SubCabinetSolution/Views/SpdQueryPage.xaml
index e3e1345..0392d92 100644
--- a/SubCabinetSolution/Views/SpdQueryPage.xaml
+++ b/SubCabinetSolution/Views/SpdQueryPage.xaml
@@ -1,12 +1,13 @@
-
-
-
-
+
+
diff --git a/SubCabinetSolution/Views/TotalQueryPage.xaml b/SubCabinetSolution/Views/TotalQueryPage.xaml
index 8f09522..31536e5 100644
--- a/SubCabinetSolution/Views/TotalQueryPage.xaml
+++ b/SubCabinetSolution/Views/TotalQueryPage.xaml
@@ -4,17 +4,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:widgets="clr-namespace:CSharpToolkit.Widgets;assembly=CSharpToolkit"
Title="TotalQueryPage"
d:DesignHeight="450"
d:DesignWidth="800"
Background="White"
+ DataContext="{Binding TotalQueryPage, Source={StaticResource Locator}}"
mc:Ignorable="d">
-
-
-
-