コード例 #1
0
        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();
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
            }
        }