コード例 #1
0
        /// <summary>
        /// Open Create Fullscreen Dialog
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FullscreenButton_Click(object sender, EventArgs e)
        {
            var newForm = new FullscreenForm();

            newForm.ShowDialog();
            BindListView();
        }
コード例 #2
0
        /// <summary>
        /// Edit Trial
        /// </summary>
        /// <param name="trialIndex"></param>
        private void EditExperiment(int trialIndex)
        {
            var trial = Experiments[ExperimentsOrder[trialIndex]];

            switch (trial.type)
            {
            case ExperimentTypes.ScaleSurvey:
            case ExperimentTypes.TextSurvey:
            case ExperimentTypes.MultiChoiceSurvey:
            {
                var surveyF = new SurveyForm((Survey)trial);
                surveyF.ShowDialog();
                if (surveyF.ReturnEdit != null)
                {
                    Experiments[ExperimentsOrder[trialIndex]] = surveyF.ReturnEdit;
                }
                break;
            }

            case ExperimentTypes.Fullscreen:
            {
                var fullscreenF = new FullscreenForm((FullScreen)trial);
                fullscreenF.ShowDialog();
                if (fullscreenF.ReturnEdit != null)
                {
                    Experiments[ExperimentsOrder[trialIndex]] = fullscreenF.ReturnEdit;
                }
                break;
            }

            case ExperimentTypes.Instructions:
            {
                var instructionsF = new InstructionsForm((Instructions)trial);
                instructionsF.ShowDialog();
                if (instructionsF.ReturnEdit != null)
                {
                    Experiments[ExperimentsOrder[trialIndex]] = instructionsF.ReturnEdit;
                }
                break;
            }

            case ExperimentTypes.bRMS:
                var rmsForm = new BrmsForm((Brms)trial, GetExistingBrmsNames());
                rmsForm.ShowDialog();
                if (rmsForm.ReturnEdit != null)
                {
                    Experiments[ExperimentsOrder[trialIndex]] = rmsForm.ReturnEdit;
                }
                break;
            }
            BindListView();
        }