private void Percentage_Click(object sender, RoutedEventArgs e) { int percentage = Int32.Parse((string)((Button)sender).Tag); if (currentThing != null && !currentThing.YesCounters.ContainsKey(currentQuestion)) { currentThing.YesCounters.Add(currentQuestion, new Tuple <int, int>(percentage, 100)); } StatsHelper.SaveToFile(); NextQuestion(); }