Skip to content

Commit

Permalink
AuthTrade Use Image2 Control
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbadmin committed Apr 24, 2022
1 parent e28ce37 commit c092eb0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
Height="128"
Stretch="None"
Margin="10 0"
Source="{Binding ImageStream^,Converter={StaticResource BitmapAssetValueConverter}}"/>
Source="{Binding Image}"/>
</Panel>
<Panel Grid.Column="1" Margin="10,5">
<StackPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,6 @@ protected override void InitializeComponent()
}
}

/// <summary>
/// 是否使用 <see cref="IHttpService"/> 加载确认物品图片 <see cref="Stream"/>
/// </summary>
static bool IsLoadImage
{
get
{
// 此页面当前使用 Square.Picasso 库加载图片
if (OperatingSystem2.IsAndroid) return false;
return true;
}
}

private string? AuthPassword;
private bool AuthIsLocal;

Expand Down Expand Up @@ -394,13 +381,6 @@ private void Process(string? codeChar = null)
});
var list = steam.GetConfirmations();
if (IsLoadImage)
{
Parallel.ForEach(list, confirmation =>
{
confirmation.ImageStream = IHttpService.Instance.GetImageAsync(confirmation.Image, ImageChannelType.SteamEconomys);
});
}
MainThread2.BeginInvokeOnMainThread(() =>
{
_ConfirmationsSourceList.Clear();
Expand Down Expand Up @@ -432,14 +412,6 @@ private void Process(string? codeChar = null)
steam.Refresh();
var list = steam.GetConfirmations();
if (IsLoadImage)
{
Parallel.ForEach(list, confirmation =>
{
confirmation.ImageStream = IHttpService.Instance.GetImageAsync(confirmation.Image, ImageChannelType.SteamEconomys);
});
}
MainThread2.BeginInvokeOnMainThread(() =>
{
_ConfirmationsSourceList.Clear();
Expand Down

0 comments on commit c092eb0

Please sign in to comment.