// 初始化 private void Initialize() { isLoadQuestion = false; myBook = null; myExcel = null; mySheet = null; myRange = null; question = null; //把選項存入array /*selections[0] = radioButton1; * selections[1] = radioButton2; * selections[2] = radioButton3; * selections[3] = radioButton4;*/ timeCount = TIME; //預設15分鐘 time = new Timer(); time.Interval = 1000; time.Tick += new EventHandler(time_Tick); saveExam = new SaveExam(); openExam = new OpenExam(); ef = new ExamForm(); dlf = new DownloadForm(); //veSocket = new VESocket(SignIn.IP); veSocket = new VESocket("219.85.200.148", SignIn.userName, SignIn.password); /*while(true) * { * if(veSocket.getCorrect()) * { * this.Show(); * break; * } * * }*/ toolStripStatusLabel2.Text = "連線中..."; AddDownloadedExam(); }
private void button1_Click(object sender, EventArgs e) { SaveExam se = new SaveExam(); int eh = 0; for (int i = 0; i < question.Length; i++) { //重置使用者作答答案 question[i].setUsersAnswer(""); //重置顯示答案狀態 question[i].setShowAnswer(false); //同步加強練習之陣列與正常模式之陣列 if (eh < enhanceQuestion.Length && question[i].getQuestion() == enhanceQuestion[eh].getQuestion()) { question[i].setEnhance(enhanceQuestion[eh].getEnhance()); eh++; } } //儲存正常模式之陣列 se.save(question, question[0].getExamName()); }