Пример #1
0
        public bool Left; // going away from the junction.

        public void Apply()
        {
            Assert(!refreshing_, "!refreshing_");
            Log.Debug("LockDirCheckbox.Apply called()\n" /* + Environment.StackTrace*/);

            SegmentEndData data = root_?.GetData() as SegmentEndData;

            if (data == null)
            {
                return;
            }

            data.Corner(Left).LockLength = this.isChecked;
            if (ControlIsPressed && Mirror != null)
            {
                Mirror.isChecked = isChecked;
            }

            data.RefreshAndUpdate();
            root_.Refresh();
        }
Пример #2
0
 public void Apply()
 {
     if (VERBOSE)
     {
         Log.Debug(ThisMethod + " called\n" + Environment.StackTrace);
     }
     if (root_ is UINodeControllerPanel)
     {
         throw new NotImplementedException();
     }
     else if (root_ is UISegmentEndControllerPanel segPanel)
     {
         ApplySegmentEnd();
         Assertion.Assert(!refreshing_, "!refreshing_");
         SegmentEndData data = segPanel.SegmentEndData;
         data?.RefreshAndUpdate();
         segPanel.Refresh();
     }
     else
     {
         throw new Exception("Unreachable code. root_=" + root_);
     }
 }
        public void Apply()
        {
            Log.Debug("UIUnFlattenJunctionsCheckbox.Apply called()\n" /* + Environment.StackTrace*/);
            SegmentEndData data = root_?.GetData() as SegmentEndData;

            if (data == null)
            {
                return;
            }

            data.FlatJunctions = this.isChecked;
            if (!this.isChecked)
            {
                data.Twist = false;
            }
            else
            {
                data.Twist = data.DefaultTwist;
            }
            data.DeltaSlopeAngleDeg = 0;
            Assert(!refreshing_, "!refreshing_");
            data.RefreshAndUpdate();
            root_.Refresh();
        }