private void Control_Listbox_SelectedIndexChanged(object sender, EventArgs e) { if (ActiveControl != sender) { return; } if (Controls_listbox.SelectedIndex != -1) { selectedControlPoint = (ConquestFlagInfo)Controls_listbox.SelectedItem; UpdateControlPoints(); } else { selectedControlPoint = null; } }
private void Flags_listbox_SelectedIndexChanged(object sender, EventArgs e) { if (ActiveControl != sender) { return; } if (Flags_listbox.SelectedIndex != -1) { selectedFlag = (ConquestFlagInfo)Flags_listbox.SelectedItem; UpdateFlags(); } else { selectedFlag = null; } }