コード例 #1
0
 private void dataGridViewUniversal_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (MemberMoviesOrTVSeries.Equals("Movies"))
     {
         MoviePage mp = new MoviePage(dataGridViewUniversal.Rows[e.RowIndex].Cells[1].Value.ToString());
         mp.Show();
     }
     else if (MemberMoviesOrTVSeries.Equals("News"))
     {
         string   text = File.ReadAllText(paths[e.RowIndex]);
         NewsPage np   = new NewsPage(dataGridViewUniversal.Rows[e.RowIndex].Cells[0].Value.ToString(), text);
         np.Show();
     }
 }
コード例 #2
0
 private void dataGridViewUniversal_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (MemberFieldOption.Equals("Movies"))
     {
         MoviePage mp = new MoviePage(dataGridViewUniversal.Rows[e.RowIndex].Cells[1].Value.ToString(), this, "Movie");
         mp.Show();
         this.Hide();
     }
     else if (MemberFieldOption.Equals("TVSeries"))
     {
         MoviePage mp = new MoviePage(dataGridViewUniversal.Rows[e.RowIndex].Cells[1].Value.ToString(), this, "TVSeries");
         mp.Show();
         this.Hide();
     }
     else if (MemberFieldOption.Equals("News"))
     {
         string   text = File.ReadAllText(paths[e.RowIndex]);
         NewsPage np   = new NewsPage(dataGridViewUniversal.Rows[e.RowIndex].Cells[0].Value.ToString(), text);
         np.Show();
     }
     else if (MemberFieldOption.Equals("Actors"))
     {
         ActorsOrDirectorsPage aodp = new ActorsOrDirectorsPage(this, "Actor", dataGridViewUniversal.Rows[e.RowIndex].Cells[2].Value.ToString(), dataGridViewUniversal.Rows[e.RowIndex].Cells[1].Value.ToString());
         aodp.Show();
         this.Hide();
     }
     else if (MemberFieldOption.Equals("Directors"))
     {
         ActorsOrDirectorsPage aodp = new ActorsOrDirectorsPage(this, "Regizor", dataGridViewUniversal.Rows[e.RowIndex].Cells[2].Value.ToString(), dataGridViewUniversal.Rows[e.RowIndex].Cells[1].Value.ToString());
         aodp.Show();
         this.Hide();
     }
     else if (MemberFieldOption.Equals("Gender"))
     {
         BindByGender(dataGridViewUniversal.Rows[e.RowIndex].Cells[0].Value.ToString());
     }
 }