using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace wispro.sp.web.Pages
{
    public partial class StartPerformanceCalculation
    {
        public class Model
        {
            public DateTime? Month { get; set; } = DateTime.Now.AddMonths(-1);

        }


        private Model model = new Model();

        int _percent1, _percent2, _percent3, _percent4, _percent5, _percent6;
        string v1 = "hidden";
        string v2 = "hidden";
        string v3 = "hidden";
        string v4 = "hidden";
        string v5 = "hidden";
        string v6 = "hidden";

        private async Task start()
        {
            _percent1 = 0;
            _percent2 = 0;
            _percent3 = 0;
            _percent4 = 0;
            _percent5 = 0;



            v1 = "visible";
            while (_percent1 < 100)
            {
                _percent1++;
                StateHasChanged();
                await Task.Delay(50);
            }

            v2 = "visible";
            
            while (_percent2 < 100)
            {
                _percent2++;
                StateHasChanged();
                await Task.Delay(50);
            }
            v3 = "visible";
            
            while (_percent3 < 100)
            {
                _percent3++;
                StateHasChanged();
                await Task.Delay(50);
            }
            v4 = "visible";
            
            while (_percent4 < 100)
            {
                _percent4++;
                StateHasChanged();
                await Task.Delay(50);
            }
            v5 = "visible";
            while (_percent5 < 100)
            {
                _percent5++;
                StateHasChanged();
                await Task.Delay(50);
            }

            v6 = "visible";
            while (_percent6 < 100)
            {
                _percent6++;
                StateHasChanged();
                await Task.Delay(50);
            }
        }

        
    }
}
