Ejemplo n.º 1
0
        private void btnEditChoice_Click(object sender, EventArgs e)
        {
            ChoiceForm       dlg    = new ChoiceForm();
            RoomChoiceOption choice = m_ActiveRoom.Choices[m_nSelectedChoiceIndex];

            dlg.Description = choice.Description;
            dlg.Link        = choice.Link;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                choice.Description = dlg.Description;
                choice.Link        = dlg.Link;

                SetDirty();
                RefreshRoomData();
            }
        }
Ejemplo n.º 2
0
        private void btnAddChoice_Click(object sender, EventArgs e)
        {
            ChoiceForm dlg = new ChoiceForm();

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                RoomChoiceOption choice = new RoomChoiceOption();
                choice.Description = dlg.Description;
                choice.Link        = dlg.Link;

                m_ActiveRoom.Choices.Add(choice);
                m_nSelectedChoiceIndex = m_ActiveRoom.Choices.Count - 1;
                SetDirty();

                RefreshRoomData();
            }
        }