Exemple #1
0
        public SolutionFailureException BuildPattern(Measurements measurements, bool showBasePattern)
        {
            try
            {
                this.showBasePattern = showBasePattern;

                patternsToDraw = new List <Pattern>();
                if (showBasePattern)
                {
                    HoodiePattern hoodiePatternBlockBase = new HoodiePattern();
                    hoodiePatternBlockBase.ProgressStateChanged += HoodiePatternBlockBase_ProgressStateChanged;
                    hoodiePatternBlockBase.Build(measurements);
                    patternsToDraw.Add(hoodiePatternBlockBase);
                }
                HoodiePattern hoodiePatternBlock = new HoodiePattern();
                hoodiePatternBlock.ProgressStateChanged += HoodiePatternBlockBase_ProgressStateChanged;
                hoodiePatternBlock.Build(measurements.Clone().ApplyEase());
                patternsToDraw.Insert(0, hoodiePatternBlock);
                return(null);
            }
            catch (SolutionFailureException ex)
            {
                return(ex);
            }

            //TestPattern();
            //return null;
        }
Exemple #2
0
        public override void BuildPart(Vector2 start)
        {
            base.BuildPart(start);

            Measurements measurementsBase = Measurements.Clone();

            measurementsBase.UnEase();

            List <MeasurmentText> allMeasurements = new List <MeasurmentText>();

            allMeasurements.Add(new MeasurmentText()
            {
                Text = "Garment Measurements", IsBold = true, TextSize = 24f
            });
            allMeasurements.AddRange(convertRange(measurementsBase.GetGarmentMeasurementsList()));
            allMeasurements.Add(new MeasurmentText()
            {
                Text = "Base Measurements", IsBold = true, TextSize = 24f
            });
            allMeasurements.AddRange(convertRange(measurementsBase.GetBodyMeasurementsList()));
            allMeasurements.Add(new MeasurmentText()
            {
                Text = "Ease Measurements", IsBold = true, TextSize = 24f
            });
            allMeasurements.AddRange(convertRange(measurementsBase.EaseMeasurements.GetEaseMeasurementsList()));
            allMeasurements.Add(new MeasurmentText()
            {
                Text = "Base Measurements with Ease Applied", IsBold = true, TextSize = 24f
            });
            allMeasurements.AddRange(convertRange(Measurements.GetBodyMeasurementsList()));

            AddPartEntityMeasurements(start, allMeasurements);
        }