protected override async Task OnInitializedAsync() { // Create a timer with a two second interval. Timer aTimer = new System.Timers.Timer(5000); // Hook up the Elapsed event for the timer. //aTimer.Elapsed += OnTimedEvent; aTimer.AutoReset = true; aTimer.Enabled = true; PageHeaderText = "Station Kantor Pusat"; StationUid = "2000000000014"; StationXs = (await StationXService.GetStationXs()).ToList(); await LoadData(); }
//private static void OnTimedEvent(Object source, ElapsedEventArgs e) //{ // Console.WriteLine("The Elapsed event was raised at {0:HH:mm:ss.fff}", e.SignalTime); // InvokeAsync(gridDT.Reload()); //} protected async Task LoadData() { StationXs = (await StationXService.GetStationXs()).ToList(); await InvokeAsync(StateHasChanged); }