public TypeSelectionForm() { // // Required for Windows Form Designer support // InitializeComponent(); radioButtonToQuestionType.Add(radioMixed, QuestionType.CreateMixed()); radioButtonToQuestionType.Add(radioQauantitative, new QuestionType(QuestionType.Type.Quantitative)); radioButtonToQuestionType.Add(radioVerbal, new QuestionType(QuestionType.Type.Verbal)); radioButtonToQuestionType.Add(radioAlgebra, new QuestionType(BuisinessObjects.Subtype.Algebra)); radioButtonToQuestionType.Add(radioArithmetic, new QuestionType(BuisinessObjects.Subtype.Arithmetic)); radioButtonToQuestionType.Add(radioCombinations, new QuestionType(BuisinessObjects.Subtype.Combinations)); radioButtonToQuestionType.Add(radioCriticalReasoning, new QuestionType(BuisinessObjects.Subtype.CriticalReasoning)); radioButtonToQuestionType.Add(radioGeometry, new QuestionType(BuisinessObjects.Subtype.Geometry)); radioButtonToQuestionType.Add(radioProbability, new QuestionType(BuisinessObjects.Subtype.Probability)); radioButtonToQuestionType.Add(radioSentenceCorrection, new QuestionType(BuisinessObjects.Subtype.SentenceCorrection)); radioButtonToQuestionType.Add(radioStatistics, new QuestionType(BuisinessObjects.Subtype.Statistics)); radioButtonToQuestionType.Add(radioWordProblems, new QuestionType(BuisinessObjects.Subtype.WordProblems)); radioButtonToQuestionType.Add(radioReadingComprehension, new QuestionType(BuisinessObjects.Subtype.ReadingComprehensionQuestionToPassage)); //radioButtonToQuestionType.Add(radioCriticalReasoning, // new QuestionType(BuisinessObjects.Subtype.CriticalReasoning)); //radioButtonToQuestionType.Add(radioSentenceCorrection, // new QuestionType(BuisinessObjects.Subtype.SentenceCorrection)); foreach (DictionaryEntry e in radioButtonToQuestionType) { questionTypeToRadioButton.Add(e.Value, e.Key); } BaseQuestionType = QuestionType.CreateMixed(); QuestionType = QuestionType.CreateMixed(); }
private void addNewButton_Click(object sender, EventArgs e) { TypeSelectionForm tsf = new TypeSelectionForm(); tsf.BaseQuestionType = QuestionType.CreateMixed(); // dbObject.QuestionType; if (tsf.ShowDialog() != DialogResult.OK) { return; } QuestionSet questionSet = ((Test)dbObject).AddNewQuestionSet(tsf.QuestionType); ApplicationController.Instance.Edit(questionSet); ds = (Dataset)((Test)dbObject).FullDataset; questionSetdataGridView.Update(); //questionSetdataGridView.Update(); //dbObject.RefreshConnection(); }