You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
5.9 KiB

<Page x:Class="BBWYB.Client.Views.Setting.ShopSetting"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BBWYB.Client.Views.Setting"
mc:Ignorable="d"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:c="clr-namespace:SJ.Controls;assembly=SJ.Controls"
xmlns:cmodel="clr-namespace:BBWYB.Client.Models"
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
d:DesignHeight="450" d:DesignWidth="800"
Title="ShopSetting"
DataContext="{Binding ShopSetting,Source={StaticResource Locator}}">
<Page.Resources>
<ObjectDataProvider x:Key="PlatformProvider" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="cmodel:Platform"/>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<Style x:Key="textblockPropertyStyle" TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="0,0,5,0"/>
</Style>
<Style x:Key="textboxValueStyle" TargetType="{x:Type c:BTextBox}">
<Setter Property="Width" Value="150"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Height" Value="30"/>
<Setter Property="Background" Value="White"/>
<Setter Property="BorderBrush" Value="{StaticResource TextBox.BorderBrush}"/>
</Style>
</Page.Resources>
<b:Interaction.Triggers>
<b:EventTrigger EventName="Loaded">
<b:InvokeCommandAction Command="{Binding LoadCommand}"/>
</b:EventTrigger>
</b:Interaction.Triggers>
<Grid>
<c:RoundWaitProgress Play="{Binding IsLoading}" Panel.ZIndex="999" Visibility="{Binding IsLoading,Converter={StaticResource objConverter},ConverterParameter=true:Visible:Collapsed}"/>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
<StackPanel Margin="20,0" Visibility="{Binding PanelIndex,Converter={StaticResource objConverter},ConverterParameter=0:Visible:Collapsed}">
<Grid Margin="0,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="采购平台" Style="{StaticResource textblockPropertyStyle}"/>
<ComboBox ItemsSource="{Binding Source={StaticResource PlatformProvider}}" Grid.Column="1"
SelectedItem="{Binding PurchasePlatform,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
DisplayMemberPath="."
Height="25"
Width="150"
HorizontalAlignment="Left"
VerticalContentAlignment="Center"/>
</Grid>
<Grid Margin="0,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="账号名称" Style="{StaticResource textblockPropertyStyle}" Grid.Row="1"/>
<c:BTextBox Grid.Column="1" Style="{StaticResource textboxValueStyle}" Grid.Row="1"
Text="{Binding PurchaseAccount.AccountName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
<Grid Margin="0,10,0,0"
Visibility="{Binding PurchasePlatform}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="AppKey" Style="{StaticResource textblockPropertyStyle}" Grid.Row="2"/>
<c:BTextBox Grid.Column="1" Grid.Row="2"
Text="{Binding PurchaseAccount.AppKey,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
<Grid Margin="0,10,0,0" Visibility="{Binding PurchasePlatform}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="AppSecret" Style="{StaticResource textblockPropertyStyle}" Grid.Row="3"/>
<c:BTextBox Grid.Column="1" Grid.Row="3"
Text="{Binding PurchaseAccount.AppSecret,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
<Grid Margin="0,10,0,0" Visibility="{Binding PurchasePlatform}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Text="AppToken" Style="{StaticResource textblockPropertyStyle}" Grid.Row="4"/>
<c:BTextBox Grid.Column="1" Grid.Row="4"
Text="{Binding PurchaseAccount.AppToken,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</StackPanel>
<c:BButton Content="保存" Grid.Row="1" Width="80" HorizontalAlignment="Left"
Command="{Binding SaveCommand}" Margin="20,0,0,0"/>
</Grid>
</Grid>
</Page>