public void Import(JsonGestureIntentStore from, bool replace = false)
        {
            if (from == null)
            {
                return;
            }

            if (replace)
            {
                GlobalApp.GestureIntents.Clear();
                GlobalApp.IsGesturingEnabled = from.GlobalApp.IsGesturingEnabled;
                ExeAppsRegistry.Clear();
            }

            GlobalApp.ImportGestures(from.GlobalApp);

            foreach (var kv in from.ExeAppsRegistry)
            {
                ExeApp appInSelf;
                //如果应用程序已经在列表中,则合并手势
                if (TryGetExeApp(kv.Key, out appInSelf))
                {
                    appInSelf.ImportGestures(kv.Value);
                    appInSelf.IsGesturingEnabled = appInSelf.IsGesturingEnabled && kv.Value.IsGesturingEnabled;
                }
                else//否则将app添加到列表中
                {
                    Add(kv.Value);
                }
            }
        }
 public void Remove(string key)
 {
     ExeAppsRegistry.Remove(key);
 }
 public void Add(ExeApp app)
 {
     ExeAppsRegistry.Add(app.ExecutablePath, app);
 }
 public bool TryGetExeApp(string key, out ExeApp found)
 {
     return(ExeAppsRegistry.TryGetValue(key, out found));
 }