From b343d0141109614427dd8f2c969be58b2664af11 Mon Sep 17 00:00:00 2001 From: xxe Date: Mon, 12 Sep 2022 09:50:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E5=80=BC=E7=AB=AF=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HKCardIN/Helper/DataBus.cs | 6 ++++ HKCardIN/ViewModels/RootViewModel.cs | 15 ++-------- HKCardIN/Views/RootView.xaml | 44 +++++++++++++--------------- HKCardIN/Views/RootView.xaml.cs | 2 +- 4 files changed, 30 insertions(+), 37 deletions(-) diff --git a/HKCardIN/Helper/DataBus.cs b/HKCardIN/Helper/DataBus.cs index b8de17e..10a69fa 100644 --- a/HKCardIN/Helper/DataBus.cs +++ b/HKCardIN/Helper/DataBus.cs @@ -18,7 +18,13 @@ namespace HKCardIN.Helper } public class ApiRoute { + /// + /// 拉取用户和卡信息 + /// public static string PullUserAndCardInfo = DataBus.SaasRoute + ""; + /// + /// 推送充值到服务器 + /// public static string PushMoneyToServer = DataBus.SaasRoute + ""; } } diff --git a/HKCardIN/ViewModels/RootViewModel.cs b/HKCardIN/ViewModels/RootViewModel.cs index 2991e41..01a6ab2 100644 --- a/HKCardIN/ViewModels/RootViewModel.cs +++ b/HKCardIN/ViewModels/RootViewModel.cs @@ -36,12 +36,6 @@ namespace HKCardIN.ViewModels get => _CodeVisible; set => SetAndNotify(ref _CodeVisible, value); } - string _LockCode; - public string LockCode - { - get => _LockCode; - set => SetAndNotify(ref _LockCode, value); - } string _InputMoney; public string InputMoney { @@ -67,20 +61,15 @@ namespace HKCardIN.ViewModels ContentVisible = Visibility.Collapsed; CodeVisible = Visibility.Visible; } - public void UnLockAction() + public void UnLockAction(HandyControl.Controls.PasswordBox input) { - if (LockCode.Equals(DataBus.LockCode)) + if (input.Password.Equals(DataBus.LockCode)) { IsLocker = false; CodeVisible = Visibility.Collapsed; ContentVisible = Visibility.Visible; - LockCode = string.Empty; } } - public void ResetAction() - { - LockCode = string.Empty; - } public void SaveAction() { if (!DataBus.NetWordState) diff --git a/HKCardIN/Views/RootView.xaml b/HKCardIN/Views/RootView.xaml index 983b8f0..6263d80 100644 --- a/HKCardIN/Views/RootView.xaml +++ b/HKCardIN/Views/RootView.xaml @@ -1,4 +1,4 @@ - - + mc:Ignorable="d" ResizeMode="CanMinimize"> + - - + + - - + + + - + - + hc:PasswordBoxAttach.PasswordLength="20" + ShowClearButton="True" + Style="{StaticResource PasswordBoxPlusBaseStyle}" />