private async Task SortNumberOfWLANsAscending() { IsBusy = true; await Task.Delay(1500); ChannelsDictionary5GHz = ChannelsDictionary5GHz.OrderBy(x => x.Value).ToDictionary(x => x.Key, x => x.Value); ChannelsDictionary2GHz = ChannelsDictionary2GHz.OrderBy(x => x.Value).ToDictionary(x => x.Key, x => x.Value); IsBusy = false; }
private async Task SortByChannels() { IsBusy = true; await Task.Delay(1500); ChannelsDictionary5GHz = ChannelsDictionary5GHz.OrderBy(x => x.Key).ToDictionary(x => x.Key, x => x.Value); ChannelsDictionary2GHz = ChannelsDictionary2GHz.OrderBy(x => x.Key).ToDictionary(x => x.Key, x => x.Value); IsBusy = false; }
private void UpdatingChannelsDictionary() { foreach (var channel in BusyChannels) { if (channel > 13) { ChannelsDictionary5GHz.Add(channel, ChannelTrafficCalc(channel)); } else { ChannelsDictionary2GHz.Add(channel, ChannelTrafficCalc(channel)); } } ChannelsDictionary5GHz = ChannelsDictionary5GHz.OrderBy(x => x.Key).ToDictionary(x => x.Key, x => x.Value); ChannelsDictionary2GHz = ChannelsDictionary2GHz.OrderBy(x => x.Key).ToDictionary(x => x.Key, x => x.Value); }