-
Notifications
You must be signed in to change notification settings - Fork 0
/
IPlugin.cs
72 lines (67 loc) · 1.85 KB
/
IPlugin.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using Avalonia.Controls;
namespace ColorDesktop.Api;
public interface IPlugin
{
/// <summary>
/// 是否为核心库
/// </summary>
public bool IsCoreLib { get; }
/// <summary>
/// 是否有组件设置
/// </summary>
public bool HavePluginSetting { get; }
/// <summary>
/// 是否有实例设置
/// </summary>
public bool HaveInstanceSetting { get; }
/// <summary>
/// 加载语言
/// </summary>
/// <param name="type"></param>
void LoadLang(LanguageType type);
/// <summary>
/// 初始化显示实例,你可以在此阶段设置实例的独立配置文件
/// </summary>
/// <param name="obj">实例数据</param>
/// <returns>组件实例</returns>
IInstance MakeInstances(InstanceDataObj obj);
/// <summary>
/// 创建一个显示实例默认参数,默认显示方式,启动参数
/// </summary>
/// <returns></returns>
InstanceDataObj CreateInstanceDefault();
/// <summary>
/// 获取图标
/// </summary>
/// <returns></returns>
Stream? GetIcon();
/// <summary>
/// 打开实例设置
/// </summary>
/// <param name="instance"></param>
Control OpenSetting(InstanceDataObj instance);
/// <summary>
/// 打开组件设置
/// </summary>
Control OpenSetting();
/// <summary>
/// 组件初始化,可以设置组件全体配置
/// </summary>
/// <param name="local">运行路径</param>
/// <param name="local">实例跟目录</param>
/// <param name="type">默认语言</param>
/// <returns></returns>
void Init(string local, string local1);
/// <summary>
/// 组件启用
/// </summary>
void Enable();
/// <summary>
/// 组件禁用
/// </summary>
void Disable();
/// <summary>
/// 组件停止
/// </summary>
void Stop();
}