Selaa lähdekoodia

充值端界面调整

Lishi
xxe 2 vuotta sitten
vanhempi
commit
b343d01411
4 muutettua tiedostoa jossa 30 lisäystä ja 37 poistoa
  1. +6
    -0
      HKCardIN/Helper/DataBus.cs
  2. +2
    -13
      HKCardIN/ViewModels/RootViewModel.cs
  3. +21
    -23
      HKCardIN/Views/RootView.xaml
  4. +1
    -1
      HKCardIN/Views/RootView.xaml.cs

+ 6
- 0
HKCardIN/Helper/DataBus.cs Näytä tiedosto

@@ -18,7 +18,13 @@ namespace HKCardIN.Helper
}
public class ApiRoute
{
/// <summary>
/// 拉取用户和卡信息
/// </summary>
public static string PullUserAndCardInfo = DataBus.SaasRoute + "";
/// <summary>
/// 推送充值到服务器
/// </summary>
public static string PushMoneyToServer = DataBus.SaasRoute + "";
}
}

+ 2
- 13
HKCardIN/ViewModels/RootViewModel.cs Näytä tiedosto

@@ -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)


+ 21
- 23
HKCardIN/Views/RootView.xaml Näytä tiedosto

@@ -1,4 +1,4 @@
<hc:Window
<Window
x:Class="HKCardIN.Views.RootView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -13,11 +13,9 @@
Width="800"
Height="420"
d:DataContext="{d:DesignInstance Type=viewModels:RootViewModel}"
ShowMaxButton="False"
ShowTitle="True"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<hc:Window.Resources>
mc:Ignorable="d" ResizeMode="CanMinimize">
<Window.Resources>
<Style
x:Key="充值"
BasedOn="{StaticResource ButtonDefault}"
@@ -44,11 +42,15 @@
TargetType="TextBlock">
<Setter Property="Foreground" Value="WhiteSmoke" />
</Style>
</hc:Window.Resources>
<hc:Window.Background>
</Window.Resources>
<Window.Background>
<ImageBrush ImageSource="/HKResouces/背景.jpg" />
</hc:Window.Background>
<hc:Window.InputBindings>
</Window.Background>
<Window.InputBindings>
<KeyBinding
Key="E"
Command="{s:Action UnLockAction}"
CommandParameter="{Binding ., ElementName=Pwd}" />
<KeyBinding
Key="F1"
Command="{s:Action InputAction}"
@@ -66,31 +68,27 @@
Command="{s:Action InputAction}"
CommandParameter="500" />
<KeyBinding Key="F5" Command="{s:Action LockSreenAction}" />
</hc:Window.InputBindings>
</Window.InputBindings>
<Grid>
<StackPanel
HorizontalAlignment="Center"
VerticalAlignment="Center"
Visibility="{Binding CodeVisible}">
<TextBox
<hc:PasswordBox
x:Name="Pwd"
Width="200"
hc:InfoElement.Placeholder="请输入解锁码"
Style="{StaticResource TextBoxExtend}"
Text="{Binding LockCode}" />
hc:PasswordBoxAttach.PasswordLength="20"
ShowClearButton="True"
Style="{StaticResource PasswordBoxPlusBaseStyle}" />
<WrapPanel Margin="0,10,0,0" HorizontalAlignment="Center">
<Button
Width="60"
Width="70"
Height="40"
Margin="0,0,10,0"
Command="{s:Action UnLockAction}"
Content="确定"
FontSize="15" />
<Button
Width="60"
Height="40"
Margin="10,0,0,0"
Command="{s:Action ResetAction}"
Content="取消"
CommandParameter="{Binding ., ElementName=Pwd}"
Content="确定[E]"
FontSize="15" />
</WrapPanel>
</StackPanel>
@@ -307,4 +305,4 @@
</StackPanel>
</Grid>
</Grid>
</hc:Window>
</Window>

+ 1
- 1
HKCardIN/Views/RootView.xaml.cs Näytä tiedosto

@@ -4,7 +4,7 @@ using System.Windows.Media;

namespace HKCardIN.Views
{
public partial class RootView : HandyControl.Controls.Window
public partial class RootView : Window
{
public RootView()
{


Ladataan…
Peruuta
Tallenna