-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
105 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System.Drawing; | ||
|
||
namespace Dropper | ||
{ | ||
partial class Form1 | ||
{ | ||
private Color _lightBG = Color.WhiteSmoke; | ||
private Color _lightFG = Color.FromArgb(23, 23, 23); | ||
|
||
private Color _darkBG = Color.FromArgb(23, 23, 23); //#2b2b2b | ||
private Color _darkFG = Color.FromArgb(230, 230, 230); //#f1f1f1f | ||
|
||
public void SetDarkTheme(bool enable) | ||
{ | ||
if (enable) | ||
SetColors(_darkBG, _darkFG); | ||
else | ||
SetColors(_lightBG, _lightFG); | ||
} | ||
|
||
private void SetColors(Color bg, Color fg) | ||
{ | ||
this.BackColor = bg; | ||
this.ForeColor = fg; | ||
|
||
panel1.BackColor = bg; | ||
CloseButton.BackColor = bg; | ||
CloseButton.ForeColor = fg; | ||
TitleBar.BackColor = bg; | ||
TitleLable.BackColor = bg; | ||
TitleLable.ForeColor = fg; | ||
|
||
foreach(var item in textBoxes) | ||
{ | ||
item.BackColor = bg; | ||
item.ForeColor = fg; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.