async Task ExecuteLoadMarinesCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                Marines.Clear();
                var marines = await DataStore.GetMarinesAsync(true);

                //var counter = 1;
                foreach (var marine in marines)
                {
                    //marine.Order = counter;
                    Marines.Add(marine);
                    //counter++;
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Пример #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("EX 7A - C# - Military Unit (Implementing Inheritance)\n");


            Marines myMarines = new Marines();

            Marines.Talk();
            myMarines.Motivate();

            Console.WriteLine();

            JuniorEnlisted juniorMarine = new JuniorEnlisted();

            JuniorEnlisted.Dedication();
            juniorMarine.Motivate();

            Console.WriteLine();

            Nco myNCO = new Nco();

            Nco.Greetings();
            myNCO.Motivate();

            Console.WriteLine();

            TactVehicles vehicles = new TactVehicles();

            TactVehicles.StartUp();
            TactVehicles.GoFast();
            vehicles.Stop();

            Console.WriteLine();

            Atv allTerrain = new Atv();

            Atv.TopSpeed();
            allTerrain.Stop();

            Console.WriteLine();

            Hmmwv myhmmwvv = new Hmmwv();

            Hmmwv.Speed();
            myhmmwvv.Stop();
        }