private void dgMovies_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < dgMovies.RowCount && e.RowIndex > -1) { MovieIMDBDetails fmMovieImdb = new MovieIMDBDetails((string)dgMovies.Rows[e.RowIndex].Cells["ImdbID"].Value); fmMovieImdb.Show(); } }
private void openMovieToolStripMenuItem_Click(object sender, EventArgs e) { if (dgMovies.SelectedRows.Count == 1) { MovieIMDBDetails fmMovieImdb = new MovieIMDBDetails((string)dgMovies.SelectedRows[0].Cells["ImdbID"].Value); fmMovieImdb.Show(); } else MessageBox.Show("Please select one Movie from the available Movies !", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); }
private void toolStripButtonAddNewMovie_Click(object sender, EventArgs e) { MovieIMDBDetails fmMovieImdb = new MovieIMDBDetails(); fmMovieImdb.Show(); }
private void addNewMovieToolStripMenuItem_Click(object sender, EventArgs e) { MovieIMDBDetails fmMovieImdb = new MovieIMDBDetails(); fmMovieImdb.Show(); }
private void dgMovies_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Enter) { e.Handled = true; MovieIMDBDetails fmMovieImdb = new MovieIMDBDetails((string)dgMovies.CurrentRow.Cells["ImdbID"].Value); fmMovieImdb.Show(); } }
/// <summary> /// This is delegated function, runs in the primary-thread (i.e. the thread that owns the Form!) /// </summary> /// <param name="percentComplete"></param> /// <param name="progressStatus"></param> /// <param name="iMovObj"></param> void UpdateImdbSyncProgressDetails(int percentComplete, bool progressStatus, MovieIMDB iMovObj) { if (progressStatus == true) { labelProgress.Text = string.Format("iSync : {0}% complete! Processed Movie : {1}", percentComplete, iMovObj.Title); MovieIMDBDetails movIMDB = new MovieIMDBDetails(iMovObj); if (!movIMDB.IsDisposed) movIMDB.Show(); } else labelProgress.Text = string.Format("iSync : {0}% complete! Can not process Movie : {1}", percentComplete, iMovObj.Title); if (percentComplete == 100) { syncWithIMDBToolStripMenuItem.Enabled = syncWithIMDBToolStripMenuItem1.Enabled = toolStripButtonSyncIMDB.Enabled = true; silentSyncWithIMDBToolStripMenuItem.Enabled = silentSyncWithIMDBToolStripMenuItem1.Enabled = toolStripButtonSyncSilentIMDB.Enabled = true; } }
/// <summary> /// This is delegated function, runs in the primary-thread (i.e. the thread that owns the Form!) /// </summary> /// <param name="percentComplete"></param> /// <param name="progressStatus"></param> /// <param name="movObj"></param> /// <param name="iMovObj"></param> void UpdateImdbSyncProgressDetails(int percentComplete, bool progressStatus, Movie movObj, MovieIMDB iMovObj) { if (progressStatus == true) { labelChecksumProgress.Text = percentComplete.ToString() + "% complete! Processed Movie : " + movObj.Name; listBoxStatus.Items.Insert(0, string.Format("Processed Movie : {0}", movObj.Name)); MovieIMDBDetails movIMDB = new MovieIMDBDetails(movObj, iMovObj); if (!movIMDB.IsDisposed) movIMDB.Show(); } else { labelChecksumProgress.Text = percentComplete.ToString() + "% complete! Can not process Movie : " + movObj.Name; listBoxStatus.Items.Insert(0, string.Format("Can not process Movie : {0}", movObj.Name)); } progressBar.Value = percentComplete; if (percentComplete == 100) syncWithIMDBToolStripMenuItem.Enabled = syncWithIMDBToolStripMenuItem1.Enabled = toolStripButtonSyncIMDB.Enabled = true; }