-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cs
More file actions
61 lines (56 loc) · 1.6 KB
/
Main.cs
File metadata and controls
61 lines (56 loc) · 1.6 KB
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
using DarkModeForms;
using Produire;
using System.Collections.Generic;
using System.Windows.Forms;
namespace Yoiyami.rdr
{
public class 宵闇 : IProduireStaticClass
{
private static readonly Dictionary<Form, DarkModeCS> dmList = new Dictionary<Form, DarkModeCS>();
[自分へ]
public static void 染める([を] Form ウィンドウ)
{
if (dmList.ContainsKey(ウィンドウ))
{
dmList[ウィンドウ].ApplyTheme(DarkModeCS.DisplayMode.DarkMode);
return;
}
var dm = new DarkModeCS(ウィンドウ);
dm.ApplyTheme(DarkModeCS.DisplayMode.DarkMode);
dmList.Add(ウィンドウ, dm);
}
[自分を]
public static void 晴らす([から] Form ウィンドウ)
{
if (dmList.ContainsKey(ウィンドウ))
{
dmList[ウィンドウ].ApplyTheme(DarkModeCS.DisplayMode.ClearMode);
return;
}
var dm = new DarkModeCS(ウィンドウ);
dm.ApplyTheme(DarkModeCS.DisplayMode.ClearMode);
dmList.Add(ウィンドウ, dm);
}
[自分で]
public static void 設定する([を] Form ウィンドウ, [へ] DarkModeCS.DisplayMode 設定)
{
if (dmList.ContainsKey(ウィンドウ))
{
dmList[ウィンドウ].ApplyTheme(設定);
return;
}
var dm = new DarkModeCS(ウィンドウ);
dm.ApplyTheme(設定);
dmList.Add(ウィンドウ, dm);
}
}
[列挙体(typeof(DarkModeCS.DisplayMode))]
public enum 表示設定
{
標準 = DarkModeCS.DisplayMode.SystemDefault,
クリア = DarkModeCS.DisplayMode.ClearMode,
光 = DarkModeCS.DisplayMode.ClearMode,
ダーク = DarkModeCS.DisplayMode.DarkMode,
闇 = DarkModeCS.DisplayMode.DarkMode
}
}