TOEIC
1 1 3 1.1.............................................. 3 1.2 C#........................................... 3 2 Visual Studio.NET Windows 5 2.1....................................... 5 2.2.......................................... 7 2.3............................. 9 2.4..................................... 10 2.5....................................... 11 2.6................................. 11 2.7.................................. 14 2.8................................. 15
3 1 1.1 TOEIC TOEIC TOEIC TOEIC TOEIC TOEIC TOEIC 40 40 C 1.2 C# 1980 ++ ++ 1990 Java Java Microsoft 2002 ++ Java # Visual C# Microsoft 95% Windows
4 1 Visual C# 2003 Visual Studio.NET2003 Visual Studio.NET Visual C#.NET Visual Studio.NET2003( Visual Studio.NET2005) Visual C# 2005Express Microsoft
5 2 Visual Studio.NET Windows. 2.1 1. Microsoft Visual Studio.NET2003 2. Microsoft Visual Studio.NET2003 Visual Studio.NET2003
6 2 Visual Studio.NET Windows 3. 4. Visual C# 5. Windows 6. TOEICTEST 7. C: VC#.
2.2 7 8. 2.2 1.
8 2 Visual Studio.NET Windows 2. 3. Form1 Form1 a 544, 360 Form1 Size 544,360 b Form1 BackColor 244,244,255 Form1 BackColor 244,244,255 c Form1 Form1 Text 4.
2.3 9 5. Windwos 4 2.3 1. Form1 Button & ( ) (Name) btnstart BackColor 255,192,198 ForeColor Navy Text 2. Form1 label label (Name) lbloutquestion Size 512,16
10 2 Visual Studio.NET Windows BackColor 234,234,255 BorderStyle FixedSingle Text 3. Form1 label label (Name) lbloutquestion Size 512,56 BackColor 244,244,255 BorderStyle FixedSingle 4. RadioButton (a) label 4 label lblanswer1 lblanswer4 (Name) (Name) lblanswer1 BackColor 244,244,255 ForeColor Navy Text 5. OK (Name) btnok BackColor 244,244,255 ForeColor Navy Text OK 6. (Name) btnend BackColor 255,192,128 ForeColor Navy Text 2.4 Form1 btnstart btnstart Click btnstart Click btnstart Click btnstart Click btnok Click btnok Click btnend Click btnend Click
2.5 11 2.5 private void btnstart Click(object sender, System.EventArgs e) private void btnstart Click(object sender, System.EventArgs e) getquestion(); OK private void btnok Click(object sender, System.EventArgs e) if(radiobuttonchecked() == true) correctanswer(); else MessageBox.Show( ); private void btnend Click(object sender, System.EventArgs e) questionresult(); this.close(); 2.6 #region private void getquestion() #region // StreamReader sr = new StreamReader( c:uprogram FilesUyokota labuengleasyuenglisheasyfillblank.csv ); string text = sr.readtoend(); // text
12 2 Visual Studio.NET Windows text = text.replace( Ur, ); sr.close(); string[] stext = text.split( Un ); rownumber = int.parse(stext[0].tostring()); // searchquestioncount++; // Random r = new Random(); questionnumber = r.next(2,rownumber+1); // if(samequestionnumber(questionnumber) == true) text = stext[questionnumber]; // text. // When I was busy, I did not go to school., answer, if(text.indexof( ) = 0) int ind = text.indexof( ); text = text.substring(ind+1); int end = text.indexof( ); question = text.substring(ind,end); stext = text.substring(end+1).split(, ); selctanswer[0] = stext[1]; selctanswer[1] = stext[2]; selctanswer[2] = stext[3]; selctanswer[3] = stext[4]; // stext[5] = stext[5].replace(, ); selctanswer[4] = stext[5]; else stext = text.split(, ); question = stext[0]; selctanswer[0] = stext[1]; selctanswer[1] = stext[2]; selctanswer[2] = stext[3]; selctanswer[3] = stext[4]; stext[5] = stext[5].replace(, ); selctanswer[4] = stext[5]; else if(searchquestioncount < rownumber) getquestion(); else
2.6 13 #endregion // lbloutquesiton lbloutquestion.text = question; lblanswer1.text = selctanswer[0]; lblanswer2.text = selctanswer[1]; lblanswer3.text = selctanswer[2]; lblanswer4.text = selctanswer[3]; // 1 questioncount++; #endregion #region private bool samequestionnumber(int questionnumber) foreach(int qnum in samequestion) if(questionnumber == qnum) return false; samequestion.add(questionnumber); return true; #endregion #region private bool radiobuttonchecked() if(radiobutton1.checked == false && radiobutton2.checked == false && radiobutton3.checked == false && radiobutton4.checked == false) return false; else return true; #endregion #region private void correctanswer() if(radiobutton1.checked == true && selctanswer[4] == (a)
14 2 Visual Studio.NET Windows radiobutton2.checked == true && selctanswer[4] == (b) radiobutton3.checked == true && selctanswer[4] == (c) radiobutton4.checked == true && selctanswer[4] == (d) ) MessageBox.Show( ); correctanscount++; radiobutton1.checked = false; radiobutton2.checked = false; radiobutton3.checked = false; radiobutton4.checked = false; getquestion(); else wronganscount++; MessageBox.Show( ); radiobutton1.checked = false; radiobutton2.checked = false; radiobutton3.checked = false; radiobutton4.checked = false; #endregion #region private void questionresult() questioncount = correctanscount + wronganscount; MessageBox.Show( + questioncount + + correctanscount + ); #endregion #endregion 2.7 ( ) IO using System.IO; Collections using System.Collections; public class Form1 ( ) // private string question = ; private int questionnumber = 0; private int rownumber = 1; private string[] selctanswer = new string[5];
2.8 15 ArrayList samequestion = new ArrayList(); // private int wronganscount = 0; // private int questioncount = 0; // private int correctanscount = 0; // private int searchquestioncount = 0; 2.8.NET Framework Common Language Runtime CLR CLR Intermediate Language IL C# Visual Basic.NET 1. Visual Studio 2.