parent
2cf6d61273
commit
14372d1e00
21
App.xaml.cs
21
App.xaml.cs
|
|
@ -42,20 +42,15 @@ namespace HeBianGu.App.Disk
|
|||
var setting = xmlSerializerService.Load<SystemSetting>("./settings.xml");
|
||||
if (!string.IsNullOrEmpty(setting.SyncDir))
|
||||
{
|
||||
if (setting.TaskCount == 0 )
|
||||
if (setting.TaskCount == 0)
|
||||
{
|
||||
setting.TaskCount = 3;
|
||||
}
|
||||
minioService.MirrorAsync1(bucketName, setting.SyncDir, setting.TaskCount);
|
||||
//minioService.MirrorAsync1(bucketName, setting.SyncDir, setting.TaskCount);
|
||||
minioService.RealTimeListen(bucketName, setting.SyncDir);
|
||||
}
|
||||
}
|
||||
services.AddStart(x =>
|
||||
{
|
||||
x.ProductFontSize = 90;
|
||||
x.Title = "数据同步";
|
||||
x.Copyright = "";
|
||||
});
|
||||
|
||||
services.AddWindowDialog();
|
||||
services.AddObjectWindowDialog();
|
||||
services.AddWindowAnimation();
|
||||
|
|
@ -139,9 +134,7 @@ namespace HeBianGu.App.Disk
|
|||
protected override void Configure(IApplicationBuilder app)
|
||||
{
|
||||
base.Configure(app);
|
||||
app.UseSetting(x => {
|
||||
x.Settings.Add(MySetting.Instance);
|
||||
});
|
||||
app.UseSetting(x => { x.Settings.Add(MySetting.Instance); });
|
||||
app.UseStyle();
|
||||
//app.UseSettingDefault();
|
||||
// Do:设置默认主题
|
||||
|
|
@ -154,7 +147,7 @@ namespace HeBianGu.App.Disk
|
|||
l.ItemHeight = 35;
|
||||
//l.ItemWidth = 120;
|
||||
l.ItemCornerRadius = 5;
|
||||
l.AnimalSpeed = 100;
|
||||
l.AnimalSpeed = 300;
|
||||
l.AccentColorSelectType = 0;
|
||||
l.IsUseAnimal = false;
|
||||
l.ThemeType = ThemeType.DarkBlack;
|
||||
|
|
@ -164,10 +157,12 @@ namespace HeBianGu.App.Disk
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Displayer(Name = "关机设置", GroupName = "是否关机")]
|
||||
public class MySetting:LazySettingInstance<MySetting>
|
||||
public class MySetting : LazySettingInstance<MySetting>
|
||||
{
|
||||
private bool _ison;
|
||||
|
||||
[DefaultValue(false)]
|
||||
[Display(Name = "是否上传完成关机")]
|
||||
public bool IsOn
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ namespace Hopetry.Services
|
|||
public async Task MirrorAsync1(string bucket, string localDir, int maxParallel = 5)
|
||||
{
|
||||
Channel<(string ObjectName, string ETag)> SyncChannel = Channel.CreateBounded<(string, string)>(
|
||||
new BoundedChannelOptions(10000)
|
||||
new BoundedChannelOptions(1000)
|
||||
{
|
||||
SingleWriter = false,
|
||||
SingleReader = false,
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@
|
|||
</StackPanel>
|
||||
</h:Row>
|
||||
<h:Row>
|
||||
|
||||
</h:Row>
|
||||
<h:Row>
|
||||
<ComboBox Width="250" h:Cattach.Title="同时下载"
|
||||
|
|
@ -122,6 +121,8 @@
|
|||
<system:Int32>5</system:Int32>
|
||||
</ComboBox>
|
||||
</h:Row>
|
||||
<h:Row>
|
||||
</h:Row>
|
||||
<h:Row>
|
||||
<Button Margin="0 5 0 5" Content="立即同步一次" HorizontalAlignment="Left" Width="150"
|
||||
Style="{DynamicResource {x:Static h:ButtonKeys.Accent}}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue