Beispiel #1
0
 /*
  * 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();
         }
     }
 }
Beispiel #2
0
 /*
  * 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();
         }
     }
 }
Beispiel #3
0
        /*
         * 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();
                }
            }
        }
Beispiel #4
0
        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();
                }
            }
        }