private void button1_Click_2(object sender, EventArgs e) { trackPatrol tp = new trackPatrol(); for (int i = 0; i < allpat.Count; i++) { pat1 = (Patrol)allpat[i]; String patrolFullName = pat1.name.Fname; if (patrolFullName == PatrolscomboBox1.SelectedItem.ToString()) { tp.Recieve(IncidentForm.newrep, pat1); if (pat1.patrolLocation.region == "Maadi") { RedP1pictureBox1.Visible = true; } else if (pat1.patrolLocation.region == "Mohandseen") { RedP2pictureBox2.Visible = true; } else if (pat1.patrolLocation.region == "Dokki") { RedP3pictureBox3.Visible = true; } } } }
private void button1_Click(object sender, EventArgs e) { this.Hide(); trackPatrol TrackPatrol = new trackPatrol(); TrackPatrol.Show(); }