Skip to content

Commit

Permalink
you are now able to change your keyboard shortcut, the default shortc…
Browse files Browse the repository at this point in the history
…ut is still hardcoded to Alt+F2
  • Loading branch information
srushti committed Aug 19, 2009
1 parent 4d80c77 commit f39c520
Show file tree
Hide file tree
Showing 21 changed files with 485 additions and 503 deletions.
9 changes: 6 additions & 3 deletions Azazel.4.5.resharper
Expand Up @@ -55,15 +55,13 @@
<ExceptionName IsNull="False">
</ExceptionName>
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Locals" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="NotPublicInstanceFields" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="NotPublicStaticFields" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Parameters" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Interfaces" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="TypeParameters" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="MethodPropertyEvent" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="LocalConstants" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PublicFields" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="PublicFields" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AA_BB" ElementKind="Constants">
<ExtraRule Prefix="" Suffix="" Style="AaBb" />
<ExtraRule Prefix="" Suffix="" Style="aaBb" />
Expand All @@ -73,7 +71,12 @@
</PredefinedRule>
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="PrivateInstanceFields" />
<PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />
<Abbreviation Text="FF" />
<Abbreviation Text="WPF" />
</Naming2>
</CodeStyleSettings>
<SharedSolutionTemplateManager>
Expand Down
2 changes: 1 addition & 1 deletion Azazel/App.xaml.cs
Expand Up @@ -15,7 +15,7 @@ public partial class App {
return;
}
}
var command = new MainWindowCommand(Shutdown);
var command = new MainWindowCommand(Shutdown, new AppSettings());
command.Execute();
command.Collapse();
DispatcherUnhandledException += (sender, args) => {
Expand Down
8 changes: 5 additions & 3 deletions Azazel/AppFinder.cs
Expand Up @@ -12,14 +12,16 @@ namespace Azazel {
public class AppFinder {
private readonly History history;
private readonly XStream xstream;
private readonly PersistanceHelper persistanceHelper;
private Launchables allLaunchables;
private readonly CharacterPlugins characterPlugins;
private LaunchablesDictionary dictionary;

public AppFinder(LaunchablePlugins launchablePlugins, CharacterPlugins characterPlugins, XStream xstream) {
public AppFinder(LaunchablePlugins launchablePlugins, CharacterPlugins characterPlugins, XStream xstream, PersistanceHelper persistanceHelper) {
this.xstream = xstream;
this.persistanceHelper = persistanceHelper;
LoadFiles(launchablePlugins);
history = new History(new File(new FileInfo(Paths.Instance.History)), this.xstream);
history = new History(new File(new FileInfo(Paths.Instance.History)), this.xstream, persistanceHelper);
this.characterPlugins = characterPlugins;
}

Expand All @@ -35,7 +37,7 @@ public class AppFinder {
}

private Folders LoadFoldersToParse() {
return PersistanceHelper.LoadOrSaveAndLoad(xstream, Paths.Instance.Folders,
return persistanceHelper.LoadOrSaveAndLoad(Paths.Instance.Folders,
new Folders(Folders.QuickLaunch, Folders.StartMenu, Folders.AllUsersStartMenu));
}

Expand Down
21 changes: 17 additions & 4 deletions Azazel/AppSettings.cs
Expand Up @@ -2,14 +2,27 @@

namespace Azazel {
public class AppSettings {
private Hotkeys appHotkeys;
public HotkeysChangedHandler HotkeysChanged = hotkeys => { };

public Hotkeys AppHotkeys {
get { return appHotkeys; }
set {
appHotkeys = value;
HotkeysChanged(appHotkeys);
}
}
}

public delegate void HotkeysChangedHandler(Hotkeys hotkeys);

public class Hotkeys {
public readonly Hotkey DisplayHotKey;
public readonly Hotkey KillHotKey;

public AppSettings() {}
protected Hotkeys() {}

public AppSettings(Hotkey displayHotKey, Hotkey killHotKey) {
public Hotkeys(Hotkey displayHotKey) {
DisplayHotKey = displayHotKey;
KillHotKey = killHotKey;
}
}
}

0 comments on commit f39c520

Please sign in to comment.