Exemple #1
0
 public void UpdateControls(PublicPropertyChange change)
 {
     change.SetRowVisible(nameof(StartingAngle), () => Advanced);
     change.SetRowVisible(nameof(EndingAngle), () => Advanced);
     change.SetRowVisible(nameof(RingSides), () => Advanced);
     change.SetRowVisible(nameof(RingPhaseAngle), () => Advanced);
 }
        public void UpdateControls(PublicPropertyChange change)
        {
            changeSet.Clear();

            changeSet.Add(nameof(RotationDistance), RotationType == RotationTypes.Distance);
            changeSet.Add(nameof(Angle), RotationType == RotationTypes.Angle);
            changeSet.Add(nameof(RotationOffset), Advanced);
            changeSet.Add(nameof(StartHeightPercent), Advanced);
            changeSet.Add(nameof(EasingOption), Advanced && EasingType != Easing.EaseType.Linear);
            changeSet.Add(nameof(EasingType), Advanced);
            changeSet.Add(nameof(EndHeightPercent), Advanced);
            changeSet.Add(nameof(EasyModeMessage), !Advanced);
            changeSet.Add(nameof(PreferedRadius), RadiusProvider != null && !this.EditRadius && RotationType == RotationTypes.Distance);
            changeSet.Add(nameof(OverrideRadius), (RadiusProvider == null || this.EditRadius) && RotationType == RotationTypes.Distance);
            changeSet.Add(nameof(EditRadius), RadiusProvider != null && RotationType == RotationTypes.Distance);

            // first turn on all the settings we want to see
            foreach (var kvp in changeSet.Where(c => c.Value))
            {
                change.SetRowVisible(kvp.Key, () => kvp.Value);
            }

            // then turn off all the settings we want to hide
            foreach (var kvp in changeSet.Where(c => !c.Value))
            {
                change.SetRowVisible(kvp.Key, () => kvp.Value);
            }
        }
 public void UpdateControls(PublicPropertyChange change)
 {
     change.SetRowVisible(nameof(StartingAngle), () => Advanced);
     change.SetRowVisible(nameof(EndingAngle), () => Advanced);
     change.SetRowVisible(nameof(LatitudeSides), () => Advanced);
     change.SetRowVisible(nameof(EasyModeMessage), () => !Advanced);
 }
Exemple #4
0
 public void UpdateControls(PublicPropertyChange change)
 {
     change.SetRowVisible(nameof(Histogram), () => AnalysisType != AnalysisTypes.Transparency);
     change.SetRowVisible(nameof(MinSurfaceArea), () => AnalysisType != AnalysisTypes.Transparency);
     change.SetRowVisible(nameof(TransparencyMessage), () => AnalysisType == AnalysisTypes.Transparency);
     change.SetRowVisible(nameof(MinSurfaceArea), () => NumLineLoops > 1);
 }
 public void UpdateControls(PublicPropertyChange change)
 {
     change.SetRowVisible(nameof(Round), () => Advanced);
     change.SetRowVisible(nameof(RoundSegments), () => Advanced || Round != RoundTypes.None);
     change.SetRowVisible(nameof(StartingAngle), () => Advanced);
     change.SetRowVisible(nameof(EndingAngle), () => Advanced);
     change.SetRowVisible(nameof(EasyModeMessage), () => !Advanced);
     change.SetRowVisible(nameof(RoundDirection), () => Advanced && Round != RoundTypes.None);
     change.SetRowVisible(nameof(RoundSegments), () => Advanced && Round != RoundTypes.None);
     change.SetRowVisible(nameof(Direction), () => Advanced && Round != RoundTypes.None);
 }
Exemple #6
0
        public void UpdateControls(PublicPropertyChange change)
        {
            changeSet.Clear();

            changeSet.Add(nameof(NoBaseMessage), BaseType == BaseTypes.None);
            changeSet.Add(nameof(SpaceHolder1), BaseType == BaseTypes.None || BaseType == BaseTypes.Rectangle);
            changeSet.Add(nameof(SpaceHolder2), BaseType == BaseTypes.None);
            changeSet.Add(nameof(BaseSize), BaseType != BaseTypes.None);
            changeSet.Add(nameof(InfillAmount), BaseType == BaseTypes.Outline);
            changeSet.Add(nameof(Centering), BaseType == BaseTypes.Circle);
            changeSet.Add(nameof(ExtrusionHeight), BaseType != BaseTypes.None);

            // first turn on all the settings we want to see
            foreach (var kvp in changeSet.Where(c => c.Value))
            {
                change.SetRowVisible(kvp.Key, () => kvp.Value);
            }

            // then turn off all the settings we want to hide
            foreach (var kvp in changeSet.Where(c => !c.Value))
            {
                change.SetRowVisible(kvp.Key, () => kvp.Value);
            }
        }
        public void UpdateControls(PublicPropertyChange change)
        {
            if (change.Context.GetEditRow(nameof(DiameterTop)) is GuiWidget diameterWidget)
            {
                diameterWidget.Visible = Advanced;
            }

            if (change.Context.GetEditRow(nameof(StartingAngle)) is GuiWidget startingAngleWidget)
            {
                startingAngleWidget.Visible = Advanced;
            }

            if (change.Context.GetEditRow(nameof(EndingAngle)) is GuiWidget endingAngleWidget)
            {
                endingAngleWidget.Visible = Advanced;
            }

            change.SetRowVisible(nameof(EasyModeMessage), () => !Advanced);
        }
 public void UpdateControls(PublicPropertyChange change)
 {
     change.SetRowVisible(nameof(RoundSegments), () => Round);
     change.SetRowVisible(nameof(Radius), () => Round);
 }
 public void UpdateControls(PublicPropertyChange change)
 {
     change.SetRowVisible(nameof(Diameter), () => BendType == BendTypes.Diameter);
     change.SetRowVisible(nameof(Angle), () => BendType == BendTypes.Angle);
     change.SetRowVisible(nameof(MinSidesPerRotation), () => SplitMesh);
 }
 public void UpdateControls(PublicPropertyChange change)
 {
     change.SetRowVisible(nameof(RoundSegments), () => Round != RoundTypes.None);
 }