private void Qst1_CPP_Info_Click(object sender, EventArgs e) { CPP_Info CPP_Info = new CPP_Info(); CPP_Info.Show(); }
private void Result_Click(object sender, EventArgs e) { try { using (StreamWriter SW = new StreamWriter("Player_Answer.txt")) { for (int i = 0; i < 9; i++) { SW.Write(arr_Ans[i, 0]); } //SW.Write("Hello World"); } } catch( Exception err) { MessageBox.Show("Failed"); } string PlayerAnswer = Readingplayeranswer(); StreamReader options = new StreamReader("Answers.txt"); int j=0; bool bFound = false; while ((options.Peek() > 0) && (j <= 32)) { string Result = options.ReadLine(); string Binary = options.ReadLine(); if (Binary.CompareTo(PlayerAnswer)==0) { //MessageBox.Show(Result); string answer; answer = Result; bFound = true; switch (answer) { case "Ruby": Ruby_Info Ruby_Info = new Ruby_Info(); Ruby_Info.Show(); break; case "Python": Python_Info Python_info = new Python_Info(); Python_info.Show(); break; case "Cobol": COBOL_Info COBOL_Info = new COBOL_Info(); COBOL_Info.Show(); break; case "C++": CPP_Info CPP_Info = new CPP_Info(); CPP_Info.Show(); break; case "C#": C_Sharp_Info C_Sharp_Info = new C_Sharp_Info(); C_Sharp_Info.Show(); break; case "Obj C": Obj_C_info Objc_C_info = new Obj_C_info(); Objc_C_info.Show(); break; case "PHP": PHP_Info PHP_Info = new PHP_Info(); PHP_Info.Show(); break; case "Java": Java_Info Java_Info = new Java_Info(); Java_Info.Show(); break; } } } if (bFound == false) { Java_Info Java_Info = new Java_Info(); Java_Info.Show(); MessageBox.Show("maybe programming isnt for you :("); } }
private void CPP_Button_Click(object sender, EventArgs e) { CPP_Info CPP_Info = new CPP_Info(); CPP_Info.Show(); }