public ShowRow(Controller c, Show s, string venue, string date) { _controller = c; _model = s; InitializeComponent(); this.venueLabel.Text = venue; this.dateLabel.Text = date; }
public bool addShow(Show s) { try { shows.Add(s); } catch { return false; } return true; }
internal bool saveShow(string date, string venue, bool _isEdit, int index) { if (_isEdit) { showHighlight.setDate(index, date); showHighlight.setVenue(index, venue); } else { bool createNew = false; if (showHighlight == null) { showHighlight = new Show(); createNew = true; } showHighlight.addDate(date); showHighlight.addVenue(venue); if (createNew) bandHighlight.addShow(showHighlight); } ((MainView)_current_view).initializeBandTab(bandHighlight); ((MainView)_current_view).disableEdit(MainView.BAND_TAB_SHOW); ((MainView)_current_view).disableDelete(MainView.BAND_TAB_SHOW); saveXML(); return true; }
internal void addShow() { if (showHighlight == null) { if (bandHighlight.getShows().Length > 0) showHighlight = bandHighlight.getShows()[0]; else { bandHighlight.addShow(new Show()); showHighlight = bandHighlight.getShows()[0]; } } else if (!bandHighlight.getShows().Contains(showHighlight)) { if (bandHighlight.getShows().Length > 0) showHighlight = bandHighlight.getShows()[0]; } else { bandHighlight.addShow(new Show()); showHighlight = bandHighlight.getShows()[0]; } AddShow addShowView = new AddShow(this, false, 0); addShowView.Show(); }
public void showClick(ShowRow row, Show s) { //Set them all normal foreach (ShowRow r in ((MainView)_current_view).getShowRows()) r.setNormal(); //set ours green row.setGreen(); showRowHighlight = row; showHighlight = s; //enable show buttons ((MainView)_current_view).enableEdit(MainView.BAND_TAB_SHOW); ((MainView)_current_view).enableDelete(MainView.BAND_TAB_SHOW); }
private Show showParser(XmlNodeReader reader) { Show s = new Show(); while (reader.Read()) { if (reader.NodeType == XmlNodeType.Element) { if (reader.Name == "date") { reader.Read(); s.addDate(reader.Value); reader.Read(); reader.Read(); reader.Read(); s.addVenue(reader.Value); } } else if (reader.NodeType == XmlNodeType.EndElement) if (reader.Name == "show") break; } return s; }