예제 #1
0
        public IEnumerable <IResult> OpenNewMatch()
        {
            MatchManager.CreateNewMatch();
            var next = ShowScreenResult.Of <NewMatchViewModel>();

            yield return(next);
        }
예제 #2
0
        public IEnumerable <IResult> NoVideo()
        {
            //Go to next Scene Without Video
            var nextScreen = ShowScreenResult.Of <MainViewModel>();

            nextScreen.Properties.Add("SelectedTab", MainViewModel.Tabs.Live);
            nextScreen.Properties.Add("LiveMode", LiveViewModel.TimeMode.Timer);
            yield return(nextScreen);
        }
예제 #3
0
        public IEnumerable <IResult> OpenMatchWithoutVideo()
        {
            foreach (IResult result in MatchManager.OpenLiveMatch())
            {
                yield return(result);
            }
            var next = ShowScreenResult.Of <NewMatchViewModel>();

            yield return(next);
        }
예제 #4
0
        //Load Video File and go to next scene
        public IEnumerable <IResult> WithVideo()
        {
            var nextScreen = ShowScreenResult.Of <MainViewModel>();

            nextScreen.Properties.Add("SelectedTab", MainViewModel.Tabs.Live);
            nextScreen.Properties.Add("LiveMode", LiveViewModel.TimeMode.Video);
            foreach (var result in MatchManager.LoadVideo())
            {
                yield return(result);
            }
            yield return(nextScreen);
        }
예제 #5
0
        public IEnumerable <IResult> OpenMatch()
        {
            //      Load Match
            //      Open RemoteView in Shell
            foreach (IResult result in MatchManager.OpenMatch())
            {
                yield return(result);
            }
            var next = ShowScreenResult.Of <MainViewModel>();

            next.Properties.Add("SelectedTab", MainViewModel.Tabs.Remote);
            yield return(next);
        }
예제 #6
0
        public IEnumerable <IResult> OpenNewMatch()
        {
            MatchManager.CreateNewMatch();
            this.NotifyOfPropertyChange(() => this.CanSaveMatch);
            this.NotifyOfPropertyChange(() => this.CanSaveMatchAs);
            this.NotifyOfPropertyChange(() => this.CanShowPlayer);
            this.NotifyOfPropertyChange(() => this.CanShowCompetition);
            Events.PublishOnUIThread(new HideMenuEvent());
            var next = ShowScreenResult.Of <NewMatchViewModel>();

            yield return(next);

            MatchManager.MatchSaveAs = false;
        }
예제 #7
0
        public IEnumerable <IResult> AddNewPlayer(string s)
        {
            // Show new Player Screen
            int num        = Convert.ToInt32(s);
            var nextScreen = ShowScreenResult.Of <NewPlayerViewModel>();

            switch (num)
            {
            case 1:
                nextScreen.Properties.Add("Player", Match.FirstPlayer);
                break;

            case 2:
                nextScreen.Properties.Add("Player", Match.SecondPlayer);
                break;

            default:
                break;
            }
            yield return(nextScreen);
        }
예제 #8
0
        public IEnumerable <IResult> SaveMatchDetails()
        {
            //Save Match Details in MatchManager and go to Video Choice
            bool canNext = !String.IsNullOrWhiteSpace(Match.Tournament) && !String.IsNullOrWhiteSpace(Match.FirstPlayer.Name) && !String.IsNullOrWhiteSpace(Match.SecondPlayer.Name);

            if (!canNext)
            {
                var mySettings = new MetroDialogSettings()
                {
                    AffirmativeButtonText = "OK",
                    AnimateShow           = true,
                    AnimateHide           = false
                };
                IDialogCoordinator coordinator = IoC.Get <IDialogCoordinator>();
                var context = new CoroutineExecutionContext()
                {
                    Target = this,
                    View   = this.GetView() as DependencyObject,
                };
                coordinator.ShowMessageAsync(context.Target, "Missing Information",
                                             "You have to provide at least a tournament name and names for both players to continue!",
                                             MessageDialogStyle.Affirmative, mySettings);

                yield return(new DoNothingResult());
            }
            else
            {
                MatchManager.MatchModified = true;
                NotifyOfPropertyChange("MatchModified");

                Rally first = new Rally(Match);
                first.Number = 1;

                MatchManager.Match.Rallies.Add(first);
                first.UpdateServerAndScore();

                var nextScreen = ShowScreenResult.Of <VideoSourceViewModel>();
                yield return(nextScreen);
            }
        }
예제 #9
0
        public IEnumerable <IResult> SubmitPlayer()
        {
            var nextScreen = ShowScreenResult.Of <NewMatchViewModel>();

            yield return(nextScreen);
        }