diff --git a/Refs/4.0/ICSharpCode.Core.dll b/Refs/4.0/ICSharpCode.Core.dll deleted file mode 100644 index b48a78c..0000000 Binary files a/Refs/4.0/ICSharpCode.Core.dll and /dev/null differ diff --git a/Refs/4.0/ICSharpCode.SharpDevelop.dll b/Refs/4.0/ICSharpCode.SharpDevelop.dll deleted file mode 100644 index 207098a..0000000 Binary files a/Refs/4.0/ICSharpCode.SharpDevelop.dll and /dev/null differ diff --git a/Refs/4.1/ICSharpCode.Core.dll b/Refs/4.1/ICSharpCode.Core.dll deleted file mode 100644 index 0064824..0000000 Binary files a/Refs/4.1/ICSharpCode.Core.dll and /dev/null differ diff --git a/Refs/4.1/ICSharpCode.SharpDevelop.dll b/Refs/4.1/ICSharpCode.SharpDevelop.dll deleted file mode 100644 index 0902804..0000000 Binary files a/Refs/4.1/ICSharpCode.SharpDevelop.dll and /dev/null differ diff --git a/Refs/4.2/ICSharpCode.Core.dll b/Refs/4.2/ICSharpCode.Core.dll deleted file mode 100644 index 4e52160..0000000 Binary files a/Refs/4.2/ICSharpCode.Core.dll and /dev/null differ diff --git a/Refs/4.2/ICSharpCode.SharpDevelop.dll b/Refs/4.2/ICSharpCode.SharpDevelop.dll deleted file mode 100644 index 3124228..0000000 Binary files a/Refs/4.2/ICSharpCode.SharpDevelop.dll and /dev/null differ diff --git a/Refs/5.0/ICSharpCode.Core.dll b/Refs/5.0/ICSharpCode.Core.dll deleted file mode 100644 index a0fbf1d..0000000 Binary files a/Refs/5.0/ICSharpCode.Core.dll and /dev/null differ diff --git a/Refs/5.0/ICSharpCode.SharpDevelop.dll b/Refs/5.0/ICSharpCode.SharpDevelop.dll deleted file mode 100644 index 7180f61..0000000 Binary files a/Refs/5.0/ICSharpCode.SharpDevelop.dll and /dev/null differ diff --git a/Refs/AvalonDock.dll b/Refs/AvalonDock.dll index 695adea..6a10ae1 100644 Binary files a/Refs/AvalonDock.dll and b/Refs/AvalonDock.dll differ diff --git a/Refs/ICSharpCode.Core.dll b/Refs/ICSharpCode.Core.dll new file mode 100644 index 0000000..fdd0456 Binary files /dev/null and b/Refs/ICSharpCode.Core.dll differ diff --git a/Refs/ICSharpCode.SharpDevelop.dll b/Refs/ICSharpCode.SharpDevelop.dll new file mode 100644 index 0000000..cc3d1d3 Binary files /dev/null and b/Refs/ICSharpCode.SharpDevelop.dll differ diff --git a/ThemeTool/Configuration/AssemblyInfo.cs b/ThemeTool/Configuration/AssemblyInfo.cs index 42db2f6..15c7535 100644 --- a/ThemeTool/Configuration/AssemblyInfo.cs +++ b/ThemeTool/Configuration/AssemblyInfo.cs @@ -14,7 +14,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ThemeTool")] -[assembly: AssemblyCopyright("Copyright 2011")] +[assembly: AssemblyCopyright("Copyright 2011-2014")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/ThemeTool/Src/Command.cs b/ThemeTool/Src/Command.cs index c90d1e3..6831e9c 100644 --- a/ThemeTool/Src/Command.cs +++ b/ThemeTool/Src/Command.cs @@ -3,18 +3,14 @@ * Date: 24.08.2011 * Time: 0:39 */ + using System; using System.ComponentModel; -using System.Text; using System.Threading; using System.Windows.Forms; -using System.Windows.Media; using System.Windows.Threading; -using AvalonDock; using ICSharpCode.Core; -using ICSharpCode.SharpDevelop; -using ICSharpCode.SharpDevelop.Gui; namespace ThemeTool { @@ -131,7 +127,7 @@ public class ToolCommandCustom : AbstractMenuCommand { public override void Run() { - var colorDialog = new System.Windows.Forms.ColorDialog(); + var colorDialog = new ColorDialog(); var result = colorDialog.ShowDialog(); if (result == DialogResult.OK) { @@ -150,7 +146,7 @@ public override void Run() { try { - string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(this.GetType()).Location); + string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(GetType()).Location); System.Reflection.Assembly.LoadFrom(System.IO.Path.Combine(path, "AvalonDock.Themes.dll")); bw = new BackgroundWorker(); @@ -158,18 +154,17 @@ public override void Run() { try { + // TODO: if i replace code below as compiler says (Warning CS0618: 'ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainWindow' is obsolete: 'Use SD.Workbench.MainWindow instead') + // i've got error on startup command (something about #D inner services) while (ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainWindow == null) { Thread.Sleep(100); } ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainWindow.Dispatcher.Invoke - (DispatcherPriority.Normal, new System.Threading.ThreadStart + (DispatcherPriority.Normal, new ThreadStart ( delegate { - //string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(typeof(ToolSettings)).Location); - //string uri = "/AvalonDock.Themes;component/themes/dev2010.xaml"; - //ThemeFactory.ChangeTheme(new Uri(uri, UriKind.RelativeOrAbsolute)); var settings = new ToolSettings(); var theme = settings.LoadSettings(); settings.SetTheme(theme); @@ -179,13 +174,14 @@ public override void Run() } catch (Exception ex) { - MessageBox.Show(ex.ToString(), "ToolCommandStartup.Run()"); + MessageBox.Show(ex.ToString(), "ThemeTool Startup Error"); } }; bw.RunWorkerAsync(); } - catch + catch (Exception ex) { + MessageBox.Show(ex.ToString(), "ThemeTool Startup Error"); } } } diff --git a/ThemeTool/Src/ToolSettings.cs b/ThemeTool/Src/ToolSettings.cs index 1f84ce5..48be3ff 100644 --- a/ThemeTool/Src/ToolSettings.cs +++ b/ThemeTool/Src/ToolSettings.cs @@ -10,6 +10,7 @@ using System.IO; using System.Reflection; +using System.Windows.Forms; using AvalonDock; namespace ThemeTool @@ -30,14 +31,18 @@ public string LoadSettings() string result = string.Empty; try { - using (var sr = new StreamReader(Path.Combine(AssemblyFolderName, SettingsFileName))) + var settingsFileName= Path.Combine(AssemblyFolderName, SettingsFileName); + if (File.Exists(settingsFileName)) { - result = sr.ReadLine(); + using (var sr = new StreamReader(settingsFileName)) + { + result = sr.ReadLine(); + } } } - catch// (Exception ex) + catch (Exception ex) { - //System.Windows.Forms.MessageBox.Show(ex.ToString()); + MessageBox.Show("There was some error during loading settings:" + Environment.NewLine + ex, "ThemeTool Error"); } return result; } @@ -51,9 +56,9 @@ public void SaveSettings(string themeName) sw.WriteLine(themeName); } } - catch// (Exception ex) + catch (Exception ex) { - //System.Windows.Forms.MessageBox.Show(ex.ToString()); + MessageBox.Show("There was some error during saving settings:" + Environment.NewLine + ex, "ThemeTool Error"); } } @@ -104,9 +109,9 @@ public void SetTheme(string themeName) ThemeFactory.ResetTheme(); } } - catch// (Exception ex) + catch (Exception ex) { - //System.Windows.Forms.MessageBox.Show(ex.ToString(), "At ToolSettings.SetTheme()"); + MessageBox.Show("There was some error during applying theme:" + Environment.NewLine + ex, "ThemeTool Error"); } } } diff --git a/ThemeTool/ThemeTool.addin b/ThemeTool/ThemeTool.addin index 0ba9910..8f357ad 100644 --- a/ThemeTool/ThemeTool.addin +++ b/ThemeTool/ThemeTool.addin @@ -1,6 +1,6 @@  @@ -16,7 +16,7 @@ class = "ThemeTool.ToolCommandStartup"/> - + False True DEBUG;TRACE + obj\ bin\Release\ @@ -52,13 +53,13 @@ - ..\..\..\Portable\SharpDevelop\bin\AvalonDock.dll + ..\Refs\AvalonDock.dll - ..\..\..\Portable\SharpDevelop\bin\ICSharpCode.Core.dll + ..\Refs\ICSharpCode.Core.dll - ..\..\..\Portable\SharpDevelop\bin\ICSharpCode.SharpDevelop.dll + ..\Refs\ICSharpCode.SharpDevelop.dll 3.0 @@ -93,7 +94,7 @@ - PreserveNewest + Always