Beispiel #1
0
        public Form1()
        {
            InitializeComponent();
            autoService = new AutoService();

            Task.Run(async() =>
            {
                autos = await autoService.GetAll();
                await Task.Delay(1000);
                this.Invoke(new MethodInvoker(() => pictureBoxLoading.Hide()));
                autos.ForEach(a => AddAutoToList(a));
            });
        }