예제 #1
0
 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
 }
예제 #2
0
        private void ButtonSubmitUrl_Click(object sender, EventArgs e)
        {
            var recipe = ServicesFacade.GetRecipe(TextBoxRecipeUrl.Text);

            RecipeToShow = recipe;
            WriteRecipeInRichTextBox(RecipeToShow);
        }
예제 #3
0
 private void ButtonPoundToGram_Click(object sender, EventArgs e)
 {
     WriteRecipeInRichTextBox(ServicesFacade.ConvertRecipeMeasurements(RecipeToShow,
                                                                       ConversionType.Pound_To_Gram, ButtonPoundToGram.Text != _conversionButtonsInitialText[(Button)sender]));
     ReverseConversionButtonText(ButtonPoundToGram);
 }
예제 #4
0
 private void ButtonGallonToLiter_Click(object sender, EventArgs e)
 {
     WriteRecipeInRichTextBox(ServicesFacade.ConvertRecipeMeasurements(RecipeToShow,
                                                                       ConversionType.Gallon_To_Liter, ButtonGallonToLiter.Text != _conversionButtonsInitialText[(Button)sender]));
     ReverseConversionButtonText(ButtonGallonToLiter);
 }
예제 #5
0
 private void ButtonPintToCup_Click(object sender, EventArgs e)
 {
     WriteRecipeInRichTextBox(ServicesFacade.ConvertRecipeMeasurements(RecipeToShow,
                                                                       ConversionType.Pint_To_Cup, ButtonPintToCup.Text != _conversionButtonsInitialText[(Button)sender]));
     ReverseConversionButtonText(ButtonPintToCup);
 }
예제 #6
0
 private void ButtonCupToFluidOunce_Click(object sender, EventArgs e)
 {
     WriteRecipeInRichTextBox(ServicesFacade.ConvertRecipeMeasurements(RecipeToShow,
                                                                       ConversionType.Cup_To_FluidOunce, ButtonCupToFluidOunce.Text != _conversionButtonsInitialText[(Button)sender]));
     ReverseConversionButtonText(ButtonCupToFluidOunce);
 }
예제 #7
0
 private void ButtonTableSpoonToTeaSpoon_Click(object sender, EventArgs e)
 {
     WriteRecipeInRichTextBox(ServicesFacade.ConvertRecipeMeasurements(RecipeToShow,
                                                                       ConversionType.TableSpoon_To_TeaSpoon, ButtonTableSpoonToTeaSpoon.Text != _conversionButtonsInitialText[(Button)sender]));
     ReverseConversionButtonText(ButtonTableSpoonToTeaSpoon);
 }
예제 #8
0
 private void ButtonQuadrupleScale_Click(object sender, EventArgs e)
 {
     SetSelectedScaleButtonColor(ButtonQuadrupleScale);
     WriteRecipeInRichTextBox(ServicesFacade.GetScaledRecipe(RecipeToShow, 4));
 }