Merge remote-tracking branch 'origin/dev' into dev

dev
陈伟 2025-03-25 11:25:37 +08:00
commit bdb18e372b
2 changed files with 26 additions and 1 deletions

View File

@ -11,6 +11,9 @@ using HeBianGu.Systems.Identity;
using HeBianGu.Systems.Setting; using HeBianGu.Systems.Setting;
using Hopetry.Services; using Hopetry.Services;
using SystemSetting = FileUploader.Models.SystemSetting; using SystemSetting = FileUploader.Models.SystemSetting;
using System.Configuration;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
namespace HeBianGu.App.Disk namespace HeBianGu.App.Disk
{ {
@ -132,6 +135,9 @@ namespace HeBianGu.App.Disk
protected override void Configure(IApplicationBuilder app) protected override void Configure(IApplicationBuilder app)
{ {
base.Configure(app); base.Configure(app);
app.UseSetting(x => {
x.Settings.Add(MySetting.Instance);
});
app.UseStyle(); app.UseStyle();
//app.UseSettingDefault(); //app.UseSettingDefault();
// Do设置默认主题 // Do设置默认主题
@ -154,4 +160,20 @@ namespace HeBianGu.App.Disk
}); });
} }
} }
[Displayer(Name = "关机设置", GroupName = "是否关机")]
public class MySetting:LazySettingInstance<MySetting>
{
private bool _ison;
[DefaultValue(false)]
[Display(Name = "是否上传完成关机")]
public bool IsOn
{
get { return _ison; }
set
{
_ison = value;
RaisePropertyChanged("IsOn");
}
}
}
} }

View File

@ -176,7 +176,10 @@ namespace HeBianGu.App.Disk
//更新总进度100% //更新总进度100%
_sendViewModel.Progress = 100; _sendViewModel.Progress = 100;
// 关机 // 关机
Shutdown(); if (MySetting.Instance.IsOn)
{
Shutdown();
}
// 停止计时器 // 停止计时器
timer.Stop(); timer.Stop();
} }