Theming for RPF Explorer

This commit is contained in:
dexyfex 2018-03-04 03:09:39 +11:00
parent a24ef35611
commit 2e75c875bd
10 changed files with 279 additions and 90 deletions

View File

@ -199,6 +199,9 @@
<setting name="ProjectWindowTheme" serializeAs="String"> <setting name="ProjectWindowTheme" serializeAs="String">
<value>Blue</value> <value>Blue</value>
</setting> </setting>
<setting name="ExplorerWindowTheme" serializeAs="String">
<value>Windows</value>
</setting>
</CodeWalker.Properties.Settings> </CodeWalker.Properties.Settings>
</userSettings> </userSettings>
</configuration> </configuration>

View File

@ -1,7 +1,10 @@
using System; using System;
using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Windows.Forms; using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using Point = System.Drawing.Point; using Point = System.Drawing.Point;
namespace CodeWalker namespace CodeWalker
@ -261,6 +264,78 @@ namespace CodeWalker
public static class FormTheme
{
public static void SetTheme(Control form, ThemeBase theme)
{
form.BackColor = SystemColors.Control;
form.ForeColor = SystemColors.ControlText;
var txtback = SystemColors.Window;
var wndback = SystemColors.Window;
var disback = SystemColors.Control;
var disfore = form.ForeColor;
var btnback = Color.Transparent;
if (theme is VS2015DarkTheme)
{
form.BackColor = theme.ColorPalette.MainWindowActive.Background;
form.ForeColor = Color.White;
txtback = Color.FromArgb(40, 40, 40);// form.BackColor;
wndback = theme.ColorPalette.MainWindowActive.Background;
disback = form.BackColor;// Color.FromArgb(32,32,32);
disfore = Color.DarkGray;
btnback = form.BackColor;
}
var allcontrols = new List<Control>();
RecurseControls(form, allcontrols);
foreach (var c in allcontrols)
{
if (c is TabPage)
{
c.ForeColor = form.ForeColor;
c.BackColor = wndback;
}
else if ((c is CheckedListBox) || (c is ListBox) || (c is ListView))
{
c.ForeColor = form.ForeColor;
c.BackColor = wndback;
}
else if ((c is TextBox))
{
var txtbox = c as TextBox;
c.ForeColor = txtbox.ReadOnly ? disfore : form.ForeColor;
c.BackColor = txtbox.ReadOnly ? disback : txtback;
}
else if ((c is Button) || (c is GroupBox))
{
c.ForeColor = form.ForeColor;
c.BackColor = btnback;
}
else if (c is TreeView)
{
c.ForeColor = form.ForeColor;
c.BackColor = wndback;
(c as TreeView).LineColor = form.ForeColor;
}
}
}
private static void RecurseControls(Control c, List<Control> l)
{
foreach (Control cc in c.Controls)
{
l.Add(cc);
RecurseControls(cc, l);
}
}
}
//unused //unused
//public class AccurateTimer //public class AccurateTimer
//{ //{

View File

@ -12,58 +12,9 @@ namespace CodeWalker.Project
public class ProjectPanel : DockContent public class ProjectPanel : DockContent
{ {
public virtual void SetTheme(ThemeBase theme) public virtual void SetTheme(ThemeBase theme)
{ {
BackColor = SystemColors.Control; FormTheme.SetTheme(this, theme);
ForeColor = SystemColors.ControlText;
var txtback = SystemColors.Window;
var disback = SystemColors.Control;
var disfore = ForeColor;
var btnback = Color.Transparent;
if (theme is VS2015DarkTheme)
{
BackColor = theme.ColorPalette.MainWindowActive.Background;
ForeColor = Color.White;
txtback = BackColor;
disback = BackColor;// Color.FromArgb(32,32,32);
disfore = Color.DarkGray;
btnback = BackColor;
}
var allcontrols = new List<Control>();
RecurseControls(this, allcontrols);
foreach (var c in allcontrols)
{
if ((c is TabPage) || (c is CheckedListBox) || (c is ListBox))
{
c.ForeColor = ForeColor;
c.BackColor = txtback;
}
else if ((c is TextBox))
{
var txtbox = c as TextBox;
c.ForeColor = txtbox.ReadOnly ? disfore : ForeColor;
c.BackColor = txtbox.ReadOnly ? disback : txtback;
}
else if ((c is Button) || (c is GroupBox))
{
c.ForeColor = ForeColor;
c.BackColor = btnback;
}
}
}
private void RecurseControls(Control c, List<Control> l)
{
foreach (Control cc in c.Controls)
{
l.Add(cc);
RecurseControls(cc, l);
}
} }
} }

