Ejemplo n.º 1
0
        private void lstEvents_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (lstEvents.SelectedIndex > -1)
            {
                DataTypes.Event EditEvent = new DataTypes.Event();
                EditEvent = Room.Events[lstEvents.SelectedIndex];
                frmEventEditor NewForm = new frmEventEditor(EditEvent, FloorCount);

                NewForm.ShowDialog();

                EditEvent = NewForm.Event;
                Room.Events[lstEvents.SelectedIndex] = EditEvent;
            }
            GetAllEvents();
        }
Ejemplo n.º 2
0
        private void cmdAddEvent_Click(object sender, EventArgs e)
        {
            DataTypes.Event NewEvent = new DataTypes.Event();
            frmEventEditor NewForm = new frmEventEditor(NewEvent, FloorCount);

            NewForm.ShowDialog();

            NewEvent = NewForm.Event;
            if (NewEvent.Action != null)
            {
                if (Room.Events == null) Room.Events = new List<DataTypes.Event>();
                Room.Events.Add(NewEvent);
            }
            GetAllEvents();
        }