Exemple #1
0
        static async Task Main(string[] args)
        {
            (int, string)result = (0, null);
            string           input             = null;
            string           LetterString      = null;
            SolarSystemModel ChosenSolarSystem = null;
            int  Numbers = 0;
            bool running = true;

            while (running)
            {
                result = await InputUiParts.GetInputAndParse(input);

                Numbers      = result.Item1;
                LetterString = result.Item2;

                while (ChosenSolarSystem == null)
                {
                    result = await InputUiParts.GetInputAndParse(input);

                    ChosenSolarSystem = await SolarSystemUIComponents.SetChosenSolarSystem(result);
                }

                if (ChosenSolarSystem != null)
                {
                    result = await InputUiParts.GetInputAndParse(input);

                    Numbers      = result.Item1;
                    LetterString = result.Item2;
                }

                if (LetterString != null)
                {
                    if (ChosenSolarSystem != null)
                    {
                        InputUiParts.MainMenuComp(LetterString, ChosenSolarSystem);
                    }
                }
            }
        }
        public static async void PlanetPageRendering(SolarSystemModel ChosenSolarSystem)
        {
            string input        = null;
            string LetterString = null;
            string NumberString = null;
            long   Numbers;

            while (true)
            {
                (int, string)result = await InputUiParts.GetInputAndParse(input);

                Numbers      = result.Item1;
                LetterString = result.Item2;

                if (LetterString != null)
                {
                    if (LetterString == "q")
                    {
                        Environment.Exit(0);
                    }
                }
            }
        }