102
ExploreForm.Designer.cs generated
View File

@ -58,6 +58,12 @@
this.ViewSmallIconsMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ViewSmallIconsMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ViewListMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ViewListMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ViewDetailsMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ViewDetailsMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
this.ViewThemeMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ViewThemeWindowsMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ViewThemeBlueMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ViewThemeLightMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ViewThemeDarkMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ToolsMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ToolsMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ToolsBinSearchMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ToolsBinSearchMenu = new System.Windows.Forms.ToolStripMenuItem();
this.ToolsRpfBrowserMenu = new System.Windows.Forms.ToolStripMenuItem(); this.ToolsRpfBrowserMenu = new System.Windows.Forms.ToolStripMenuItem();
@ -80,7 +86,7 @@
this.SearchButton = new System.Windows.Forms.ToolStripSplitButton(); this.SearchButton = new System.Windows.Forms.ToolStripSplitButton();
this.SearchGlobalButton = new System.Windows.Forms.ToolStripMenuItem(); this.SearchGlobalButton = new System.Windows.Forms.ToolStripMenuItem();
this.SearchFilterButton = new System.Windows.Forms.ToolStripMenuItem(); this.SearchFilterButton = new System.Windows.Forms.ToolStripMenuItem();
this.StatusBar = new System.Windows.Forms.StatusStrip(); this.MainStatusBar = new System.Windows.Forms.StatusStrip();
this.StatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.StatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.FileImageList16 = new System.Windows.Forms.ImageList(this.components); this.FileImageList16 = new System.Windows.Forms.ImageList(this.components);
this.MainSplitContainer = new System.Windows.Forms.SplitContainer(); this.MainSplitContainer = new System.Windows.Forms.SplitContainer();
@ -135,9 +141,10 @@
this.SaveFileDialog = new System.Windows.Forms.SaveFileDialog(); this.SaveFileDialog = new System.Windows.Forms.SaveFileDialog();
this.OpenFileDialog = new System.Windows.Forms.OpenFileDialog(); this.OpenFileDialog = new System.Windows.Forms.OpenFileDialog();
this.FolderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); this.FolderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog();
this.VSExtender = new WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender(this.components);
this.MainMenu.SuspendLayout(); this.MainMenu.SuspendLayout();
this.MainToolbar.SuspendLayout(); this.MainToolbar.SuspendLayout();
this.StatusBar.SuspendLayout(); this.MainStatusBar.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.MainSplitContainer)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.MainSplitContainer)).BeginInit();
this.MainSplitContainer.Panel1.SuspendLayout(); this.MainSplitContainer.Panel1.SuspendLayout();
this.MainSplitContainer.Panel2.SuspendLayout(); this.MainSplitContainer.Panel2.SuspendLayout();
@ -366,7 +373,9 @@
this.ViewLargeIconsMenu, this.ViewLargeIconsMenu,
this.ViewSmallIconsMenu, this.ViewSmallIconsMenu,
this.ViewListMenu, this.ViewListMenu,
this.ViewDetailsMenu}); this.ViewDetailsMenu,
this.toolStripSeparator11,
this.ViewThemeMenu});
this.ViewMenu.Name = "ViewMenu"; this.ViewMenu.Name = "ViewMenu";
this.ViewMenu.Size = new System.Drawing.Size(44, 20); this.ViewMenu.Size = new System.Drawing.Size(44, 20);
this.ViewMenu.Text = "View"; this.ViewMenu.Text = "View";
@ -374,21 +383,21 @@
// ViewLargeIconsMenu // ViewLargeIconsMenu
// //
this.ViewLargeIconsMenu.Name = "ViewLargeIconsMenu"; this.ViewLargeIconsMenu.Name = "ViewLargeIconsMenu";
this.ViewLargeIconsMenu.Size = new System.Drawing.Size(134, 22); this.ViewLargeIconsMenu.Size = new System.Drawing.Size(152, 22);
this.ViewLargeIconsMenu.Text = "Large Icons"; this.ViewLargeIconsMenu.Text = "Large Icons";
this.ViewLargeIconsMenu.Click += new System.EventHandler(this.ViewLargeIconsMenu_Click); this.ViewLargeIconsMenu.Click += new System.EventHandler(this.ViewLargeIconsMenu_Click);
// //
// ViewSmallIconsMenu // ViewSmallIconsMenu
// //
this.ViewSmallIconsMenu.Name = "ViewSmallIconsMenu"; this.ViewSmallIconsMenu.Name = "ViewSmallIconsMenu";
this.ViewSmallIconsMenu.Size = new System.Drawing.Size(134, 22); this.ViewSmallIconsMenu.Size = new System.Drawing.Size(152, 22);
this.ViewSmallIconsMenu.Text = "Small Icons"; this.ViewSmallIconsMenu.Text = "Small Icons";
this.ViewSmallIconsMenu.Click += new System.EventHandler(this.ViewSmallIconsMenu_Click); this.ViewSmallIconsMenu.Click += new System.EventHandler(this.ViewSmallIconsMenu_Click);
// //
// ViewListMenu // ViewListMenu
// //
this.ViewListMenu.Name = "ViewListMenu"; this.ViewListMenu.Name = "ViewListMenu";
this.ViewListMenu.Size = new System.Drawing.Size(134, 22); this.ViewListMenu.Size = new System.Drawing.Size(152, 22);
this.ViewListMenu.Text = "List"; this.ViewListMenu.Text = "List";
this.ViewListMenu.Click += new System.EventHandler(this.ViewListMenu_Click); this.ViewListMenu.Click += new System.EventHandler(this.ViewListMenu_Click);
// //
@ -397,10 +406,56 @@
this.ViewDetailsMenu.Checked = true; this.ViewDetailsMenu.Checked = true;
this.ViewDetailsMenu.CheckState = System.Windows.Forms.CheckState.Checked; this.ViewDetailsMenu.CheckState = System.Windows.Forms.CheckState.Checked;
this.ViewDetailsMenu.Name = "ViewDetailsMenu"; this.ViewDetailsMenu.Name = "ViewDetailsMenu";
this.ViewDetailsMenu.Size = new System.Drawing.Size(134, 22); this.ViewDetailsMenu.Size = new System.Drawing.Size(152, 22);
this.ViewDetailsMenu.Text = "Details"; this.ViewDetailsMenu.Text = "Details";
this.ViewDetailsMenu.Click += new System.EventHandler(this.ViewDetailsMenu_Click); this.ViewDetailsMenu.Click += new System.EventHandler(this.ViewDetailsMenu_Click);
// //
// toolStripSeparator11
//
this.toolStripSeparator11.Name = "toolStripSeparator11";
this.toolStripSeparator11.Size = new System.Drawing.Size(149, 6);
//
// ViewThemeMenu
//
this.ViewThemeMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ViewThemeWindowsMenu,
this.ViewThemeBlueMenu,
this.ViewThemeLightMenu,
this.ViewThemeDarkMenu});
this.ViewThemeMenu.Name = "ViewThemeMenu";
this.ViewThemeMenu.Size = new System.Drawing.Size(152, 22);
this.ViewThemeMenu.Text = "Theme";
//
// ViewThemeWindowsMenu
//
this.ViewThemeWindowsMenu.Checked = true;
this.ViewThemeWindowsMenu.CheckState = System.Windows.Forms.CheckState.Checked;
this.ViewThemeWindowsMenu.Name = "ViewThemeWindowsMenu";
this.ViewThemeWindowsMenu.Size = new System.Drawing.Size(152, 22);
this.ViewThemeWindowsMenu.Text = "Windows";
this.ViewThemeWindowsMenu.Click += new System.EventHandler(this.ViewThemeWindowsMenu_Click);
//
// ViewThemeBlueMenu
//
this.ViewThemeBlueMenu.Name = "ViewThemeBlueMenu";
this.ViewThemeBlueMenu.Size = new System.Drawing.Size(152, 22);
this.ViewThemeBlueMenu.Text = "Blue";
this.ViewThemeBlueMenu.Click += new System.EventHandler(this.ViewThemeBlueMenu_Click);
//
// ViewThemeLightMenu
//
this.ViewThemeLightMenu.Name = "ViewThemeLightMenu";
this.ViewThemeLightMenu.Size = new System.Drawing.Size(152, 22);
this.ViewThemeLightMenu.Text = "Light";
this.ViewThemeLightMenu.Click += new System.EventHandler(this.ViewThemeLightMenu_Click);
//
// ViewThemeDarkMenu
//
this.ViewThemeDarkMenu.Name = "ViewThemeDarkMenu";
this.ViewThemeDarkMenu.Size = new System.Drawing.Size(152, 22);
this.ViewThemeDarkMenu.Text = "Dark";
this.ViewThemeDarkMenu.Click += new System.EventHandler(this.ViewThemeDarkMenu_Click);
//
// ToolsMenu // ToolsMenu
// //
this.ToolsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.ToolsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -609,15 +664,15 @@
this.SearchFilterButton.Text = "Filter"; this.SearchFilterButton.Text = "Filter";
this.SearchFilterButton.Click += new System.EventHandler(this.SearchFilterButton_Click); this.SearchFilterButton.Click += new System.EventHandler(this.SearchFilterButton_Click);
// //
// StatusBar // MainStatusBar
// //
this.StatusBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.MainStatusBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.StatusLabel}); this.StatusLabel});
this.StatusBar.Location = new System.Drawing.Point(0, 565); this.MainStatusBar.Location = new System.Drawing.Point(0, 565);
this.StatusBar.Name = "StatusBar"; this.MainStatusBar.Name = "MainStatusBar";
this.StatusBar.Size = new System.Drawing.Size(876, 22); this.MainStatusBar.Size = new System.Drawing.Size(876, 22);
this.StatusBar.TabIndex = 2; this.MainStatusBar.TabIndex = 2;
this.StatusBar.Text = "statusStrip1"; this.MainStatusBar.Text = "MainStatusBar";
// //
// StatusLabel // StatusLabel
// //
@ -1115,13 +1170,17 @@
// //
this.OpenFileDialog.Multiselect = true; this.OpenFileDialog.Multiselect = true;
// //
// VSExtender
//
this.VSExtender.DefaultRenderer = null;
//
// ExploreForm // ExploreForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(876, 587); this.ClientSize = new System.Drawing.Size(876, 587);
this.Controls.Add(this.MainSplitContainer); this.Controls.Add(this.MainSplitContainer);
this.Controls.Add(this.StatusBar); this.Controls.Add(this.MainStatusBar);
this.Controls.Add(this.MainToolbar); this.Controls.Add(this.MainToolbar);
this.Controls.Add(this.MainMenu); this.Controls.Add(this.MainMenu);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
@ -1134,8 +1193,8 @@
this.MainMenu.PerformLayout(); this.MainMenu.PerformLayout();
this.MainToolbar.ResumeLayout(false); this.MainToolbar.ResumeLayout(false);
this.MainToolbar.PerformLayout(); this.MainToolbar.PerformLayout();
this.StatusBar.ResumeLayout(false); this.MainStatusBar.ResumeLayout(false);
this.StatusBar.PerformLayout(); this.MainStatusBar.PerformLayout();
this.MainSplitContainer.Panel1.ResumeLayout(false); this.MainSplitContainer.Panel1.ResumeLayout(false);
this.MainSplitContainer.Panel2.ResumeLayout(false); this.MainSplitContainer.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.MainSplitContainer)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.MainSplitContainer)).EndInit();
@ -1160,7 +1219,7 @@
private System.Windows.Forms.ToolStripMenuItem EditMenu; private System.Windows.Forms.ToolStripMenuItem EditMenu;
private System.Windows.Forms.ToolStripMenuItem ViewMenu; private System.Windows.Forms.ToolStripMenuItem ViewMenu;
private System.Windows.Forms.ToolStrip MainToolbar; private System.Windows.Forms.ToolStrip MainToolbar;
private System.Windows.Forms.StatusStrip StatusBar; private System.Windows.Forms.StatusStrip MainStatusBar;
private System.Windows.Forms.ToolStripStatusLabel StatusLabel; private System.Windows.Forms.ToolStripStatusLabel StatusLabel;
private System.Windows.Forms.ImageList FileImageList16; private System.Windows.Forms.ImageList FileImageList16;
private System.Windows.Forms.ToolStripSplitButton BackButton; private System.Windows.Forms.ToolStripSplitButton BackButton;
@ -1260,5 +1319,12 @@
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.ToolStripMenuItem ListContextDefragmentMenu; private System.Windows.Forms.ToolStripMenuItem ListContextDefragmentMenu;
private System.Windows.Forms.ToolStripSeparator ListContextDefragmentSeparator; private System.Windows.Forms.ToolStripSeparator ListContextDefragmentSeparator;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator11;
private System.Windows.Forms.ToolStripMenuItem ViewThemeMenu;
private System.Windows.Forms.ToolStripMenuItem ViewThemeBlueMenu;
private System.Windows.Forms.ToolStripMenuItem ViewThemeLightMenu;
private System.Windows.Forms.ToolStripMenuItem ViewThemeDarkMenu;
private WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender VSExtender;
private System.Windows.Forms.ToolStripMenuItem ViewThemeWindowsMenu;
} }
} }

