Example #1
0
        private static void CreateButtonLayout(string[] args)
        {
            if (args.Length == 1)
            {
                if (!SerialCommunication.LayoutExists(args[0]))
                {
                    string name = args[0].ToLower().Trim();

                    Console.Write("Button A: ");
                    string command_a = Console.ReadLine().ToLower().Trim();

                    Console.Write("Button B: ");
                    string command_b = Console.ReadLine().ToLower().Trim();

                    SerialCommunication.CreateLayout(new string[] { name, command_a, command_b });
                }
                else
                {
                    Console.WriteLine("Layout already exists!");
                }
            }
        }