private void btn_submit_Click(object sender, EventArgs e) { if (Ready()) { Event newEvent = new VideoEvent(new GRLocation(eventLocation.Latitude, eventLocation.Longitude), fileName, dt.ToString(), dt.ToString()); GREventManager.AddEvent(newEvent); MessageBox.Show("Event successfully added!"); } else { MessageBox.Show("Could not add event."); } this.Hide(); }
private void btn_submit_Click(object sender, EventArgs e) { statusText = txt_statusUpdate.Text; dt = dtPicker.Value; if (Ready()) { Event newEvent = new StatusUpdateEvent(new GRLocation(eventLocation.Latitude, eventLocation.Longitude), dt.ToString(), statusText); GREventManager.AddEvent(newEvent); MessageBox.Show("Event successfully added!"); this.Hide(); } else { MessageBox.Show("Could not add event."); } }
public void AddEventTest() { GREventManager.ClearMap(); GREventManager.AddEvent(new PhotoEvent(new GRLocation(0, 0), "", "")); Assert.IsTrue(GREventManager.GetEventMap().Count == 1); }