Example #1
0
        public void Start()
        {
            smKeyboard.Initialize();

            Console.WriteLine("Keyboard Demo Started\r\n");
            Console.WriteLine(smKeyboard.GetAllActiveStateNames().Aggregate((a, b) => a + " - " + b));
            Console.WriteLine();

            bool continueDemo = true;

            do
            {
                string input = Console.ReadLine().Trim();
                switch (input)
                {
                case "1":
                    sigNumLock.Emit();
                    break;

                case "2":
                    sigCapsLock.Emit();
                    break;

                case "3":
                    sigScrollLock.Emit();
                    break;

                default:
                    continueDemo = false;
                    break;
                }

                Console.WriteLine();
                Console.WriteLine(smKeyboard.GetAllActiveStateNames().Aggregate((a, b) => a + " - " + b));
                Console.WriteLine();
            } while (continueDemo);

            smKeyboard.Terminate();

            Console.WriteLine("\r\nKeyboard Demo finished");
        }
Example #2
0
        public void Start()
        {
            smComplicated.Initialize();

            Console.WriteLine("Complicated Demo Started\r\n");
            Console.WriteLine(smComplicated.GetAllActiveStateNames().Aggregate((a, b) => a + " - " + b));
            Console.WriteLine();

            bool continueDemo = true;

            do
            {
                string input = Console.ReadLine().Trim();
                switch (input)
                {
                case "1":
                    sig1.Emit();
                    break;

                case "2":
                    sig2.Emit();
                    break;

                case "3":
                    sig3.Emit();
                    break;

                case "4":
                    sig4.Emit();
                    break;

                case "5":
                    sig5.Emit();
                    break;

                default:
                    continueDemo = false;
                    break;
                }

                Console.WriteLine();
                Console.WriteLine(smComplicated.GetAllActiveStateNames().Aggregate((a, b) => a + " - " + b));
                Console.WriteLine();
            } while (continueDemo);

            smComplicated.Terminate();

            Console.WriteLine("Complicated Demo Finished\r\n");
        }
Example #3
0
        public void Start()
        {
            smScenario1.Initialize();

            Console.WriteLine("Scenario1 Started\r\n");
            Console.WriteLine(smScenario1.GetAllActiveStateNames().Aggregate((a, b) => a + " - " + b));
            Console.WriteLine();

            bool continueDemo = true;

            do
            {
                string input = Console.ReadLine().Trim();
                switch (input)
                {
                case "1":
                    sigA1.Emit();
                    break;

                case "2":
                    sigB1.Emit();
                    break;

                case "3":
                    sigC1.Emit();
                    break;

                default:
                    continueDemo = false;
                    break;
                }

                Console.WriteLine();
                Console.WriteLine(smScenario1.GetAllActiveStateNames().Aggregate((a, b) => a + " - " + b));
                Console.WriteLine();
            } while (continueDemo);

            smScenario1.Terminate();

            Console.WriteLine("Scenario1 Finished\r\n");
        }
        public void Start()
        {
            SM.Initialize();

            Console.WriteLine("Camera Transitionless Demo Started\r\n");
            Console.WriteLine(SM.GetAllActiveStateNamesAsString().Aggregate((a, b) => a + " - " + b));
            Console.WriteLine();

            bool continueDemo = true;

            do
            {
                string input = Console.ReadLine().Trim();
                switch (input)
                {
                case "1":
                    sigConfig.Emit();
                    break;

                case "2":
                    sigHalfPressed.Emit();
                    break;

                case "3":
                    sigReleased.Emit();
                    break;

                default:
                    continueDemo = false;
                    break;
                }

                Console.WriteLine();
                Console.WriteLine(SM.GetAllActiveStateNamesAsString().Aggregate((a, b) => a + " - " + b));
                Console.WriteLine();
            } while (continueDemo);

            SM.Terminate();

            Console.WriteLine("\r\nCamera Transitionless Demo finished");
        }
Example #5
0
        public void Start()
        {
            smStopwatch.Initialize();

            Console.WriteLine("Stopwatch Demo Started\r\n");
            Console.WriteLine(smStopwatch.GetAllActiveStateNames().Aggregate((a, b) => a + " - " + b));
            Console.WriteLine();

            bool continueDemo = true;

            do
            {
                string input = Console.ReadLine().Trim();
                switch (input)
                {
                case "1":
                    sigReset.Emit();
                    break;

                case "2":
                    sigStartStop.Emit();
                    break;

                default:
                    continueDemo = false;
                    break;
                }

                Console.WriteLine();
                Console.WriteLine(smStopwatch.GetAllActiveStateNames().Aggregate((a, b) => a + " - " + b));
                Console.WriteLine();
            } while (continueDemo);

            smStopwatch.Terminate();

            Console.WriteLine("\r\nStopwatch Demo finished");
        }
Example #6
0
        public void Start()
        {
            smTrans.Initialize();

            Console.WriteLine("Transition Condition Demo Started\r\n");
            Console.WriteLine(smTrans.GetAllActiveStateNames().Aggregate((a, b) => a + " - " + b));
            Console.WriteLine();

            bool continueDemo = true;

            do
            {
                string input = Console.ReadLine().Trim();
                switch (input)
                {
                case "1":
                    signalA.Emit();
                    break;

                case "2":
                    signalB.Emit();
                    break;

                default:
                    continueDemo = false;
                    break;
                }

                Console.WriteLine();
                Console.WriteLine(smTrans.GetAllActiveStateNames().Aggregate((a, b) => a + " - " + b));
                Console.WriteLine();
            } while (continueDemo);

            smTrans.Terminate();

            Console.WriteLine("Transition Condition Finished\r\n");
        }