Commit daa1ccc6 by liulongfei

热键设置 bug修复

parent 0cb7ff64
......@@ -144,6 +144,11 @@ namespace VIZ.Package.Domain
public static bool IsSceneLoading { get; set; }
/// <summary>
/// 是否正在设置热键
/// </summary>
public static bool IsHotkeySetting { get; set; }
/// <summary>
/// 场景信息列表
/// </summary>
/// <remarks>
......
......@@ -36,6 +36,9 @@ namespace VIZ.Package.Module
/// <param name="key">热键</param>
public void BeginExecute(string key)
{
if (ApplicationDomainEx.IsHotkeySetting)
return;
if (string.IsNullOrWhiteSpace(key))
return;
......
......@@ -12,6 +12,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using VIZ.Framework.Core;
using VIZ.Package.Domain;
namespace VIZ.Package.Module
{
......@@ -25,6 +26,17 @@ namespace VIZ.Package.Module
InitializeComponent();
WPFHelper.BindingViewModel(this, new SettingWindowModel());
// 当前处于热键设置状态
ApplicationDomainEx.IsHotkeySetting = true;
this.Closed += SettingWindow_Closed;
}
private void SettingWindow_Closed(object sender, EventArgs e)
{
// 关闭当前热键设置状态
ApplicationDomainEx.IsHotkeySetting = false;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment