Skip to content

Commit

Permalink
Added night mode
Browse files Browse the repository at this point in the history
  • Loading branch information
borseno committed Feb 9, 2019
1 parent 5cfcc5d commit 9053fb4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Filemode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace BorsenoTextEditor
{
enum FileMode
internal enum FileMode
{
Database,
Explorer
Expand Down
22 changes: 11 additions & 11 deletions Mainmenu.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 11 additions & 13 deletions Mainmenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public partial class MainForm : Form
private string _currentFileName;
private IFilePicker _filePicker;
private IFileManager _fileManager;
private FileMode _fileMode;
bool darkenable;
private FileMode? _fileMode = null;
bool _darkEnabled;

private string CurrentFilePath
{
Expand All @@ -33,10 +33,6 @@ public MainForm()
{
InitializeComponent();

_tableName = "binary_Files";
_valueColumnName = "binary_file";
_nameColumnName = "Name";

openFileDialog1.DefaultExt = "txt";
saveFileDialog1.DefaultExt = "txt";

Expand Down Expand Up @@ -140,18 +136,20 @@ private void FileMode_Click(object sender, EventArgs e)
}

private void ScreenMode_Click(object sender, EventArgs e)
{
if (darkenable == false)
{
this.ScreenMode.Text = this.BackColor.Name + " mode";

if (_darkEnabled == false)
{
this.BackColor = System.Drawing.Color.Black;
darkenable = true;
this.CurrentFileNameLabel.ForeColor = System.Drawing.Color.DarkGreen;
_darkEnabled = true;
}

else if (darkenable == true)
else
{
this.BackColor = System.Drawing.Color.White;
darkenable = false;
return;
_darkEnabled = false;

}
}
}
Expand Down

0 comments on commit 9053fb4

Please sign in to comment.