mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-26 12:09:32 +08:00
绑定账号
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ using System.Globalization;
|
||||
|
||||
namespace System.Application.Converters
|
||||
{
|
||||
public class IconIsVisibleValueConverter : IValueConverter
|
||||
public class StringEqualsConverter : IValueConverter
|
||||
{
|
||||
static string ToString(object? obj) => obj?.ToString() ?? string.Empty;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace System.Application.Converters
|
||||
{
|
||||
public class StringFormatConverter : IValueConverter, IMultiValueConverter
|
||||
{
|
||||
public object? Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is not string str) str = value?.ToString() ?? string.Empty;
|
||||
if (parameter is not string para) para = parameter?.ToString() ?? string.Empty;
|
||||
@@ -18,7 +18,7 @@ namespace System.Application.Converters
|
||||
return str;
|
||||
}
|
||||
|
||||
public object? Convert(IList<object> values, Type targetType, object parameter, CultureInfo culture)
|
||||
public object? Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
var stringValues = values.Select(x => (x is not string str) ? x?.ToString() ?? string.Empty : str);
|
||||
var format = stringValues.FirstOrDefault() ?? string.Empty;
|
||||
@@ -26,7 +26,7 @@ namespace System.Application.Converters
|
||||
return format.Format(args);
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
<TextBox
|
||||
x:Name="TbPhoneNumber"
|
||||
Text="{Binding PhoneNumber}"
|
||||
Watermark="{ReflectionBinding Path=Res.User_NewPhone,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Watermark="{ReflectionBinding Path=Res.User_Phone,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
MaxLength="{ReflectionBinding Path=PhoneNumber,Mode=OneTime,Source={x:Static ccl_services:InputLengthConstants.Current}}" />
|
||||
|
||||
<Panel>
|
||||
|
||||
+4
-4
@@ -27,7 +27,7 @@
|
||||
x:CompileBindings="True"
|
||||
Title="{Binding Title}">
|
||||
<Window.Resources>
|
||||
<converters:IconIsVisibleValueConverter x:Key="IconIsVisibleValueConverter" />
|
||||
<converters:StringEqualsConverter x:Key="StringEqualsConverter" />
|
||||
</Window.Resources>
|
||||
<Panel>
|
||||
<controls:TitleBar />
|
||||
@@ -149,11 +149,11 @@
|
||||
<DockPanel>
|
||||
<Panel DockPanel.Dock="Left">
|
||||
<PathIcon Data="{StaticResource QQ}"
|
||||
IsVisible="{Binding,Mode=OneWay,Converter={StaticResource IconIsVisibleValueConverter},ConverterParameter=QQ}" />
|
||||
IsVisible="{Binding,Mode=OneWay,Converter={StaticResource StringEqualsConverter},ConverterParameter=QQ}" />
|
||||
<PathIcon Data="{StaticResource Microsoft}"
|
||||
IsVisible="{Binding,Mode=OneWay,Converter={StaticResource IconIsVisibleValueConverter},ConverterParameter=Microsoft}" />
|
||||
IsVisible="{Binding,Mode=OneWay,Converter={StaticResource StringEqualsConverter},ConverterParameter=Microsoft}" />
|
||||
<PathIcon Data="{StaticResource Apple}"
|
||||
IsVisible="{Binding,Mode=OneWay,Converter={StaticResource IconIsVisibleValueConverter},ConverterParameter=Apple}" />
|
||||
IsVisible="{Binding,Mode=OneWay,Converter={StaticResource StringEqualsConverter},ConverterParameter=Apple}" />
|
||||
</Panel>
|
||||
<Panel DockPanel.Dock="Right" Margin="10 0 0 0">
|
||||
<TextBlock VerticalAlignment="Center" Tag="{Binding,Mode=OneWay}">
|
||||
|
||||
+229
-138
@@ -4,10 +4,9 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:sys="using:System"
|
||||
mc:Ignorable="d"
|
||||
d:DesignWidth="450" d:DesignHeight="700"
|
||||
Width="450" Height="700"
|
||||
MinWidth="450" MinHeight="700"
|
||||
MaxWidth="450" MaxHeight="700"
|
||||
d:DesignWidth="450" d:DesignHeight="600"
|
||||
Width="450" Height="600"
|
||||
MinWidth="450" MinHeight="600"
|
||||
x:Class="System.Application.UI.Views.Windows.UserProfileWindow"
|
||||
xmlns:controls="clr-namespace:System.Application.UI.Views.Controls"
|
||||
xmlns:resx="clr-namespace:System.Application.UI.Resx;assembly=System.Application.SteamTools.Client.Desktop"
|
||||
@@ -31,6 +30,13 @@
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Margin" Value="0,0,12,0"/>
|
||||
</Style>
|
||||
<Style Selector="PathIcon.FormItemLabel">
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
<Setter Property="Margin" Value="0,0,12,0"/>
|
||||
<Setter Property="Height" Value="22" />
|
||||
<Setter Property="Width" Value="22" />
|
||||
</Style>
|
||||
<Style Selector="ComboBox.MarginLeft,RadioButton.MarginLeft">
|
||||
<Setter Property="Margin" Value="12,0,0,0"/>
|
||||
</Style>
|
||||
@@ -58,84 +64,88 @@
|
||||
</Style>
|
||||
</Panel.Styles>
|
||||
<controls:TitleBar/>
|
||||
<Panel Margin="{StaticResource ContentMargin}">
|
||||
<Panel>
|
||||
<controls:ProgressRing IsIndeterminate="True" HorizontalAlignment="Stretch" Height="100" Width="100" IsVisible="{Binding IsLoading}"/>
|
||||
<StackPanel VerticalAlignment="Center" IsVisible="{Binding !IsLoading}">
|
||||
<DockPanel>
|
||||
<Image Source="{ReflectionBinding Path=AvaterPath, Source={x:Static service:UserService.Current},Mode=OneWay,Converter={StaticResource BitmapAssetValueConverter},ConverterParameter=184}" Width="184" Height="184"/>
|
||||
<StackPanel Orientation="Vertical" Margin="16,0,0,0">
|
||||
<Button Content="{ReflectionBinding Path=Res.RefreshSteamAvatar,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Opacity="0"
|
||||
IsEnabled="False"
|
||||
Classes="SecondaryMin MariginButton WidthUnify"/>
|
||||
<TextBlock TextWrapping="Wrap"
|
||||
Margin="0,0,0,32"
|
||||
Opacity="0"
|
||||
FontSize="12"
|
||||
Text="{ReflectionBinding Path=Res.RefreshSteamAvatarDesc,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
<Button Classes="SecondaryMin MariginButton"
|
||||
IsEnabled="False"
|
||||
Content="{ReflectionBinding Path=Res.UploadYourAvatar,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
<TextBlock FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
Text="{ReflectionBinding Path=Res.UploadYourAvatarDesc,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="16"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="16"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="16"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="16"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="16"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="8"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="6"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="16"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="12"/>
|
||||
<ColumnDefinition Width="70"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Classes="FormItemLabel"
|
||||
Text="{ReflectionBinding Path=Res.NickName,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="1"/>
|
||||
<TextBox Watermark="{ReflectionBinding Path=Res.PleaseEnterNickName,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Text="{Binding NickName}"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="3"
|
||||
MaxLength="{ReflectionBinding Path=NickName,Mode=OneTime,Source={x:Static ccl_services:InputLengthConstants.Current}}"/>
|
||||
<TextBlock Classes="FormItemLabel"
|
||||
Text="{ReflectionBinding Path=Res.User_Phone,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="3"/>
|
||||
<TextBox IsReadOnly="True"
|
||||
Focusable="False"
|
||||
Watermark="{Binding CurrentPhoneNumber,Mode=OneWay}"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
MaxLength="{ReflectionBinding Path=PhoneNumber,Mode=OneTime,Source={x:Static ccl_services:InputLengthConstants.Current}}"/>
|
||||
<Button Classes="Secondary"
|
||||
Content="{ReflectionBinding Path=Res.Modify,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding OnBtnChangeBindPhoneNumberClick}"
|
||||
IsVisible="{ReflectionBinding Path=HasPhoneNumber,Source={x:Static service:UserService.Current}}}"
|
||||
Grid.Row="3"
|
||||
Grid.Column="3"/>
|
||||
<Button Classes="Secondary"
|
||||
Content="{ReflectionBinding Path=Res.Bind,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding OnBtnBindPhoneNumberClick}"
|
||||
IsVisible="{ReflectionBinding Path=!HasPhoneNumber,Source={x:Static service:UserService.Current}}}"
|
||||
Grid.Row="3"
|
||||
Grid.Column="3"/>
|
||||
<TextBlock Classes="FormItemLabel"
|
||||
<TabControl Margin="0 14 0 0" Padding="0" IsVisible="{Binding !IsLoading}">
|
||||
<TabControl.Styles>
|
||||
<Style Selector="TabItem">
|
||||
<Setter Property="FontSize" Value="16"></Setter>
|
||||
</Style>
|
||||
</TabControl.Styles>
|
||||
<TabItem Header="{ReflectionBinding Path=Res.User_BasicInfo,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<Panel Margin="{StaticResource ContentMargin}">
|
||||
<StackPanel Margin="0 -38 0 0" VerticalAlignment="Center">
|
||||
<DockPanel>
|
||||
<Image Source="{ReflectionBinding Path=AvaterPath, Source={x:Static service:UserService.Current},Mode=OneWay,Converter={StaticResource BitmapAssetValueConverter},ConverterParameter=184}" Width="184" Height="184"/>
|
||||
<StackPanel Orientation="Vertical" Margin="16,0,0,0">
|
||||
<Button Content="{ReflectionBinding Path=Res.RefreshSteamAvatar,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Opacity="0"
|
||||
IsEnabled="False"
|
||||
Classes="SecondaryMin MariginButton WidthUnify"/>
|
||||
<TextBlock TextWrapping="Wrap"
|
||||
Margin="0,0,0,32"
|
||||
Opacity="0"
|
||||
FontSize="12"
|
||||
Text="{ReflectionBinding Path=Res.RefreshSteamAvatarDesc,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
<Button Classes="SecondaryMin MariginButton"
|
||||
IsEnabled="False"
|
||||
Content="{ReflectionBinding Path=Res.UploadYourAvatar,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
<TextBlock FontSize="12"
|
||||
TextWrapping="Wrap"
|
||||
Text="{ReflectionBinding Path=Res.UploadYourAvatarDesc,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="16"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="16"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="16"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="8"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="6"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="16"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="12"/>
|
||||
<ColumnDefinition Width="70"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Classes="FormItemLabel"
|
||||
Text="{ReflectionBinding Path=Res.NickName,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="1"/>
|
||||
<TextBox Watermark="{ReflectionBinding Path=Res.PleaseEnterNickName,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Text="{Binding NickName}"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="3"
|
||||
MaxLength="{ReflectionBinding Path=NickName,Mode=OneTime,Source={x:Static ccl_services:InputLengthConstants.Current}}"/>
|
||||
<TextBlock Classes="FormItemLabel"
|
||||
Text="{ReflectionBinding Path=Res.User_Phone,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="3"/>
|
||||
<TextBox IsReadOnly="True"
|
||||
Focusable="False"
|
||||
Watermark="{Binding CurrentPhoneNumber,Mode=OneWay}"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
MaxLength="{ReflectionBinding Path=PhoneNumber,Mode=OneTime,Source={x:Static ccl_services:InputLengthConstants.Current}}"/>
|
||||
<Button Classes="Secondary"
|
||||
Content="{ReflectionBinding Path=Res.Modify,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding OnBtnChangeBindPhoneNumberClick}"
|
||||
IsVisible="{ReflectionBinding Path=HasPhoneNumber,Source={x:Static service:UserService.Current}}}"
|
||||
Grid.Row="3"
|
||||
Grid.Column="3"/>
|
||||
<Button Classes="Secondary"
|
||||
Content="{ReflectionBinding Path=Res.Bind,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding OnBtnBindPhoneNumberClick}"
|
||||
IsVisible="{ReflectionBinding Path=!HasPhoneNumber,Source={x:Static service:UserService.Current}}}"
|
||||
Grid.Row="3"
|
||||
Grid.Column="3"/>
|
||||
<!--<TextBlock Classes="FormItemLabel"
|
||||
Text="{ReflectionBinding Path=Res.Email,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="5"/>
|
||||
<TextBox IsReadOnly="True"
|
||||
@@ -148,65 +158,146 @@
|
||||
Content="{ReflectionBinding Path=Res.Bind,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="5"
|
||||
Grid.Column="3"
|
||||
IsEnabled="False"/>
|
||||
<TextBlock
|
||||
IsEnabled="False"/>-->
|
||||
<TextBlock
|
||||
Classes="FormItemLabel"
|
||||
Text="{ReflectionBinding Path=Res.UserProfile_Location,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="5"/>
|
||||
<WrapPanel Orientation="Horizontal" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="3">
|
||||
<ComboBox Classes="Area AreaShort"
|
||||
Items="{Binding AreaItems2}"
|
||||
SelectedItem="{Binding AreaSelectItem2}"/>
|
||||
<ComboBox Classes="MarginLeft Area AreaShort"
|
||||
IsVisible="{Binding !AreaNotVisible3}"
|
||||
Items="{Binding AreaItems3}"
|
||||
SelectedItem="{Binding AreaSelectItem3}"/>
|
||||
<ComboBox Classes="MarginLeft Area AreaLong"
|
||||
IsVisible="{Binding !AreaNotVisible4}"
|
||||
Items="{Binding AreaItems4}"
|
||||
SelectedItem="{Binding AreaSelectItem4}"/>
|
||||
</WrapPanel>
|
||||
<TextBlock Classes="FormItemLabel"
|
||||
Text="{ReflectionBinding Path=Res.Gender,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="7"/>
|
||||
<WrapPanel Orientation="Horizontal" Grid.Row="7" Grid.Column="1" Grid.ColumnSpan="3">
|
||||
<RadioButton Content="{ReflectionBinding Path=Res.Gender_Unknown,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
IsChecked="{Binding Gender, Converter={StaticResource GenderEnumValueConverter}, ConverterParameter=Unknown}"/>
|
||||
<RadioButton Classes="MarginLeft"
|
||||
Content="{ReflectionBinding Path=Res.Gender_Male,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
IsChecked="{Binding Gender, Converter={StaticResource GenderEnumValueConverter}, ConverterParameter=Male}"/>
|
||||
<RadioButton Classes="MarginLeft"
|
||||
Content="{ReflectionBinding Path=Res.Gender_Female,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
IsChecked="{Binding Gender, Converter={StaticResource GenderEnumValueConverter}, ConverterParameter=Female}"/>
|
||||
</WrapPanel>
|
||||
<TextBlock Classes="FormItemLabel"
|
||||
Text="{ReflectionBinding Path=Res.UserProfile_BirthDate,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="9"/>
|
||||
<DatePicker Height="36"
|
||||
SelectedDate="{Binding BirthDate, Mode=TwoWay}"
|
||||
Grid.Row="9" Grid.Column="1" Grid.ColumnSpan="3"/>
|
||||
|
||||
</Grid>
|
||||
<Button Classes="action WidthUnify"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0 0 0 16"
|
||||
Command="{ReflectionBinding Submit}"
|
||||
IsEnabled="{Binding IsModify}"
|
||||
Content="{ReflectionBinding Path=Res.SaveChanges,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
</TabItem>
|
||||
<TabItem Header="{ReflectionBinding Path=Res.User_AccountBind,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<Panel>
|
||||
<Grid Margin="{StaticResource ContentMargin}" VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="16"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="16"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="16"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="16"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="16"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="12"/>
|
||||
<ColumnDefinition Width="70"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<PathIcon Classes="FormItemLabel" Data="{StaticResource SteamDrawing}" Grid.Row="1"/>
|
||||
<!--<TextBlock
|
||||
Classes="FormItemLabel"
|
||||
Text="{ReflectionBinding Path=Res.SteamAccount,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="7"/>
|
||||
<TextBox IsReadOnly="True"
|
||||
Focusable="False"
|
||||
Watermark="{ReflectionBinding Path=Res.UnderConstruction,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Text=""
|
||||
Grid.Row="7"
|
||||
Grid.Column="1"/>
|
||||
<Button Classes="Secondary"
|
||||
Content="{ReflectionBinding Path=Res.Bind,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="7"
|
||||
Grid.Column="3"
|
||||
IsEnabled="False"/>
|
||||
<TextBlock
|
||||
Classes="FormItemLabel"
|
||||
Text="{ReflectionBinding Path=Res.UserProfile_Location,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="9"/>
|
||||
<WrapPanel Orientation="Horizontal" Grid.Row="9" Grid.Column="1" Grid.ColumnSpan="3">
|
||||
<ComboBox Classes="Area AreaShort"
|
||||
Items="{Binding AreaItems2}"
|
||||
SelectedItem="{Binding AreaSelectItem2}"/>
|
||||
<ComboBox Classes="MarginLeft Area AreaShort"
|
||||
IsVisible="{Binding !AreaNotVisible3}"
|
||||
Items="{Binding AreaItems3}"
|
||||
SelectedItem="{Binding AreaSelectItem3}"/>
|
||||
<ComboBox Classes="MarginLeft Area AreaLong"
|
||||
IsVisible="{Binding !AreaNotVisible4}"
|
||||
Items="{Binding AreaItems4}"
|
||||
SelectedItem="{Binding AreaSelectItem4}"/>
|
||||
</WrapPanel>
|
||||
<TextBlock Classes="FormItemLabel"
|
||||
Text="{ReflectionBinding Path=Res.Gender,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="11"/>
|
||||
<WrapPanel Orientation="Horizontal" Grid.Row="11" Grid.Column="1" Grid.ColumnSpan="3">
|
||||
<RadioButton Content="{ReflectionBinding Path=Res.Gender_Unknown,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
IsChecked="{Binding Gender, Converter={StaticResource GenderEnumValueConverter}, ConverterParameter=Unknown}"/>
|
||||
<RadioButton Classes="MarginLeft"
|
||||
Content="{ReflectionBinding Path=Res.Gender_Male,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
IsChecked="{Binding Gender, Converter={StaticResource GenderEnumValueConverter}, ConverterParameter=Male}"/>
|
||||
<RadioButton Classes="MarginLeft"
|
||||
Content="{ReflectionBinding Path=Res.Gender_Female,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
IsChecked="{Binding Gender, Converter={StaticResource GenderEnumValueConverter}, ConverterParameter=Female}"/>
|
||||
</WrapPanel>
|
||||
<TextBlock Classes="FormItemLabel"
|
||||
Text="{ReflectionBinding Path=Res.UserProfile_BirthDate,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="13"/>
|
||||
<DatePicker Height="36"
|
||||
SelectedDate="{Binding BirthDate, Mode=TwoWay}"
|
||||
Grid.Row="13" Grid.Column="1" Grid.ColumnSpan="3"/>
|
||||
</Grid>
|
||||
<Button Classes="action WidthUnify"
|
||||
HorizontalAlignment="Center"
|
||||
Command="{ReflectionBinding Submit}"
|
||||
IsEnabled="{Binding IsModify}"
|
||||
Content="{ReflectionBinding Path=Res.SaveChanges,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
</StackPanel>
|
||||
Grid.Row="11"/>-->
|
||||
<TextBox IsReadOnly="True"
|
||||
Focusable="False"
|
||||
Watermark="{ReflectionBinding Path=Res.Unbound,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Text="{ReflectionBinding Path=User.SteamAccountId,Mode=OneWay,Source={x:Static service:UserService.Current}}}"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"/>
|
||||
<Button Classes="Secondary"
|
||||
Content="{ReflectionBinding Path=Res.Bind,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="1"
|
||||
Grid.Column="3"
|
||||
Command="{Binding OnBindFastLoginClick}"
|
||||
CommandParameter="Steam"
|
||||
IsVisible="{ReflectionBinding Path=User.SteamAccountId,Mode=OneWay,Source={x:Static service:UserService.Current},Converter={x:Static ObjectConverters.IsNull}}"/>
|
||||
<Button Classes="Secondary"
|
||||
Content="{ReflectionBinding Path=Res.Unbundling,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="1"
|
||||
Grid.Column="3"
|
||||
Command="{Binding OnUnbundleFastLoginClick}"
|
||||
CommandParameter="Steam"
|
||||
IsEnabled="{ReflectionBinding Path=HasPhoneNumber,Source={x:Static service:UserService.Current}}}"
|
||||
IsVisible="{ReflectionBinding Path=User.SteamAccountId,Mode=OneWay,Source={x:Static service:UserService.Current},Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
||||
|
||||
<PathIcon Classes="FormItemLabel" Data="{StaticResource Microsoft}" Grid.Row="3"/>
|
||||
<TextBox IsReadOnly="True"
|
||||
Focusable="False"
|
||||
Watermark="{ReflectionBinding Path=Res.Unbound,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Text="{ReflectionBinding Path=User.SteamAccountId,Mode=OneWay,Source={x:Static service:UserService.Current}}}"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"/>
|
||||
<Button Classes="Secondary"
|
||||
Content="{ReflectionBinding Path=Res.Bind,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="3"
|
||||
Grid.Column="3"
|
||||
Command="{Binding OnBindFastLoginClick}"
|
||||
CommandParameter="Microsoft"
|
||||
IsVisible="{ReflectionBinding Path=User.SteamAccountId,Mode=OneWay,Source={x:Static service:UserService.Current},Converter={x:Static ObjectConverters.IsNull}}"/>
|
||||
<Button Classes="Secondary"
|
||||
Content="{ReflectionBinding Path=Res.Unbundling,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="3"
|
||||
Grid.Column="3"
|
||||
Command="{Binding OnUnbundleFastLoginClick}"
|
||||
CommandParameter="Microsoft"
|
||||
IsEnabled="{ReflectionBinding Path=HasPhoneNumber,Source={x:Static service:UserService.Current}}}"
|
||||
IsVisible="{ReflectionBinding Path=User.SteamAccountId,Mode=OneWay,Source={x:Static service:UserService.Current},Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
||||
|
||||
<PathIcon Classes="FormItemLabel" Data="{StaticResource Apple}" Grid.Row="5"/>
|
||||
<TextBox IsReadOnly="True"
|
||||
Focusable="False"
|
||||
Watermark="{ReflectionBinding Path=Res.UnderConstruction,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"/>
|
||||
|
||||
<PathIcon Classes="FormItemLabel" Data="{StaticResource QQ}" Grid.Row="7"/>
|
||||
<TextBox IsReadOnly="True"
|
||||
Focusable="False"
|
||||
Watermark="{ReflectionBinding Path=Res.UnderConstruction,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Grid.Row="7"
|
||||
Grid.Column="1"/>
|
||||
</Grid>
|
||||
<TextBlock Margin="20"
|
||||
Text="{ReflectionBinding Path=Res.User_AccountBindTip,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
VerticalAlignment="Bottom"
|
||||
TextWrapping="Wrap"/>
|
||||
</Panel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Panel>
|
||||
<!--Toast-->
|
||||
<controls:ToastMessage />
|
||||
|
||||
@@ -3052,6 +3052,15 @@ namespace System.Application.UI.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 解绑 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Unbundling {
|
||||
get {
|
||||
return ResourceManager.GetString("Unbundling", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 该功能正在开发中,敬请期待 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -3097,6 +3106,24 @@ namespace System.Application.UI.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 账号绑定 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string User_AccountBind {
|
||||
get {
|
||||
return ResourceManager.GetString("User_AccountBind", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 解绑第三方账号需要已绑定手机号才能解绑,如果要将已绑定第三方账号换绑至另一个账号,可以使用 [关于-此软件-账号注销] 注销已绑定的账号。 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string User_AccountBindTip {
|
||||
get {
|
||||
return ResourceManager.GetString("User_AccountBindTip", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 用户协议 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -3115,6 +3142,15 @@ namespace System.Application.UI.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 基本资料 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string User_BasicInfo {
|
||||
get {
|
||||
return ResourceManager.GetString("User_BasicInfo", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 绑定手机 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -1121,6 +1121,9 @@
|
||||
<data name="Unbound" xml:space="preserve">
|
||||
<value>未绑定</value>
|
||||
</data>
|
||||
<data name="Unbundling" xml:space="preserve">
|
||||
<value>解绑</value>
|
||||
</data>
|
||||
<data name="UnderConstruction" xml:space="preserve">
|
||||
<value>该功能正在开发中,敬请期待</value>
|
||||
</data>
|
||||
@@ -1188,12 +1191,21 @@
|
||||
<data name="UserProfile_Location" xml:space="preserve">
|
||||
<value>所在地</value>
|
||||
</data>
|
||||
<data name="User_AccountBind" xml:space="preserve">
|
||||
<value>账号绑定</value>
|
||||
</data>
|
||||
<data name="User_AccountBindTip" xml:space="preserve">
|
||||
<value>解绑第三方账号需要已绑定手机号才能解绑,如果要将已绑定第三方账号换绑至另一个账号,可以使用 [关于-此软件-账号注销] 注销已绑定的账号。</value>
|
||||
</data>
|
||||
<data name="User_Agreement" xml:space="preserve">
|
||||
<value>用户协议</value>
|
||||
</data>
|
||||
<data name="User_AppleLogin" xml:space="preserve">
|
||||
<value>使用 Apple 登录</value>
|
||||
</data>
|
||||
<data name="User_BasicInfo" xml:space="preserve">
|
||||
<value>基本资料</value>
|
||||
</data>
|
||||
<data name="User_BindPhoneNum" xml:space="preserve">
|
||||
<value>绑定手机</value>
|
||||
</data>
|
||||
|
||||
@@ -59,8 +59,20 @@ namespace System.Application.UI.ViewModels
|
||||
SubscribeFormItem(x => x.AreaSelectItem3, SubscribeAreaOnNext);
|
||||
SubscribeFormItem(x => x.AreaSelectItem4, SubscribeAreaOnNext);
|
||||
}
|
||||
OnBindFastLoginClick = ReactiveCommand.CreateFromTask<FastLoginChannel>(OnBindFastLoginClickAsync);
|
||||
OnUnbundleFastLoginClick = ReactiveCommand.CreateFromTask<FastLoginChannel>(OnUnbundleFastLoginClickAsync);
|
||||
OnBindFastLoginClick = ReactiveCommand.CreateFromTask<string>(async channel_ =>
|
||||
{
|
||||
if (Enum.TryParse<FastLoginChannel>(channel_, out var channel))
|
||||
{
|
||||
await OnBindFastLoginClickAsync(channel);
|
||||
}
|
||||
});
|
||||
OnUnbundleFastLoginClick = ReactiveCommand.CreateFromTask<string>(async channel_ =>
|
||||
{
|
||||
if (Enum.TryParse<FastLoginChannel>(channel_, out var channel))
|
||||
{
|
||||
await OnUnbundleFastLoginClickAsync(channel);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
bool _IsModify;
|
||||
@@ -175,6 +187,11 @@ namespace System.Application.UI.ViewModels
|
||||
|
||||
async Task OnUnbundleFastLoginClickAsync(FastLoginChannel channel)
|
||||
{
|
||||
if (!UserService.Current.HasPhoneNumber)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsLoading) return;
|
||||
|
||||
IsLoading = true;
|
||||
|
||||
Reference in New Issue
Block a user