mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-22 17:49:54 +08:00
app ioc
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.Application
|
||||
{
|
||||
/// <summary>
|
||||
/// 迁移
|
||||
/// </summary>
|
||||
public static class Migrations
|
||||
{
|
||||
/// <summary>
|
||||
/// 从 V1 版本 迁移配置文件等信息
|
||||
/// </summary>
|
||||
public static void FromV1()
|
||||
{
|
||||
// 将以前的配置读取,存储到新的格式
|
||||
// 删除以前的配置文件
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace System.Application.Services
|
||||
{
|
||||
public interface IDesktopAppService
|
||||
{
|
||||
/// <summary>
|
||||
/// 当前桌面应用的主题
|
||||
/// <para><see langword="true"/> Light</para>
|
||||
/// <para><see langword="false"/> Dark</para>
|
||||
/// </summary>
|
||||
bool Theme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 退出整个程序
|
||||
/// </summary>
|
||||
void Shutdown();
|
||||
|
||||
/// <summary>
|
||||
/// 主窗口恢复显示
|
||||
/// </summary>
|
||||
void RestoreMainWindow();
|
||||
|
||||
/// <summary>
|
||||
/// 托盘菜单
|
||||
/// </summary>
|
||||
IReadOnlyDictionary<string, ICommand> NotifyIconMenus { get; }
|
||||
}
|
||||
}
|
||||
@@ -146,6 +146,8 @@ namespace System.Application.UI
|
||||
}
|
||||
}
|
||||
|
||||
public static IDesktopAppService Current => DI.Get<IDesktopAppService>();
|
||||
|
||||
#if DEBUG
|
||||
|
||||
[Obsolete("use EnableLogger", true)]
|
||||
|
||||
Reference in New Issue
Block a user