コード例 #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));
 }