private void DoAdvanceState(object param)
        {
            var state = CurrentState;
            
            if (state == BenchmarkWizardState.QuestionToPublishResults)
            {
                //intiate authentication view model
                AuthenticationViewModel = new AuthenticationAndUploadViewModel<ContestResultsPublishedResponse>(m_benchmarkWizard.WebService,
                                                m_benchmarkWizard.ExecutePublishResults,
                                                Messages.UploadingContestResultsToWebsite, Messages.ContestResultsPublished);
            }

            if (state != BenchmarkWizardState.AuthenticationAndUpload)
            {
                CurrentState = ++state;
            }
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DefiningBenchmarkViewModel"/> class.
        /// </summary>
        /// <param name="baseExperiment">The base experiment represents experiment based on which the benchmark is being defined.</param>
        public DefiningBenchmarkViewModel(Experiment baseExperiment, IEnumerable <string> benchmarksDirectories,
                                          TraceLab.Core.Components.ComponentsLibrary library,
                                          TraceLab.Core.Workspaces.Workspace workspace,
                                          IEnumerable <string> workspaceTypeDirectories, string webserviceAddress)
        {
            //initialize the model data based on base experiment
            m_definingBenchmark = new DefiningBenchmark(baseExperiment, library, workspace, TraceLab.Core.PackageSystem.PackageManager.Instance, workspaceTypeDirectories, webserviceAddress);
            Define = new DelegateCommand(ExecuteDefine, CanExecuteDefine);
            SelectBenchmarkPath     = new DelegateCommand(DoSelectBenchmarkPath);
            m_benchmarksDirectories = benchmarksDirectories;

            //intiate authentication view model
            if (m_definingBenchmark.WebService != null)
            {
                m_authenticationViewModel = new AuthenticationAndUploadViewModel <ContestPublishedResponse>(m_definingBenchmark.WebService,
                                                                                                            m_definingBenchmark.ExecutePublishContest,
                                                                                                            Messages.UploadingContestToWebsite, Messages.ContestPublished);
            }
        }