Beispiel #1
0
        public static string GetInputGestureText(InputGestureCollection gestures)
        {
            if (gestures == null) return null;

            List<KeyGesture> ShortCutKeys = gestures.OfType<KeyGesture>().ToList();

            string ret = "";
            ShortCutKeys.ForEach(item => ret += (ret.Count() != 0 ? ", " : "") + GetInputGestureText(item));
            return ret == "" ? null : ret;
        }
Beispiel #2
0
 public void SetGestuers(InputGestureCollection igc)
 {
     ShortCuts = new List<ShortCutData>();
     foreach (var kg in igc.OfType<KeyGesture>()) { ShortCuts.Add(new ShortCutData(kg)); }
 }