private void ButtonDeleteMap_Click(object sender, EventArgs e) { if (MapIndex == -1) { return; } string Name = MapList[MapIndex].name + "?"; var confirmResult = MessageBox.Show(Parent, deleteText + Name, "Delete " + Name, MessageBoxButtons.YesNo); if (confirmResult == DialogResult.Yes) { MapList.RemoveAt(MapIndex); listViewMap.Items.RemoveAt(MapIndex); if (MapList.Count >= 1) { listViewMap.Items[MapList.Count - 1].Selected = true; } else { MapIndex = -1; } listViewLayers.Clear(); ed.Draw(); } }
public void Update() { count = 0; for (int i = 0; i < animQueue.Count; ++i) { if (!animQueue[i].PlayNextFrame()) { animQueue.RemoveAt(i); --i; continue; } if (animQueue[i].Parallelizable) { ++count; } } IsBlockingStopped = count == animQueue.Count; }