Merge remote-tracking branch 'origin/dev' into dev
commit
bdb18e372b
22
App.xaml.cs
22
App.xaml.cs
|
|
@ -11,6 +11,9 @@ using HeBianGu.Systems.Identity;
|
|||
using HeBianGu.Systems.Setting;
|
||||
using Hopetry.Services;
|
||||
using SystemSetting = FileUploader.Models.SystemSetting;
|
||||
using System.Configuration;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace HeBianGu.App.Disk
|
||||
{
|
||||
|
|
@ -132,6 +135,9 @@ namespace HeBianGu.App.Disk
|
|||
protected override void Configure(IApplicationBuilder app)
|
||||
{
|
||||
base.Configure(app);
|
||||
app.UseSetting(x => {
|
||||
x.Settings.Add(MySetting.Instance);
|
||||
});
|
||||
app.UseStyle();
|
||||
//app.UseSettingDefault();
|
||||
// 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -176,7 +176,10 @@ namespace HeBianGu.App.Disk
|
|||
//更新总进度100%
|
||||
_sendViewModel.Progress = 100;
|
||||
// 关机
|
||||
if (MySetting.Instance.IsOn)
|
||||
{
|
||||
Shutdown();
|
||||
}
|
||||
// 停止计时器
|
||||
timer.Stop();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue