Skip to content

Commit

Permalink
- Removed old references from repository
Browse files Browse the repository at this point in the history
+ Added libaries from #D 5.0.0.3654 (#D 5 beta1) and project was linked to them
~ Changed .addin file according to Michael Seeger comment: http://community.sharpdevelop.net/forums/p/13730/50818.aspx#50818 (thanks, Michael)
~ Some minor changes in code files
  • Loading branch information
AlienJust committed Jan 27, 2014
1 parent d5135f9 commit 6f839ba
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 28 deletions.
Binary file removed Refs/4.0/ICSharpCode.Core.dll
Binary file not shown.
Binary file removed Refs/4.0/ICSharpCode.SharpDevelop.dll
Binary file not shown.
Binary file removed Refs/4.1/ICSharpCode.Core.dll
Binary file not shown.
Binary file removed Refs/4.1/ICSharpCode.SharpDevelop.dll
Binary file not shown.
Binary file removed Refs/4.2/ICSharpCode.Core.dll
Binary file not shown.
Binary file removed Refs/4.2/ICSharpCode.SharpDevelop.dll
Binary file not shown.
Binary file removed Refs/5.0/ICSharpCode.Core.dll
Binary file not shown.
Binary file removed Refs/5.0/ICSharpCode.SharpDevelop.dll
Binary file not shown.
Binary file modified Refs/AvalonDock.dll
Binary file not shown.
Binary file added Refs/ICSharpCode.Core.dll
Binary file not shown.
Binary file added Refs/ICSharpCode.SharpDevelop.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion ThemeTool/Configuration/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ThemeTool")]
[assembly: AssemblyCopyright("Copyright 2011")]
[assembly: AssemblyCopyright("Copyright 2011-2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
22 changes: 9 additions & 13 deletions ThemeTool/Src/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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)
{
Expand All @@ -150,26 +146,25 @@ 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();
bw.DoWork += delegate
{
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);
Expand All @@ -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");
}
}
}
Expand Down
21 changes: 13 additions & 8 deletions ThemeTool/Src/ToolSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.IO;
using System.Reflection;

using System.Windows.Forms;
using AvalonDock;

namespace ThemeTool
Expand All @@ -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;
}
Expand All @@ -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");
}
}

Expand Down Expand Up @@ -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");
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions ThemeTool/ThemeTool.addin
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<AddIn name = "ThemeTool"
author = "AJ01"
url = "skype://AlienJust"
url = "https://github.com/AlienJust/ThemeTool"
description = "Themes For AvalonDock">

<Manifest>
Expand All @@ -16,7 +16,7 @@
class = "ThemeTool.ToolCommandStartup"/>
</Path>

<Path name = "/SharpDevelop/Workbench/MainMenu/Tools">
<Path name = "/SharpDevelop/Workbench/Tools">
<MenuItem id="ThemeToolsRoot" label="Theme Tool" type="Menu">
<MenuItem id = "ThemeToolCommandDefault"
label = "Default"
Expand Down
9 changes: 5 additions & 4 deletions ThemeTool/ThemeTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
Expand All @@ -52,13 +53,13 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="AvalonDock">
<HintPath>..\..\..\Portable\SharpDevelop\bin\AvalonDock.dll</HintPath>
<HintPath>..\Refs\AvalonDock.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.Core">
<HintPath>..\..\..\Portable\SharpDevelop\bin\ICSharpCode.Core.dll</HintPath>
<HintPath>..\Refs\ICSharpCode.Core.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpDevelop">
<HintPath>..\..\..\Portable\SharpDevelop\bin\ICSharpCode.SharpDevelop.dll</HintPath>
<HintPath>..\Refs\ICSharpCode.SharpDevelop.dll</HintPath>
</Reference>
<Reference Include="PresentationCore">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
Expand Down Expand Up @@ -93,7 +94,7 @@
<ItemGroup>
<None Include="AddInWritingHelp.txt" />
<None Include="ThemeTool.addin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit 6f839ba

Please sign in to comment.