Пример #1
0
        // Place a zone
        private void btnAddZone_Click(object sender, EventArgs e)
        {
            ZoneAction a = new ZoneAction();

            a.zone    = cZone;
            a.placeAt = (int)numPlaceStart.Value;
            a.replace = chkReplace.Checked;

            actions.Add(a);
            listActions.Items.Add(a.getStr());
        }
Пример #2
0
        private void btnDown_Click(object sender, EventArgs e)
        {
            if (listActions.SelectedIndex == listActions.Items.Count - 1)
            {
                return;
            }
            ZoneAction a = cAction;

            actions[listActions.SelectedIndex]     = actions[listActions.SelectedIndex + 1];
            actions[listActions.SelectedIndex + 1] = a;
            // Update display
            listActions.Items[listActions.SelectedIndex]     = cAction.getStr();
            listActions.Items[listActions.SelectedIndex + 1] = a.getStr();
            listActions.SelectedIndex += 1;
        }