@@ -22,48 +22,48 @@ public static bool IsDark
2222
2323 public static void ThemeForm ( Form form , bool onInit = true )
2424 {
25- if ( onInit && IsSupported )
26- {
27- DarkNet . Instance . SetWindowThemeForms ( form , Theme . Auto ) ;
28- }
25+ // if (onInit && IsSupported)
26+ // {
27+ // DarkNet.Instance.SetWindowThemeForms(form, Theme.Auto);
28+ // }
2929
30- form . BackColor = IsDark ? bgColorDark : default ;
31- form . ForeColor = IsDark ? fgColorDark : default ;
30+ // form.BackColor = IsDark ? bgColorDark : default;
31+ // form.ForeColor = IsDark ? fgColorDark : default;
3232
33- foreach ( Control childControl in GetControls ( form ) )
34- {
35- childControl . BackColor = IsDark ? bgColorDark : default ;
36- childControl . ForeColor = IsDark ? fgColorDark : default ;
33+ // foreach (Control childControl in GetControls(form))
34+ // {
35+ // childControl.BackColor = IsDark ? bgColorDark : default;
36+ // childControl.ForeColor = IsDark ? fgColorDark : default;
3737
38- if ( childControl is LinkLabel )
39- {
40- ( ( LinkLabel ) childControl ) . LinkColor = IsDark ? Color . LightBlue : default ;
41- }
38+ // if (childControl is LinkLabel)
39+ // {
40+ // ((LinkLabel)childControl).LinkColor = IsDark ? Color.LightBlue : default;
41+ // }
4242
43- if ( onInit )
44- {
45- childControl . Paint += ( object sender , PaintEventArgs e ) =>
46- {
47- if ( IsDark && ! childControl . Enabled )
48- {
49- TextRenderer . DrawText ( e . Graphics , childControl . Text , childControl . Font ,
50- childControl . ClientRectangle , Color . Gray ) ;
51- }
52- } ;
53- }
54- }
43+ // if (onInit)
44+ // {
45+ // childControl.Paint += (object sender, PaintEventArgs e) =>
46+ // {
47+ // if (IsDark && !childControl.Enabled)
48+ // {
49+ // TextRenderer.DrawText(e.Graphics, childControl.Text, childControl.Font,
50+ // childControl.ClientRectangle, Color.Gray);
51+ // }
52+ // };
53+ // }
54+ // }
5555 }
5656
5757 public static void ThemeMenu ( ContextMenuStrip menu )
5858 {
59- if ( IsDark )
60- {
61- menu . Renderer = new ToolStripSystemDarkModeRenderer ( ) ;
62- }
63- else
64- {
65- menu . Renderer = new ToolStripSystemRenderer ( ) ;
66- }
59+ // if (IsDark)
60+ // {
61+ // menu.Renderer = new ToolStripSystemDarkModeRenderer();
62+ // }
63+ // else
64+ // {
65+ // menu.Renderer = new ToolStripSystemRenderer();
66+ // }
6767 }
6868
6969 public static void UserDefaultAppThemeIsDarkChanged ( object sender , bool isDark )
0 commit comments