Completed the main functions

This commit is contained in:
NaBian committed 2019-05-23 23:50:07 +08:00
1 parent 54abf3c663
commit 6e3171259e
10 files changed
+195 -14

No files matched your search

@@ -1,8 +1,5 @@
using System;
using System.Globalization;
using System.Threading;
using System.Windows;
using HandyControl.Controls;
using HandyControl.Data;
using HandyControl.Tools;
using HandyControlDemo.Data;
@@ -23,6 +23,10 @@
hc:Dialog.Token="{x:Static data:MessageToken.MainWindow}"
d:DesignHeight="800"
d:DesignWidth="1400">
<hc:GlobalShortcut.KeyBindings>
<KeyBinding Modifiers="Control+Alt" Key="I" Command="{Binding GlobalShortcutInfoCmd}"/>
<KeyBinding Modifiers="Control+Alt" Key="E" Command="{Binding GlobalShortcutErrorCmd}"/>
</hc:GlobalShortcut.KeyBindings>
<hc:Window.NonClientAreaContent>
<userControl:NoUserContent/>
</hc:Window.NonClientAreaContent>
@@ -2,6 +2,7 @@
using System.ComponentModel;
using GalaSoft.MvvmLight.Messaging;
using HandyControl.Controls;
using HandyControl.Tools;
using HandyControlDemo.Data;
using HandyControlDemo.Tools;
@@ -21,6 +22,8 @@ namespace HandyControlDemo
Messenger.Default.Send<object>(null, MessageToken.ClearLeftSelected);
Messenger.Default.Send(true, MessageToken.FullSwitch);
Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{MessageToken.OverView}"), MessageToken.LoadShowContent);
GlobalShortcut.Init(this);
}
protected override void OnClosing(CancelEventArgs e)
@@ -6,6 +6,7 @@ using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.CommandWpf;
#endif
using GalaSoft.MvvmLight.Messaging;
using HandyControl.Controls;
using HandyControlDemo.Data;
using HandyControlDemo.Service;
using HandyControlDemo.Tools;
@@ -98,9 +99,15 @@ namespace HandyControlDemo.ViewModel
public RelayCommand OpenOverviewCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(OpenOverview)).Value;
#endregion
public RelayCommand GlobalShortcutInfoCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(() => Growl.Info("Global Shortcut Info"))).Value;
#region 方法
public RelayCommand GlobalShortcutErrorCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(() => Growl.Info("Global Shortcut Error"))).Value;
#endregion
#region 方法
/// <summary>
/// 切换例子