public VillagesGridExControl() { ShowPlayer = true; _columns = new Dictionary <VillageFields, GridEXColumn>(); InitializeComponent(); _villageTypeBox = new ImageCombobox(); _villageTypeBox.ImageList = VillageTypeHelper.GetImageList(); }
private void Default_SettingsLoaded(object sender, EventArgs e) { UnitInput.SetWorldUnits(true); UnitInput.Combobox.SelectedIndex = WorldUnits.Default[UnitTypes.Ram].Position + 1; // +1: First Image is null in the Combobox.ImageList World.Default.Map.Manipulators.AttackManipulator.DefaultSpeed = UnitTypes.Ram; VillageTypeInput.Combobox.ImageList = VillageTypeHelper.GetImageList(); _plans.Clear(); AttackDropDown.DropDownItems.Clear(); ActivePlan = null; AllPlans.Controls.Clear(); var plansFromXml = World.Default.Map.Manipulators.AttackManipulator.GetPlans(); foreach (AttackPlan plan in plansFromXml) { AddPlan(plan); } if (_plans.Any()) { World.Default.Map.EventPublisher.AttackSelect(this, _plans.Select(x => x.Key).First()); } else { ShowHelp(); } toolStrip2.Visible = _plans.Any(); foreach (var toolbarItem in toolStrip1.Items.OfType <ToolStripItem>().Where(x => x.Tag == null || x.Tag.ToString() != "OWN_VISIBILITY")) { if (_plans.Any()) { toolbarItem.Visible = true; } else { toolbarItem.Visible = _visibleWhenNoPlans.Contains(toolbarItem); } } }