Exemplo n.º 1
0
        //Interraction with logic and UI
        public void Run(bool ifInvite = true)
        {
            InputParameters inpPara = new InputParameters();

            if (ifInvite)
            {
                InputParameters.OutputMsg(InputParameters.ABOUT);
                InputParameters.OutputMsg(InputParameters.WANT_TO_START);
            }

            bool contin = InputParameters.IfContinue(Console.ReadLine());

            while (contin)
            {
                SetOneContainer(inpPara);

                InputParameters.OutputMsg(string.Format("{0}  {1}", InputParameters.USERS_DATA, _containers.Last().ToString()));
                InputParameters.OutputMsg(InputParameters.LETS_EMBED);

                Subscribe(_containers.Last());
                CheckOneContainerForEmbedding();

                InputParameters.OutputMsg(InputParameters.CONTINUE);
                contin = InputParameters.IfContinue(Console.ReadLine());
            }

            Console.WriteLine(InputParameters.FINISH_APP);
        }
Exemplo n.º 2
0
        public void Run(string[] args)
        {
            if (args == null || args.Length == 0 || args.Length < 4)
            {
                Run();
            }

            InputParameters inpPara = new InputParameters();

            SetOneContainer(args[0], args[1], args[2], args[3], inpPara);
            InputParameters.OutputMsg(string.Format("{0}  {1}", InputParameters.USERS_DATA, _containers.Last().ToString()));
            InputParameters.OutputMsg(InputParameters.LETS_EMBED);

            Subscribe(_containers.Last());
            CheckOneContainerForEmbedding();

            InputParameters.OutputMsg(InputParameters.CONTINUE);
            if (InputParameters.IfContinue(Console.ReadLine()))
            {
                Run(false);
            }

            Console.WriteLine(InputParameters.FINISH_APP);
        }