private void comboSelectImages_DropDown(object sender, EventArgs e) { comboSelectImages.Items.Clear(); foreach (ImagesForm imf in ProjectForm.getInstance().getAllImages()) { comboSelectImages.Items.Add(imf.getID()); } }
private void comboSelectImages_SelectedIndexChanged(object sender, EventArgs e) { try { object obj = comboSelectImages.SelectedItem; ImagesForm imf = ProjectForm.getInstance().getImagesFormByName(obj.ToString()); if (imf != null) { this.currentImages = imf; pictureBox1.Refresh(); } } catch (Exception err) {} }
private void ListTerrains_DropDownOpening(object sender, EventArgs e) { ListTerrains.DropDown.Items.Clear(); ArrayList maps = ProjectForm.getInstance().getMaps(CurMap.super); foreach (MapForm map in maps) { if (map.XCount % 2 == 1 && map.YCount / map.XCount == 3) { if (map.isTerrain()) { ToolStripMenuItem droup = new ToolStripMenuItem( map.getID() ); droup.Tag = map; ListTerrains.DropDown.Items.Add(droup); } } } }