Ejemplo n.º 1
0
        /// <summary>
        /// new新的model和form1
        /// </summary>
        private static void Main()
        {
            DictionaryModel   dictionaryModel   = new DictionaryModel();
            TestModel         testModel         = new TestModel(dictionaryModel);
            PresentationModel presentationModel = new PresentationModel(testModel);
            Form form = new UserForm(presentationModel);

            Application.Run(form);
        }
Ejemplo n.º 2
0
 // 初始化
 public UserForm(PresentationModel presentationModel)
 {
     this._presentationModel           = presentationModel; // 讓userform可以知道presentationModel
     _presentationModel._messageEvent += new PresentationModel.MessageEventHandler(ShowMessage);
     InitializeComponent();
     _isQuestionType.Add(_allFillIn);
     _isQuestionType.Add(_all);
     _isQuestionType.Add(_pickUpQuestions);
     _isQuestionType[0].Checked     = true;
     _questionNumericUpDown.Minimum = 1;
     _nextButton.Enabled            = false; // 初始化next顯示灰色
     _nextToolStrip.Enabled         = false;
     _stopButton.Enabled            = false;
     _stopToolStrip.Enabled         = false;
     _allFillIn.Checked             = true;
     _typeComboBox.DropDownStyle    = ComboBoxStyle.DropDownList;
     _typeComboBox.SelectedIndex    = 0;
 }