private void UpdateMatchlist() { //Deserialize our stored data DeserializeMatchData(); DeserializeAdditionalDemoData(); //Parsing MatchData for UI Application.Current.Dispatcher.Invoke(new Action(() => { ParseMatchData(mainMatchList, _accountId); })); //Thread for Uploading MatchLinks to DB ThreadStart uploadThreadStart = this.UploadMatchData; Thread uploadThread = new Thread(uploadThreadStart); uploadThread.Start(); //Creating a HashSet of all SteamIds HashSet <long> steamIdsHashSet = new HashSet <long>(); foreach (var cDataGccStrike15V2MatchInfo in mainMatchList.matches) { foreach (var accountId in cDataGccStrike15V2MatchInfo.roundstats.reservation.account_ids) { steamIdsHashSet.Add((accountId + VOLVOMAGICNUMBER)); } } //Initializing VACStat_us Control VACStat_usSender.Initialize(steamIdsHashSet); //Initializing VacWatch_nl Control VacWatch_nlSender.Initialize(steamIdsHashSet, _accountId + VOLVOMAGICNUMBER); }
private void ChooseListButton_OnClick(object sender, RoutedEventArgs e) { //APIKEY was entered and List was selected, upload all steamIds to this List. int selectedIndex = VAC_Stats_usListComboBox.SelectedIndex; if (selectedIndex >= 0) { Dictionary <int, string> listDictionary = (Dictionary <int, string>)VAC_Stats_usListComboBox.ItemsSource; ListsDockPanel.Visibility = Visibility.Collapsed; Properties.Settings.Default.VACStat_usListId = listDictionary.ElementAt(selectedIndex).Key; VACStat_usSender.Send(Properties.Settings.Default.VACStat_usKey, listDictionary.ElementAt(selectedIndex).Key); } }
private void GetListsButton_OnClick(object sender, RoutedEventArgs e) { VAC_Stats_usListComboBox.ItemsSource = VACStat_usSender.GetListsAsDictionary(Properties.Settings.Default.VACStat_usKey); VAC_Stats_usListComboBox.SelectedIndex = 0; if (VAC_Stats_usListComboBox.Items.Count > 0) { ApikeyDockPanel.Visibility = Visibility.Collapsed; ListsDockPanel.Visibility = Visibility.Visible; } else { MessageBox.Show( "There seems to be a problem obtaining the lists of this User or the APIKEY is wrong. " + "Make sure that you have created at least one(1) list on VacStat.us and the APIKEY is correct."); } }