Exemple #1
0
        public void TelaInicialCadastro()
        {
            bool c = true;
            int  x;

            do
            {
                try
                {
                    Console.Clear();

                    Console.WriteLine("[1] Cadastrar Veículo \n[2] Consultar Veículo\n[3] Tela Inicial");
                    x = int.Parse(Console.ReadLine());

                    if (x < 1 || x > 3)
                    {
                        Console.WriteLine("Opção inválida! 3");
                        Console.ReadLine();
                    }
                    else
                    {
                        switch (x)
                        {
                        case 3:
                            c = false;
                            //Environment.Exit(0);
                            break;

                        case 1:
                            ConsultarAluno();
                            break;

                        case 2:
                            V.ConsultarVeiculo(alunos);
                            break;
                        }
                    }
                }
                catch (Exception)
                {
                    Console.WriteLine("Opção inválida! 4");
                    Console.ReadLine();
                }
            } while (c);
        }