private void PickFileDialog(FileType type) { var openFileDialog = new OpenFileDialog { Title = string.Format("Select a new set {0}", type), Filter = Language.SetManagerUserControl_PickFileDialog_Jpeg____jpg____jpg_All_files__________ }; var result = openFileDialog.ShowDialog(); if (result == DialogResult.OK) { if (type == FileType.Poster) { MovieSetManager.ChangeCurrentSetPoster(openFileDialog.FileName); this.SetPosterDataBinding(); } else { MovieSetManager.ChangeCurrentSetFanart(openFileDialog.FileName); this.SetFanartDataBinding(); } } }
/// <summary> /// Handles the ItemClick event of the selectFanartFromMovie control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.XtraBars.ItemClickEventArgs"/> instance containing the event data.</param> private void selectFanartFromMovie_ItemClick(object sender, ItemClickEventArgs e) { MovieSetManager.ChangeCurrentSetFanart(e.Item.Tag.ToString()); this.SetFanartDataBinding(); }