private void MetroWindow_Unloaded(object sender, RoutedEventArgs e) { if (client != null) { client.Dispose(); client = null; } }
private void Client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { client.Dispose(); client = null; if (!e.Cancelled && e.Error == null) { UpdateBins(e.Result); StartRefreshTimer(false); UpdateNagTimer(); } else { UpdateUi(DisplayStatus.NetworkError); StartRefreshTimer(true); } }