add speed-up

This commit is contained in:
rmbgame
2021-03-24 18:09:53 +08:00
parent 40bd81ef3d
commit 3ef4d5fb16
4 changed files with 14 additions and 10 deletions
@@ -19,7 +19,7 @@ namespace System.Application.UI
{
services.AddLogging(cfg => cfg.AddProvider(NullLoggerProvider.Instance));
services.AddSingleton<ICloudServiceClient, MockCloudServiceClient>();
services.AddSingleton<ICloudServiceClient, MockCloudServiceClient>();
}
sealed class MockServiceProvider : IServiceProvider
@@ -15,15 +15,15 @@
</Design.DataContext>
<Panel HorizontalAlignment="Stretch" Margin="{StaticResource PageMargin}">
<Panel IsVisible="False">
<Panel IsVisible="True">
<ScrollViewer
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Disabled" Height="320">
<ItemsControl Items="{Binding ProxyDomains}">
<ItemsControl.ItemsPanel>
<!--<ItemsPanelTemplate>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" Spacing="15" />
</ItemsPanelTemplate>-->
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
@@ -32,20 +32,19 @@
<Border Classes="paper">
<Panel>
<Image Stretch="Uniform" Source="/Application/UI/Assets/AppResources/app.png" />
<controls:ScrollingTextBlock Width="{Binding #panel.Width}" Text="{Binding Name}" FontSize="18" Foreground="{DynamicResource HighlightForegroundBrushKey}" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0 0 0 5"></controls:ScrollingTextBlock>
</Panel>
</Border>
</Panel>
</CheckBox>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<Button Content="一键加速" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" Grid.Row="1" VerticalAlignment="Bottom"></Button>
</Panel>
<Grid RowDefinitions="Auto,*,Auto" HorizontalAlignment="Stretch">
<Grid RowDefinitions="Auto,*,Auto" HorizontalAlignment="Stretch" IsVisible="False">
<StackPanel Grid.Row="0" HorizontalAlignment="Center" Margin="0 10 0 0">
<TextBlock Text="已加速 01:00:00" FontSize="24"></TextBlock>
</StackPanel>
@@ -22,7 +22,7 @@
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<ItemsRepeater Items="{Binding Source={x:Static service:AuthService.Current},Path=Authenticators,Mode=OneWay}">
<ItemsRepeater.Layout>
<UniformGridLayout MinRowSpacing="20" Orientation="Horizontal"
<UniformGridLayout ItemsJustification="SpaceEvenly" MinRowSpacing="20" Orientation="Horizontal"
MaximumRowsOrColumns="6" />
</ItemsRepeater.Layout>
<ItemsRepeater.ItemTemplate>
@@ -1,7 +1,9 @@
using ReactiveUI;
using System.Application.Models;
using System.Application.Services;
using System.Application.UI.Resx;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace System.Application.UI.ViewModels
{
@@ -131,7 +133,10 @@ IsEnable= false,
}
internal async override Task Initialize()
{
//var client = ICloudServiceClient.Instance.Accelerate;
//ProxyDomains = new List<AccelerateProjectGroupDTO>(client.All());
}
}
}