private void btnUnselect_Click(object sender, System.EventArgs e) { Utilities.ConfigItem item = (Utilities.ConfigItem)lstSelected.SelectedItem; if (item == null) { return; } lstSelected.Items.Remove(item); }
private void btnSelect_Click(object sender, System.EventArgs e) { Utilities.ConfigItem item = (Utilities.ConfigItem)lstAvailable.SelectedItem; if (item == null) { return; } if (IsAlreadySelected(item)) { return; } lstSelected.Items.Add(item); }
private bool IsAlreadySelected(Utilities.ConfigItem o) { return(IsAlreadySelected(o.Id)); }