private void HOME_Click(object sender, EventArgs e) { Form3 c = new Form3(); c.Show(); Hide(); }
private void button2_Click(object sender, EventArgs e) { if (v1 == null || v1.IsDisposed) { v1 = new Form3(); v1.Show(); } }
private void LOGIN_Click(object sender, EventArgs e) { if (USER.Text == "28" & PASS.Text == "12345") { // MessageBox.Show("LOGIN SUCCESSFUL"); Form3 f = new Form3(); f.Show(); Hide(); } else { MessageBox.Show("LOGIN FAILED"); } }
private void button1_Click(object sender, EventArgs e) { oracle.LinkToOracle("orcl","hui","oracle"); OracleCommand cmd = oracle.getConnection().CreateCommand(); String tno = textBox1.Text; String pwd = textBox2.Text; if (tno == "hui" & pwd == "123") { MessageBox.Show("登录成功"); Form4 form4 = new Form4(); this.Hide(); form4.Show(); return; } cmd.CommandText = String.Format("select * from teacher where tno='{0}'", tno); OracleDataReader reader = cmd.ExecuteReader(); reader.Read(); try { if (reader["pwd"].ToString() == pwd) { MessageBox.Show("登录成功"); Form3 form3 = new Form3(); this.Hide(); form3.Show(); return; } if (tno == "hui" & pwd == "123") { MessageBox.Show("登录成功"); Form4 form4 = new Form4(); this.Hide(); form4.Show(); return; } //MessageBox.Show("密码错误"); } catch (Exception ex) { MessageBox.Show("登录帐号或密码错误"); } oracle.LinkClose(); }
private void sIPARISKARTLARIToolStripMenuItem_Click(object sender, EventArgs e) { Form3 menu = new Form3(); menu.Show(); this.Hide(); }
private void button2_Click(object sender, EventArgs e) { Form3 n = new Form3(); n.Show(); Hide(); }
private async void button7_Click(object sender, EventArgs e) { Form3 frm = new Form3(); frm.Show(); }
private void help_clicked(object sender, EventArgs e) { Form3 help = new Form3(); help.Show(); }
private void timer1_Tick(object sender, EventArgs e) { if (plateau.plo.Count() == 0) { System.IO.File.WriteAllText(@"svg.txt", Convert.ToString(mapi + 1)); if (mapi + 1 == 6) { Form5 Form5 = new Form5(); Form5.Show(); this.Hide(); timer1.Enabled = false; } else if (mapi + 1 < 8) { Form1 Form1 = new Form1(mapi + 1, plateau.player[0].nbBombe, plateau.player[0].porteBombe, plateau.player[0].point); Form1.Show(); this.Hide(); timer1.Enabled = false; } } if (plateau.player.Count() == 0 && mapi != 7) { Form3 Form3 = new Form3(); Form3.Show(); this.Hide(); timer1.Enabled = false; } if (plateau.player.Count() == 1 && mapi == 7) { if (pointP1 == 100 && pointP2 == 100) { timer1.Stop(); MessageBox.Show("egaliter"); Form2 Form2 = new Form2(); Form2.Show(); this.Hide(); } else if (pointP1 == 100) { timer1.Stop(); MessageBox.Show("P1 Win"); Form2 Form2 = new Form2(); Form2.Show(); this.Hide(); } else if (pointP2 == 100) { timer1.Stop(); MessageBox.Show("P2 Win"); Form2 Form2 = new Form2(); Form2.Show(); this.Hide(); } else { Form1 Form1 = new Form1(7, 1, 1, pointP1, pointP2); Form1.Show(); this.Hide(); timer1.Enabled = false; } } int i = 0; while (plateau.boom.Count() > i) { plateau.boom[i].time--; if (plateau.boom[i] != null && plateau.boom[i].time < 0) { plateau.defla(plateau.boom[i]); plateau.boom.Remove(plateau.boom[i]); } i++; } i = 0; while (plateau.defl.Count() > i) { int j = 0; while (j < plateau.player.Count) { if (plateau.defl[i].getDeflagration(plateau.player[j].pos.x, plateau.player[j].pos.y)) { if (j == 0) { pointP2 += 10; } else if (j == 1) { pointP1 += 10; } plateau.player.Remove(plateau.player[j]); } j++; } j = 0; int m = 1; while (j < plateau.plo.Count()) { if (plateau.defl[i].getDeflagration(plateau.plo[j].pos.x, plateau.plo[j].pos.y)) { plateau.plo.Remove(plateau.plo[j]); plateau.player[0].point += 10 * m; m++; } j++; } if (plateau.defl[i] != null && plateau.defl[i].time < 1) { plateau.defl.Remove(plateau.defl[i]); } else { plateau.defl[i].time--; } i++; } for (int k = 0; k < plateau.plo.Count(); k++) { int l = 0; while (l < plateau.player.Count()) { if ((plateau.player[l].pos.x == plateau.plo[k].pos.x && plateau.player[l].pos.y == plateau.plo[k].pos.y)) { plateau.player.Remove(plateau.player[l]); } l++; } plateau.plo[k].ia(plateau); } affGame(); }
private void convert_Click(object sender, EventArgs e) { //BOLD ITALICS String txt = text.Text; Form3 f = new Form3(); f.ShowDialog(); string txt2 = ""; string sub = ""; string sup = ""; string bold = ""; string italics = ""; int[] array = new int[text.TextLength]; int[] array1 = new int[text.TextLength]; proLabel.Text = "Initializing...."; int step = 0; for (int j = 0; j < text.TextLength - 1; j++) { step += 1 / (text.TextLength - 1) * 100; textPro.Value = step; array[j] = 0; //fonts array1[j] = 0; //offsets text.Select(j, 1); if (text.SelectionFont.Bold) { array[j] = 1; } if (text.SelectionFont.Italic) { array[j] = 2; } if (text.SelectionCharOffset == -10) { array1[j] = 1; } if (text.SelectionCharOffset == +10) { array1[j] = 2; } // MessageBox.Show("" + array1[j]); } proLabel.Text = "Initialized"; int i = 0; textPro.Value = 0; while (i < txt.Length - 1) { step += 1 / (txt.Length - 1) * 100; //progress bar textPro.Value = step; if (array1[i] == 0) //normal script { while (array1[i] == 0 && i < txt.Length - 1) { if (array[i] == 0 && array1[i] == 0) { while (array[i] == 0 && i < txt.Length - 1 && array1[i] == 0) { txt2 += txt.Substring(i, 1); i++; } } else if (array[i] == 1 && array1[i] == 0) { while (array[i] == 1 && i < txt.Length - 1 && array1[i] == 0) { bold += txt.Substring(i, 1); i++; } txt2 += "<b>" + bold + "</b>"; bold = ""; } else { while (array[i] == 2 && i < txt.Length - 1 && array1[i] == 0) { italics += txt.Substring(i, 1); i++; } txt2 += "<i>" + italics + "</i>"; italics = ""; } //i++; } } else if (array1[i] == 1) //subscript { while (array1[i] == 1 && i < txt.Length - 1) { if (array[i] == 0 && array1[i] == 1) { while (array[i] == 0 && i < txt.Length - 1 && array1[i] == 1) { sub += txt.Substring(i, 1); i++; } } else if (array[i] == 1 && array1[i] == 1) { while (array[i] == 1 && i < txt.Length - 1 && array1[i] == 1) { bold += txt.Substring(i, 1); i++; } sub += "<b>" + bold + "</b>"; bold = ""; } else { while (array[i] == 2 && i < txt.Length - 1 && array1[i] == 1) { italics += txt.Substring(i, 1); i++; } sub += "<i>" + italics + "</i>"; italics = ""; } //i++; } txt2 += "<sub>" + sub + "</sub>"; sub = ""; } else //superscript { while (array1[i] == 2 && i < txt.Length - 1) { if (array[i] == 0 && array1[i] == 2) { while (array[i] == 0 && i < txt.Length - 1 && array1[i] == 2) { sup += txt.Substring(i, 1); i++; } } else if (array[i] == 1 && array1[i] == 2) { while (array[i] == 1 && i < txt.Length - 1 && array1[i] == 2) { bold += txt.Substring(i, 1); i++; } sup += "<b>" + bold + "</b>"; bold = ""; } else { while (array[i] == 2 && i < txt.Length - 1 && array1[i] == 2) { italics += txt.Substring(i, 1); i++; } sup += "<i>" + italics + "</i>"; italics = ""; } // i++; } txt2 += "<sup>" + sup + "</sup>"; sup = ""; } } txt = txt2; //<BR> CODE proLabel.Text = "Textual Conversions done."; int nchar = f.Count; //MessageBox.Show("" + nchar); int len = txt.Length; txt2 = ""; int count = 0; int max = 0; for (i = 0; i < len; i++) { if (txt.Substring(i, 1) == "<") { while (txt.Substring(i, 1) != ">" && i < len - 1) { max++; txt2 += txt.Substring(i, 1); i++; if (max > 5) { break; } } } txt2 = txt2 + txt.Substring(i, 1); count++; if (count == nchar) { txt2 += "<br>\n"; count = 0; } } txt = txt2; //Find PP (paragraphs) and insert </p><p> at every instance txt = txt.Replace("PP", "</p>\n<p>"); //End: Add HTML, FONT and <p> to the final result txt = txt.Insert(0, "<html><font face=\"" + font.Text + "\" size=" + size.Text + " color=\"" + color.Text + "\">" + "<p>\n"); txt = txt.Insert(txt.Length, "\n</p></font></html>"); html.Text = txt; proLabel.Text = "Conversion done."; }
private void button1_Click(object sender, EventArgs e) { Form3 form3 = new Form3(); form3.Show(); }
private void button4_Click(object sender, EventArgs e) { Form3 f3 = new Form3(); f3.Show(); }