private void ButtonCelsiusToFahrenheit_Click(object sender, EventArgs e) { WriteRecipeInRichTextBox(ServicesFacade.ConvertRecipeMeasurements(RecipeToShow, ConversionType.Celsius_To_Fahrenheit, ButtonCelsiusToFahrenheit.Text != _conversionButtonsInitialText[(Button)sender])); ReverseConversionButtonText(ButtonCelsiusToFahrenheit); // Find a way to convert temperatures in instructions }
private void ButtonSubmitUrl_Click(object sender, EventArgs e) { var recipe = ServicesFacade.GetRecipe(TextBoxRecipeUrl.Text); RecipeToShow = recipe; WriteRecipeInRichTextBox(RecipeToShow); }
private void ButtonPoundToGram_Click(object sender, EventArgs e) { WriteRecipeInRichTextBox(ServicesFacade.ConvertRecipeMeasurements(RecipeToShow, ConversionType.Pound_To_Gram, ButtonPoundToGram.Text != _conversionButtonsInitialText[(Button)sender])); ReverseConversionButtonText(ButtonPoundToGram); }
private void ButtonGallonToLiter_Click(object sender, EventArgs e) { WriteRecipeInRichTextBox(ServicesFacade.ConvertRecipeMeasurements(RecipeToShow, ConversionType.Gallon_To_Liter, ButtonGallonToLiter.Text != _conversionButtonsInitialText[(Button)sender])); ReverseConversionButtonText(ButtonGallonToLiter); }
private void ButtonPintToCup_Click(object sender, EventArgs e) { WriteRecipeInRichTextBox(ServicesFacade.ConvertRecipeMeasurements(RecipeToShow, ConversionType.Pint_To_Cup, ButtonPintToCup.Text != _conversionButtonsInitialText[(Button)sender])); ReverseConversionButtonText(ButtonPintToCup); }
private void ButtonCupToFluidOunce_Click(object sender, EventArgs e) { WriteRecipeInRichTextBox(ServicesFacade.ConvertRecipeMeasurements(RecipeToShow, ConversionType.Cup_To_FluidOunce, ButtonCupToFluidOunce.Text != _conversionButtonsInitialText[(Button)sender])); ReverseConversionButtonText(ButtonCupToFluidOunce); }
private void ButtonTableSpoonToTeaSpoon_Click(object sender, EventArgs e) { WriteRecipeInRichTextBox(ServicesFacade.ConvertRecipeMeasurements(RecipeToShow, ConversionType.TableSpoon_To_TeaSpoon, ButtonTableSpoonToTeaSpoon.Text != _conversionButtonsInitialText[(Button)sender])); ReverseConversionButtonText(ButtonTableSpoonToTeaSpoon); }
private void ButtonQuadrupleScale_Click(object sender, EventArgs e) { SetSelectedScaleButtonColor(ButtonQuadrupleScale); WriteRecipeInRichTextBox(ServicesFacade.GetScaledRecipe(RecipeToShow, 4)); }