private async void btnAddShelf_Click(object sender, EventArgs e) { var addShelfResponse = await Infrastructure.AddShelf(tbShelfName.Text); if (addShelfResponse.ErrorCode) { Shelves.Add((ShelfResponse)addShelfResponse.Object); ShowShelves(); cbShelves.SelectedIndex = cbShelves.Items.Count - 1; } else if (!string.IsNullOrEmpty(addShelfResponse.Message)) { MessageBox.Show(addShelfResponse.Message, "Fel"); } }