Skip to content

Commit 42b77c0

Browse files
Use darkmode setting value to turn on/off dark mode for all forms.
1 parent 4c90a17 commit 42b77c0

12 files changed

+13
-14
lines changed

SQL Document Builder/BatchColumnDesc.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public partial class BatchColumnDesc : Form
2121
public BatchColumnDesc()
2222
{
2323
InitializeComponent();
24-
_ = new DarkMode(this);
24+
if (Properties.Settings.Default.DarkMode) _ = new DarkMode(this);
2525
}
2626

2727
/// <summary>

SQL Document Builder/ConnectionManageForm.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public partial class ConnectionManageForm : Form
2626
public ConnectionManageForm()
2727
{
2828
InitializeComponent();
29-
_ = new DarkMode(this);
29+
if (Properties.Settings.Default.DarkMode) _ = new DarkMode(this);
3030
}
3131

3232
/// <summary>

SQL Document Builder/DBObjectsSelectForm.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public partial class DBObjectsSelectForm : Form
2222
public DBObjectsSelectForm()
2323
{
2424
InitializeComponent();
25-
_ = new DarkMode(this);
25+
if (Properties.Settings.Default.DarkMode) _ = new DarkMode(this);
2626
}
2727

2828
/// <summary>

SQL Document Builder/DarkMode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ public void ThemeControl(Control control)
462462
}
463463
else if (control is TreeView tree)
464464
{
465-
SetTreeViewTheme(tree);
465+
//SetTreeViewTheme(tree);
466466
}
467467
else if (control is DataGridView grid)
468468
{

SQL Document Builder/DataViewForm.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ public partial class DataViewForm : Form
2828
public DataViewForm()
2929
{
3030
InitializeComponent();
31-
_ = new DarkMode(this);
32-
//if (Properties.Settings.Default.DarkMode)
33-
// _ = new DarkModeCS(this, false);
31+
if (Properties.Settings.Default.DarkMode) _ = new DarkMode(this);
32+
3433
dataGridView.RowTemplate.Height = Font.Height + 6;
3534
dataGridView.RowHeadersWidth = Font.Height + 12;
3635
}

SQL Document Builder/ExcelSheetsForm.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public partial class ExcelSheetsForm : Form
2222
public ExcelSheetsForm()
2323
{
2424
InitializeComponent();
25-
_ = new DarkMode(this);
25+
if (Properties.Settings.Default.DarkMode) _ = new DarkMode(this);
2626
}
2727

2828
/// <summary>

SQL Document Builder/InputBox.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public partial class InputBox : Form
1616
public InputBox()
1717
{
1818
InitializeComponent();
19-
_ = new DarkMode(this);
19+
if (Properties.Settings.Default.DarkMode) _ = new DarkMode(this);
2020
}
2121

2222
/// <summary>

SQL Document Builder/NewSQLServerConnectionDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public partial class NewSQLServerConnectionDialog : Form
2020
public NewSQLServerConnectionDialog()
2121
{
2222
InitializeComponent();
23-
_ = new DarkMode(this);
23+
if (Properties.Settings.Default.DarkMode) _ = new DarkMode(this);
2424
}
2525

2626
/// <summary>

SQL Document Builder/QueryDataToTableForm.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public partial class QueryDataToTableForm : Form
1616
public QueryDataToTableForm()
1717
{
1818
InitializeComponent();
19-
_ = new DarkMode(this);
19+
if (Properties.Settings.Default.DarkMode) _ = new DarkMode(this);
2020
}
2121

2222
/// <summary>

SQL Document Builder/SQLServerLoginDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public partial class SQLServerLoginDialog : Form
1717
public SQLServerLoginDialog()
1818
{
1919
InitializeComponent();
20-
_ = new DarkMode(this);
20+
if (Properties.Settings.Default.DarkMode) _ = new DarkMode(this);
2121
}
2222

2323
/// <summary>

0 commit comments

Comments
 (0)