View File

@ -15,6 +15,7 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using System.Xml; using System.Xml;
using WeifenLuo.WinFormsUI.Docking;
namespace CodeWalker namespace CodeWalker
{ {
@ -45,14 +46,84 @@ namespace CodeWalker
private bool EditMode = false; private bool EditMode = false;
public ThemeBase Theme { get; private set; }
public ExploreForm() public ExploreForm()
{ {
InitializeComponent(); InitializeComponent();
SetTheme(Settings.Default.ExplorerWindowTheme, false);
ShowMainListViewPathColumn(false); ShowMainListViewPathColumn(false);
} }
private void SetTheme(string themestr, bool changing = true)
{
//string configFile = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "DockPanel.temp.config");
//MainDockPanel.SaveAsXml(configFile);
//CloseAllContents();
foreach (ToolStripMenuItem menu in ViewThemeMenu.DropDownItems)
{
menu.Checked = false;
}
Theme = null;
var version = VisualStudioToolStripExtender.VsVersion.Vs2015;
switch (themestr)
{
default:
case "Windows":
//Theme = new VS2005Theme();
ViewThemeWindowsMenu.Checked = true;
version = VisualStudioToolStripExtender.VsVersion.Unknown;
if (changing)
{
MessageBox.Show("Please reopen RPF Explorer to change back to Windows theme.");
}
break;
case "Blue":
Theme = new VS2015BlueTheme();
ViewThemeBlueMenu.Checked = true;
break;
case "Light":
Theme = new VS2015LightTheme();
ViewThemeLightMenu.Checked = true;
break;
case "Dark":
Theme = new VS2015DarkTheme();
ViewThemeDarkMenu.Checked = true;
break;
}
if (changing)
{
Settings.Default.ExplorerWindowTheme = themestr;
Settings.Default.Save();
}
//Theme.Extender.FloatWindowFactory = new ExplorerFloatWindowFactory();
//MainDockPanel.Theme = Theme;
if (Theme != null)
{
VSExtender.SetStyle(MainMenu, version, Theme);
VSExtender.SetStyle(MainToolbar, version, Theme);
VSExtender.SetStyle(MainStatusBar, version, Theme);
FormTheme.SetTheme(this, Theme);
MainSplitContainer.BackColor = Theme.ColorPalette.MainWindowActive.Background;
}
//if (File.Exists(configFile)) MainDockPanel.LoadFromXml(configFile, m_deserializeDockContent);
}
private void Init() private void Init()
{ {
//called from ExploreForm_Load //called from ExploreForm_Load
@ -3404,6 +3475,26 @@ namespace CodeWalker
SetView(System.Windows.Forms.View.Details); SetView(System.Windows.Forms.View.Details);
} }
private void ViewThemeWindowsMenu_Click(object sender, EventArgs e)
{
SetTheme("Windows");
}
private void ViewThemeBlueMenu_Click(object sender, EventArgs e)
{
SetTheme("Blue");
}
private void ViewThemeLightMenu_Click(object sender, EventArgs e)
{
SetTheme("Light");
}
private void ViewThemeDarkMenu_Click(object sender, EventArgs e)
{
SetTheme("Dark");
}
private void ToolsOptionsMenu_Click(object sender, EventArgs e) private void ToolsOptionsMenu_Click(object sender, EventArgs e)
{ {
MessageBox.Show("Options TODO!"); MessageBox.Show("Options TODO!");

View File

@ -302,7 +302,7 @@
NQar60zqQI0AAAAASUVORK5CYII= NQar60zqQI0AAAAASUVORK5CYII=
</value> </value>
</data> </data>
<metadata name="StatusBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="MainStatusBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>253, 17</value> <value>253, 17</value>
</metadata> </metadata>
<metadata name="FileImageList16.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="FileImageList16.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
@ -313,7 +313,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADo ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADo
HwAAAk1TRnQBSQFMAgEBGAEAAfgBAAH4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo HwAAAk1TRnQBSQFMAgEBGAEAARgBAQEYAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAAXADAAEBAQABCAYAARwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAAXADAAEBAQABCAYAARwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -592,6 +592,9 @@
<metadata name="FolderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="FolderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>152, 56</value> <value>152, 56</value>
</metadata> </metadata>
<metadata name="VSExtender.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>317, 56</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>126</value> <value>126</value>
</metadata> </metadata>

View File

@ -27,24 +27,6 @@ namespace CodeWalker.Project.Panels
InitializeComponent(); InitializeComponent();
} }
public override void SetTheme(ThemeBase theme)
{
base.SetTheme(theme);
if (theme is VS2015DarkTheme)
{
ProjectTreeView.BackColor = theme.ColorPalette.MainWindowActive.Background;
ProjectTreeView.ForeColor = Color.White;
ProjectTreeView.LineColor = Color.White;
}
else
{
ProjectTreeView.BackColor = SystemColors.Window;
ProjectTreeView.ForeColor = SystemColors.WindowText;
ProjectTreeView.LineColor = Color.Black;
}
}
public void LoadProjectTree(ProjectFile projectFile) public void LoadProjectTree(ProjectFile projectFile)
{ {

View File

@ -178,8 +178,11 @@ namespace CodeWalker.Project
break; break;
} }
Settings.Default.ProjectWindowTheme = themestr; if (changing)
Settings.Default.Save(); {
Settings.Default.ProjectWindowTheme = themestr;
Settings.Default.Save();
}
Theme.Extender.FloatWindowFactory = new ProjectFloatWindowFactory(); Theme.Extender.FloatWindowFactory = new ProjectFloatWindowFactory();

View File

@ -722,5 +722,17 @@ namespace CodeWalker.Properties {
this["ProjectWindowTheme"] = value; this["ProjectWindowTheme"] = value;
} }
} }
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Windows")]
public string ExplorerWindowTheme {
get {
return ((string)(this["ExplorerWindowTheme"]));
}
set {
this["ExplorerWindowTheme"] = value;
}
}
} }
} }

View File

@ -189,5 +189,8 @@
<Setting Name="ProjectWindowTheme" Type="System.String" Scope="User"> <Setting Name="ProjectWindowTheme" Type="System.String" Scope="User">
<Value Profile="(Default)">Blue</Value> <Value Profile="(Default)">Blue</Value>
</Setting> </Setting>
<Setting Name="ExplorerWindowTheme" Type="System.String" Scope="User">
<Value Profile="(Default)">Windows</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>