private void RoundMarker_Tapped(object sender, EventArgs e) { RoundMarker it = (RoundMarker)App.GetParentByName((Image)sender, "RoundMarker"); foreach (var rnd in RoundsStack.Children) { if (rnd.GetType().Equals(typeof(RoundMarker))) { ((RoundMarker)rnd).Select(false); } } it.Select(); }
public void Reset() { if (App.GameSetting.ShowRounds) { RoundsStack.Visibility = Windows.UI.Xaml.Visibility.Visible; } else { RoundsStack.Visibility = Windows.UI.Xaml.Visibility.Collapsed; return; } int cnt = 0; foreach (var rnd in RoundsStack.Children) { if (rnd.GetType().Equals(typeof(RoundMarker))) { RoundMarker rm = rnd as RoundMarker; rm.Select(false); cnt++; if (cnt > App.GameSetting.TotalRounds) { rm.Visibility = Windows.UI.Xaml.Visibility.Collapsed; rm.ShowArrow(); } else { rm.Visibility = Windows.UI.Xaml.Visibility.Visible; rm.ShowArrow(); } if (cnt == App.GameSetting.TotalRounds) { rm.ShowArrow(false); } if (cnt == 1) { rm.Select(true); } } } }