Exemplo n.º 1
0
 private void Show()
 {
     ioComponent.WriteOutputLine("--------------");
     foreach (int num in m_arrayDoorsValue)
     {
         ioComponent.WriteOutput(num + " ");
     }
     ioComponent.WriteOutputLine();
     ioComponent.WriteOutputLine("--------------");
 }
Exemplo n.º 2
0
        private int GetUserNumber()
        {
            bool isNumber = false;
            int  enteredNum;

            do
            {
                if (int.TryParse(Console.ReadLine(), out enteredNum))
                {
                    ioComp.WriteOutput(phraseProvider.GetPhrase("Selected") + $"{enteredNum}");
                    if (this.CheckInput(enteredNum) != -1)
                    {
                        isNumber = true;
                    }
                }

                else
                {
                    ioComp.WriteOutput(phraseProvider.GetPhrase("NotNumber"));
                }
            }while (!isNumber);
            return(enteredNum);
        }