Changeset - 50bbf5233575
[Not reviewed]
default
0 1 0
Jason Maltzen (jmaltzen) - 6 years ago 2018-05-18 18:06:20
jason.maltzen@unsanctioned.net
Make the parameters to recipe generation more readable in code.
1 file changed with 12 insertions and 1 deletions:
0 comments (0 inline, 0 general)
UI/RecipeGeneratorView.cs
Show inline comments
...
 
@@ -453,25 +453,36 @@ namespace DesertPaintLab
 
            lastCheckpoint = lastProgressUpdate;
 

	
 
            running = true;
 
            canceling = false;
 
            pauseForCheckpoint = false;
 
            stopResumeButton.Label = "Pause";
 

	
 
            if (Started != null)
 
            {
 
                Started(this, null);
 
            }
 

	
 
            generator.BeginRecipeGeneration((uint)(checkButtonRibbon.Active ? PaintRecipe.RIBBON_RECIPE_MIN_CONCENTRATION : PaintRecipe.PAINT_RECIPE_MIN_CONCENTRATION), (uint)maxRecipeSpinButton.ValueAsInt, (uint)minIngredientsSpinButton.Value, (uint)maxIngredientsSpinButton.ValueAsInt, (uint)fullQuantityDepthSpinButton.ValueAsInt, (uint)fullQuantitySpinButton.ValueAsInt);
 
            uint minConcentration = (uint)(checkButtonRibbon.Active ? PaintRecipe.RIBBON_RECIPE_MIN_CONCENTRATION : PaintRecipe.PAINT_RECIPE_MIN_CONCENTRATION);
 
            uint maxConcentration = (uint)maxRecipeSpinButton.ValueAsInt;
 
            uint minIngredients = (uint)minIngredientsSpinButton.Value;
 
            uint maxIngredients = (uint)maxIngredientsSpinButton.ValueAsInt;
 
            uint fullQuantityDepth = (uint)fullQuantityDepthSpinButton.ValueAsInt;
 
            uint fullQuantity = (uint)fullQuantitySpinButton.ValueAsInt;
 
            generator.BeginRecipeGeneration(minConcentration, 
 
                                            maxConcentration, 
 
                                            minIngredients, 
 
                                            maxIngredients, 
 
                                            fullQuantityDepth, 
 
                                            fullQuantity);
 
        }
 

	
 
        protected void OnStopResume(object sender, EventArgs e)
 
        {
 
            if (generator != null)
 
            {
 
                if (running)
 
                {
 
                    canceling = true;
 
                    pauseForCheckpoint = false;
 
                    generator.Stop();
 
                }
0 comments (0 inline, 0 general)