public UserControl_HomeAwayTeams(UserControl_MainContent mainContent)
        {
            InitializeComponent();
            new Thread(() =>
            {
                UtilsNotification.StartLoadingAnimation();

                _mainContent       = mainContent;
                IsDrawableMenuOpen = false;

                IsMatchType = false;
                IsHomeTeam  = true;
                matchPeriod = MatchPeriodTypeValues.FullTime;
                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();

                DrawableMenuContainer.Dispatcher.BeginInvoke((Action)(() =>
                                                                      DrawableMenuContainer.Content = new UserControl_DrawableMenuTeams(_mainContent, this)));

                UtilsNotification.StopLoadingAnimation();
            }).Start();
        }
Esempio n. 2
0
        public UserControl_Rankings(UserControl_MainContent mainContent)
        {
            InitializeComponent();
            _mainContent       = mainContent;
            competitionService = new CompetitionService();
            teamService        = new TeamService();
            matchService       = new MatchService();

            LoadFormRankings();
        }
        public UserControl_TimeGoals(UserControl_MainContent mainContent)
        {
            InitializeComponent();
            _mainContent       = mainContent;
            competitionService = new CompetitionService();
            teamService        = new TeamService();
            timeGoalsService   = new TimeGoalsService();

            LoadFormTimeGoals();
        }
 public UserControl_DrawableMenuTeams(UserControl_MainContent mainContent, UserControl_HomeAwayTeams parent)
 {
     InitializeComponent();
     _mainContent       = mainContent;
     _parent            = parent;
     _parent.child      = this; //Important to connect both aways
     competitionService = new CompetitionService();
     teamService        = new TeamService();
     teamsListToFilter  = null;
     InitFilterForm();
 }
        public UserControl_AddMatches(UserControl_MainContent mainContent)
        {
            InitializeComponent();
            new Thread(() =>
            {
                UtilsNotification.StartLoadingAnimation();

                _mainContent = mainContent;

                MatchContainer.Dispatcher.BeginInvoke((Action)(() => MatchContainer.Content = new UserControl_AddMatch_StartTime(this)));
                ChangeSubTitle("(Ataque/ Defesa)");

                UtilsNotification.StopLoadingAnimation();
            }).Start();
        }
        public UserControl_Competitions(UserControl_MainContent mainContent)
        {
            InitializeComponent();
            new Thread(() =>
            {
                UtilsNotification.StartLoadingAnimation();

                _mainContent = mainContent;

                ComboBoxSeason.Dispatcher.BeginInvoke((Action)(() => ComboBoxSeason.IsEnabled = false));

                competitionService = new CompetitionService();
                seasonService      = new SeasonService();

                LoadFormCompetitions();
            }).Start();
        }
        public UserControl_Seasons(UserControl_MainContent mainContent)
        {
            InitializeComponent();

            new Thread(() =>
            {
                UtilsNotification.StartLoadingAnimation();

                ComboBoxStartYear.Dispatcher.BeginInvoke((Action)(() => ComboBoxStartYear.IsEnabled = false));
                ComboBoxEndYear.Dispatcher.BeginInvoke((Action)(() => ComboBoxEndYear.IsEnabled = false));
                ButtonSaveSeason.Dispatcher.BeginInvoke((Action)(() => ButtonSaveSeason.IsEnabled = false));
                _mainContent = mainContent;

                seasonService = new SeasonService();
                LoadFormData();
            }).Start();
        }
        public UserControl_Teams(UserControl_MainContent mainContent)
        {
            InitializeComponent();
            new Thread(() =>
            {
                UtilsNotification.StartLoadingAnimation();

                ComboBoxCompetition.Dispatcher.BeginInvoke((Action)(() => ComboBoxCompetition.IsEnabled = false));
                _mainContent = mainContent;

                teamService        = new TeamService();
                competitionService = new CompetitionService();

                LoadConfigurationForPagination();
                LoadFormTeams();
                IniSearchControls();
            }).Start();
        }
        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();
        }
Esempio n. 10
0
        public UserControl_Begin(UserControl_MainContent mainContent)
        {
            InitializeComponent();

            new Thread(() =>
            {
                UtilsNotification.StartLoadingAnimation();

                _mainContent       = mainContent;
                seasonService      = new SeasonService();
                competitionService = new CompetitionService();
                teamService        = new TeamService();
                matchService       = new MatchService();

                Thread.Sleep(1000);

                TextBoxNSeasons.Dispatcher.BeginInvoke((Action)(() => TextBoxNSeasons.Text = seasonService.GetSeasonsNumber().ToString()));
                TextBoxNCompetitions.Dispatcher.BeginInvoke((Action)(() => TextBoxNCompetitions.Text = competitionService.GetCompetitionsNumber().ToString()));
                TextBoxNTeams.Dispatcher.BeginInvoke((Action)(() => TextBoxNTeams.Text = teamService.GetTeamsNumber().ToString()));
                TextBoxNMatches.Dispatcher.BeginInvoke((Action)(() => TextBoxNMatches.Text = matchService.GetMatchesNumber().ToString()));

                UtilsNotification.StopLoadingAnimation();
            }).Start();
        }