Ejemplo n.º 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();
         }
     }
 }
Ejemplo n.º 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();
         }
     }
 }
Ejemplo n.º 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();
                }
            }
        }
Ejemplo n.º 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();
                }
            }
        }