/* * Opens the Ingredient Picker for yeasts * */ private void AddYeastButton_Click(object sender, EventArgs e) { using (var yeastDialog = new IngredientPicker("Yeasts")) { var result = yeastDialog.ShowDialog(); if (result == DialogResult.OK) { LoadYeast(yeastDialog.selectedKey); populateGrids(); } } }
/* * old stuff for the adjunct grid. * */ private void AddOtherIngredientsButton_Click(object sender, EventArgs e) { using (var adjunctDialog = new IngredientPicker("Adjuncts")) { var result = adjunctDialog.ShowDialog(); if (result == DialogResult.OK) { LoadAdjunct(adjunctDialog.selectedKey); populateGrids(); } } }
/* * Opens the ingredient picker in malt mode... * */ private void AddMaltButton_Click(object sender, EventArgs e) { BackPopulateRecipeFromGridChange(); using (var MaltDialog = new IngredientPicker("Malts")) { var result = MaltDialog.ShowDialog(); if (result == DialogResult.OK) { LoadMalt(MaltDialog.selectedKey); populateGrids(); } } }
private void BeerStyleLabel_Click(object sender, EventArgs e) { APIHandler handler = new APIHandler(); using (var MaltDialog = new IngredientPicker("Style")) { var result = MaltDialog.ShowDialog(); if (result == DialogResult.OK) { currentRecipe.styleID = MaltDialog.selectedKey; currentRecipe.style = handler.getStyle(MaltDialog.selectedKey).name; populateGrids(); } } }