public static void AssignFunction(string name, string category, string value) { ComputeGesture gesture = settings.Where(x => x.name == name).First(); gesture.category = category; gesture.value = value; WriteToFile(); LoadSettings(); }
public static List <string> GetGesture(int idx) { ComputeGesture ges = settings[idx]; List <string> g = new List <string>(); g.Add(ges.name); g.Add(ges.category); g.Add(ges.value); return(g); }
public static void Compute(string name) { LoadSettings(); ComputeGesture gesture = settings.Where(x => x.name == name).First(); if (gesture.category == "open") { System.Diagnostics.Process.Start(gesture.value); } else if (gesture.category == "key") { SendKeys.SendWait(gesture.value); } }