private void ButtonSecondTime_Click(object sender, RoutedEventArgs e) { if (typeMatchView != MatchViewTypeValues.SecondTime) { //Selection colors ButtonSecondTime.Background = new SolidColorBrush(Color.FromRgb(170, 74, 59)); ButtonAttackDefense.Background = new SolidColorBrush(Color.FromRgb(55, 54, 56)); ButtonHalfTime.Background = new SolidColorBrush(Color.FromRgb(55, 54, 56)); typeMatchView = MatchViewTypeValues.SecondTime; ReloadGridMatches(); } }
public UserControl_Matches(UserControl_MainContent mainContent) { InitializeComponent(); new Thread(() => { UtilsNotification.StartLoadingAnimation(); _mainContent = mainContent; typeMatchView = MatchViewTypeValues.AttackDefense; ImageLogo.Dispatcher.BeginInvoke((Action)(() => ImageLogo.Visibility = Visibility.Visible)); LabelInfo.Dispatcher.BeginInvoke((Action)(() => LabelInfo.Visibility = Visibility.Visible)); LabelExtraInfo.Dispatcher.BeginInvoke((Action)(() => LabelExtraInfo.Visibility = Visibility.Visible)); teamService = new TeamService(); matchService = new MatchService(); IsDrawableMenuOpen = false; DrawableMenuContainer.Dispatcher.BeginInvoke((Action)(() => DrawableMenuContainer.Content = new UserControl_DrawableMenuMatches(_mainContent, this))); UtilsNotification.StopLoadingAnimation(); }).Start(); }