Exemplo n.º 1
0
        private void RemoveButton_Click(object sender, EventArgs e)
        {
            string id = ((SavedEvent)Todays_Events.SelectedIndex()).Id;

            if (_events.Remove(id))
            {
                if (!_events.SaveEvents())
                {
                    MessageBox.Show("Unable to save some or all events.", "Error Occurred.", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }

                UpdateView();
            }
        }