private void EditShow(ShowItem si) { this.MoreBusy(); TheTVDB db = this.mDoc.GetTVDB(true, "EditShow"); SeriesInfo ser = db.GetSeries(si.TVDBCode); int oldCode = si.TVDBCode; AddEditShow aes = new AddEditShow(si, db); System.Windows.Forms.DialogResult dr = aes.ShowDialog(); db.Unlock("EditShow"); if (dr == System.Windows.Forms.DialogResult.OK) { if (ser != null) ser.ShowTimeZone = aes.ShowTimeZone; // TODO: move into AddEditShow this.ShowAddedOrEdited(si.TVDBCode != oldCode); this.SelectShow(si); } this.LessBusy(); }
private void bnMyShowsAdd_Click(object sender, System.EventArgs e) { this.MoreBusy(); ShowItem si = new ShowItem(this.mDoc.GetTVDB(false, "")); TheTVDB db = this.mDoc.GetTVDB(true, "AddShow"); AddEditShow aes = new AddEditShow(si, db); System.Windows.Forms.DialogResult dr = aes.ShowDialog(); db.Unlock("AddShow"); if (dr == System.Windows.Forms.DialogResult.OK) { this.mDoc.GetShowItems(true).Add(si); this.mDoc.UnlockShowItems(); SeriesInfo ser = db.GetSeries(si.TVDBCode); if (ser != null) ser.ShowTimeZone = aes.ShowTimeZone; this.ShowAddedOrEdited(true); this.SelectShow(si); } this.LessBusy(); }