diff --git a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/App.xaml b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/App.xaml
deleted file mode 100644
index e9e4c1ddeef..00000000000
--- a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/App.xaml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/App.xaml.cs b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/App.xaml.cs
deleted file mode 100644
index 70a7bada785..00000000000
--- a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/App.xaml.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System.Windows;
-using ICSharpCode.Core;
-
-namespace ICSharpCode.ShortcutsManagement
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public partial class App : Application
- {
- public App() {
- Startup += App_Startup;
- }
-
- void App_Startup(object sender, StartupEventArgs e)
- {
- PropertyService.InitializeService(".", ".", ".");
- PropertyService.Load();
-
- ResourceService.InitializeService(FileUtility.Combine(PropertyService.DataDirectory, "resources"));
- }
- }
-}
diff --git a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/ShortcutsManagement.csproj b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/ShortcutsManagement.csproj
index ab74bd7475e..75d13a08ef3 100644
--- a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/ShortcutsManagement.csproj
+++ b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/ShortcutsManagement.csproj
@@ -25,6 +25,8 @@
False
True
DEBUG;TRACE
+ Program
+ ..\..\..\..\..\bin\SharpDevelop.exe
bin\Release\
@@ -41,6 +43,10 @@
AnyCPU
4096
+
+ Program
+ C:\VSC\SharpDevelop40\SharpDevelop\bin\SharpDevelop.exe
+
3.0
@@ -56,9 +62,6 @@
-
- App.xaml
-
@@ -71,6 +74,7 @@
+
@@ -94,9 +98,6 @@
-
- Window1.xaml
-
@@ -129,7 +130,6 @@
-
@@ -137,7 +137,6 @@
-
diff --git a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/ShortcutsManagement.csproj.user b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/ShortcutsManagement.csproj.user
index 0c6a24d00a6..6a34e7dcdf5 100644
--- a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/ShortcutsManagement.csproj.user
+++ b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/ShortcutsManagement.csproj.user
@@ -1,8 +1,4 @@
-
- Program
- C:\VSC\SharpDevelop40\SharpDevelop\bin\SharpDevelop.exe
-
ShowAllFiles
diff --git a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/AdditionConverter.cs b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/AdditionConverter.cs
index d32ff918205..10fc55f2a79 100644
--- a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/AdditionConverter.cs
+++ b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/AdditionConverter.cs
@@ -4,40 +4,38 @@
namespace ICSharpCode.ShortcutsManagement.Converters
{
- ///
- /// Converts double value to another double value by adding another value provided in converter parameter
- ///
- class AddidionConverter : IValueConverter
- {
- ///
- /// Convert double value to another double value by adding another value provided in converter parameter
- ///
- /// Original double value
- /// Convertion target type
- /// Another double value to be added to original value
- /// Not used
- /// New double value
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- double additionParameter = 0;
- var additionParameterString = parameter as string;
- if (additionParameterString != null)
- {
- Double.TryParse(additionParameterString, out additionParameter);
- }
-
- if(value is double)
- {
- var doubleValue = (double)value;
- return doubleValue + additionParameter;
- }
-
- return value;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotSupportedException();
- }
- }
+ ///
+ /// Converts double value to another double value by adding another value provided in converter parameter
+ ///
+ class AddidionConverter : IValueConverter
+ {
+ ///
+ /// Convert double value to another double value by adding another value provided in converter parameter
+ ///
+ /// Original double value
+ /// Convertion target type
+ /// Another double value to be added to original value
+ /// Not used
+ /// New double value
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ double additionParameter = 0;
+ var additionParameterString = parameter as string;
+ if (additionParameterString != null) {
+ Double.TryParse(additionParameterString, out additionParameter);
+ }
+
+ if(value is double) {
+ var doubleValue = (double)value;
+ return doubleValue + additionParameter;
+ }
+
+ return value;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotSupportedException();
+ }
+ }
}
diff --git a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/BoolToVisibilityConverter.cs b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/BoolToVisibilityConverter.cs
index b7bdf4df198..3f392f1e313 100644
--- a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/BoolToVisibilityConverter.cs
+++ b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/BoolToVisibilityConverter.cs
@@ -5,33 +5,32 @@
namespace ICSharpCode.ShortcutsManagement.Converters
{
- ///
- /// Converts boolean value to enum
- ///
- public class BoolToVisibilityConverter : IValueConverter
- {
- ///
- /// Convert forward
- ///
- /// Boolean value
- /// Target type (Only string is supported)
- /// Hide type (Hidden - reserve space but don't show, Collapse - do not reserve space)
- /// Culture info (Invariant culture is used always)
- /// Visibility value
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if(value is bool)
- {
- var hidden = parameter ?? "Hidden";
- return (bool)value ? "Visible" : hidden;
- }
-
- throw new NotSupportedException();
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotSupportedException();
- }
- }
+ ///
+ /// Converts boolean value to enum
+ ///
+ public class BoolToVisibilityConverter : IValueConverter
+ {
+ ///
+ /// Convert forward
+ ///
+ /// Boolean value
+ /// Target type (Only string is supported)
+ /// Hide type (Hidden - reserve space but don't show, Collapse - do not reserve space)
+ /// Culture info (Invariant culture is used always)
+ /// Visibility value
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if(value is bool) {
+ var hidden = parameter ?? "Hidden";
+ return (bool)value ? "Visible" : hidden;
+ }
+
+ throw new NotSupportedException();
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotSupportedException();
+ }
+ }
}
diff --git a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/GesturesCollectionConverter.cs b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/GesturesCollectionConverter.cs
index 6baa8753877..e69234fc62a 100644
--- a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/GesturesCollectionConverter.cs
+++ b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/GesturesCollectionConverter.cs
@@ -7,40 +7,40 @@
namespace ICSharpCode.ShortcutsManagement.Converters
{
- ///
- /// Converts input gestures collection into string
- ///
- public class GesturesListConverter : IValueConverter
- {
- ///
- /// Convert collection of gestures to a string
- ///
- /// Collection of gestures
- /// Convertion target type (only string is supported)
- /// Not used
- /// Not used
- /// String representing collection of gestures
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- string converterValue = "";
- if (value is InputGestureCollection && (targetType == typeof(string) || targetType.IsSubclassOf(typeof(string)))) {
- converterValue = new InputGestureCollectionConverter().ConvertToInvariantString(value);
- }
-
- if (value is ObservableCollection && (targetType == typeof(string) || targetType.IsSubclassOf(typeof(string)))) {
- var inputGestureCollection = new InputGestureCollection();
- foreach (var gesture in (ObservableCollection)value) {
- inputGestureCollection.Add(gesture);
- }
- converterValue = new InputGestureCollectionConverter().ConvertToInvariantString(inputGestureCollection);
- }
-
- return converterValue.Replace("+", " + ").Replace(",", ", ").Replace(";", "; ");
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotSupportedException();
- }
- }
+ ///
+ /// Converts input gestures collection into string
+ ///
+ public class GesturesListConverter : IValueConverter
+ {
+ ///
+ /// Convert collection of gestures to a string
+ ///
+ /// Collection of gestures
+ /// Convertion target type (only string is supported)
+ /// Not used
+ /// Not used
+ /// String representing collection of gestures
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ string converterValue = "";
+ if (value is InputGestureCollection && (targetType == typeof(string) || targetType.IsSubclassOf(typeof(string)))) {
+ converterValue = new InputGestureCollectionConverter().ConvertToInvariantString(value);
+ }
+
+ if (value is ObservableCollection && (targetType == typeof(string) || targetType.IsSubclassOf(typeof(string)))) {
+ var inputGestureCollection = new InputGestureCollection();
+ foreach (var gesture in (ObservableCollection)value) {
+ inputGestureCollection.Add(gesture);
+ }
+ converterValue = new InputGestureCollectionConverter().ConvertToInvariantString(inputGestureCollection);
+ }
+
+ return converterValue.Replace("+", " + ").Replace(",", ", ").Replace(";", "; ");
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotSupportedException();
+ }
+ }
}
diff --git a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/InputGestureConverter.cs b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/InputGestureConverter.cs
index d71a7aa4bf0..4a0a69f7285 100644
--- a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/InputGestureConverter.cs
+++ b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/InputGestureConverter.cs
@@ -6,38 +6,36 @@
namespace ICSharpCode.ShortcutsManagement.Converters
{
- ///
- /// Converts input gesture to string representation
- ///
- public class InputGestureConverter : IValueConverter
- {
- ///
- /// Convert input gesture to string
- ///
- /// Input gesture
- /// Convertion target type (Only string is supported)
- /// Not used
- /// Not used
- ///
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if (value is KeyGesture && targetType == typeof(string))
- {
- var gestures = new InputGestureCollection(new[] {value});
- return new InputGestureCollectionConverter().ConvertToInvariantString(gestures).Replace("+", " + ").Replace(",", ", ");
- }
-
- if(value is MouseGesture && targetType == typeof(string))
- {
- return new MouseGestureConverter().ConvertToInvariantString(value);
- }
-
- return "";
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotSupportedException();
- }
- }
+ ///
+ /// Converts input gesture to string representation
+ ///
+ public class InputGestureConverter : IValueConverter
+ {
+ ///
+ /// Convert input gesture to string
+ ///
+ /// Input gesture
+ /// Convertion target type (Only string is supported)
+ /// Not used
+ /// Not used
+ /// String representing
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is KeyGesture && targetType == typeof(string)) {
+ var gestures = new InputGestureCollection(new[] {value});
+ return new InputGestureCollectionConverter().ConvertToInvariantString(gestures).Replace("+", " + ").Replace(",", ", ");
+ }
+
+ if(value is MouseGesture && targetType == typeof(string)) {
+ return new MouseGestureConverter().ConvertToInvariantString(value);
+ }
+
+ return "";
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotSupportedException();
+ }
+ }
}
diff --git a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/NotNullOrEmptyConverter.cs b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/NotNullOrEmptyConverter.cs
index a71070aa252..f862707bd39 100644
--- a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/NotNullOrEmptyConverter.cs
+++ b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/NotNullOrEmptyConverter.cs
@@ -4,32 +4,31 @@
namespace ICSharpCode.ShortcutsManagement.Converters
{
- ///
- /// Converts null and empty string to true and all other values to false
- ///
- class NotNullOrEmptyConverter : IValueConverter
- {
- ///
- /// Converts null and empty string to true and all other values to false
- ///
- /// String or any other object
- /// Convertion target type
- /// Not used
- /// Not used
- /// Bool value
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if ((value is string && !string.IsNullOrEmpty((string)value)) || (!(value is string) && value != null))
- {
- return true;
- }
-
- return false;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotSupportedException();
- }
- }
+ ///
+ /// Converts null and empty string to true and all other values to false
+ ///
+ class NotNullOrEmptyConverter : IValueConverter
+ {
+ ///
+ /// Converts null and empty string to true and all other values to false
+ ///
+ /// String or any other object
+ /// Convertion target type
+ /// Not used
+ /// Not used
+ /// Bool value
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if ((value is string && !string.IsNullOrEmpty((string)value)) || (!(value is string) && value != null)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotSupportedException();
+ }
+ }
}
diff --git a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/ProfileToStringConverter.cs b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/ProfileToStringConverter.cs
index 9b32dc5e122..9eeef334e5e 100644
--- a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/ProfileToStringConverter.cs
+++ b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/ProfileToStringConverter.cs
@@ -6,39 +6,37 @@
namespace ICSharpCode.ShortcutsManagement.Converters
{
- ///
- /// Converts profile to representing string
- ///
- public class ProfileToStringConverter : IValueConverter
- {
- ///
- /// Converts profile to representing string
- ///
- /// UserGestureProfile instance
- /// Convertion target type (only string is supported)
- /// Not supported
- /// Not supported
- /// String representing instance of UserGestureProfile
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- var profile = value as UserGestureProfile;
- if(profile != null)
- {
- var readOnlyString = "";
- if(profile.ReadOnly)
- {
- readOnlyString = string.Format(" ({0})", StringParser.Parse("${res:ShortcutsManagement.ReadOnly}"));
- }
-
- return profile.Text + readOnlyString;
- }
-
- return value;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotSupportedException();
- }
- }
+ ///
+ /// Converts profile to representing string
+ ///
+ public class ProfileToStringConverter : IValueConverter
+ {
+ ///
+ /// Converts profile to representing string
+ ///
+ /// UserGestureProfile instance
+ /// Convertion target type (only string is supported)
+ /// Not supported
+ /// Not supported
+ /// String representing instance of UserGestureProfile
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ var profile = value as UserGestureProfile;
+ if(profile != null) {
+ var readOnlyString = "";
+ if(profile.ReadOnly) {
+ readOnlyString = string.Format(" ({0})", StringParser.Parse("${res:ShortcutsManagement.ReadOnly}"));
+ }
+
+ return profile.Text + readOnlyString;
+ }
+
+ return value;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotSupportedException();
+ }
+ }
}
diff --git a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/ProfilesComboBoxItemStyleSelector.cs b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/ProfilesComboBoxItemStyleSelector.cs
index 5ad03e7d013..c383b038d67 100644
--- a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/ProfilesComboBoxItemStyleSelector.cs
+++ b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/ProfilesComboBoxItemStyleSelector.cs
@@ -4,30 +4,28 @@
namespace ICSharpCode.ShortcutsManagement.Converters
{
- ///
- /// Selects profilesComboBox item style
- ///
- public class ProfilesComboBoxItemStyleSelector : StyleSelector
- {
- ///
- /// Selects profilesComboBox item style
- ///
- /// Item contained in ComboBoxItem
- /// ComboBoxItem container
- /// ComboBoxItem style
- public override Style SelectStyle(object item, DependencyObject container)
- {
- if(item is SeparatorData)
- {
- return (Style)((FrameworkElement)container).FindResource("SeparatorStyle");
- }
-
- if(item is UserGestureProfileAction)
- {
- return (Style)((FrameworkElement)container).FindResource("ProfileActionStyle");
- }
-
- return null;
- }
- }
+ ///
+ /// Selects profilesComboBox item style
+ ///
+ public class ProfilesComboBoxItemStyleSelector : StyleSelector
+ {
+ ///
+ /// Selects profilesComboBox item style
+ ///
+ /// Item contained in ComboBoxItem
+ /// ComboBoxItem container
+ /// ComboBoxItem style
+ public override Style SelectStyle(object item, DependencyObject container)
+ {
+ if(item is SeparatorData) {
+ return (Style)((FrameworkElement)container).FindResource("SeparatorStyle");
+ }
+
+ if(item is UserGestureProfileAction) {
+ return (Style)((FrameworkElement)container).FindResource("ProfileActionStyle");
+ }
+
+ return null;
+ }
+ }
}
diff --git a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/ShortcutCategorySubElementsMergedConverter.cs b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/ShortcutCategorySubElementsMergedConverter.cs
index 7d17ef5a885..faf02d26a60 100644
--- a/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/ShortcutCategorySubElementsMergedConverter.cs
+++ b/src/AddIns/Misc/ShortcutsManagement/ShortcutsManagement/Src/Converters/ShortcutCategorySubElementsMergedConverter.cs
@@ -7,31 +7,31 @@
namespace ICSharpCode.ShortcutsManagement.Converters
{
- ///
- /// Merges category's sub-categories and shortcuts into one list
- ///
- public class ShortcutCategorySubElementsMergedConverter : IMultiValueConverter
- {
- ///
- /// Merge category's sub-categories and shortcuts into one list
- ///
- /// List of sub-categories and list of shortcuts
- /// Not used
- /// Not used
- /// Not used
- /// List of objects where objects are either a shortcut category or a shortcut
- public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
- {
- var items = new List