Esempio n. 1
0
      private void MovementAxialToggleButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         bool selectionA = this.MovementAxialToggleButton.OptionASelected;
         bool selectionB = this.MovementAxialToggleButton.OptionBSelected;
         bool selection = !selectionA;

         if (selectionA == selectionB)
         {
            selection = true;
         }

         MovementForwardModes mode = (false != selection) ? MovementForwardModes.normalAxial : MovementForwardModes.circumferential;
         NicBotComm.Instance.SetMovementForwardMode(mode);

         this.UpdateMovementControls();
      }
Esempio n. 2
0
      private void SensorDirectionTextPanel_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         DirectionEntryForm directionEntryForm = new DirectionEntryForm();
         this.SetDialogLocation(this.SensorDirectionTextPanel, directionEntryForm);

         directionEntryForm.Direction = this.sensorDirection;

         this.DimBackground();
         DialogResult result = directionEntryForm.ShowDialog();
         this.LightBackground();

         if (System.Windows.Forms.DialogResult.OK == result)
         {
            this.sensorDirection = directionEntryForm.Direction;
            this.SensorDirectionTextPanel.ValueText = this.sensorDirection.ToString().ToUpper();
            this.SensorDirectionTextPanel.BackColor = Color.FromArgb(51, 51, 51);
         }
      }
Esempio n. 3
0
 private void SystemResetButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
 {
    this.RestartSystem();
 }
Esempio n. 4
0
 private void SealantPressureDecreaseButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
 {
    this.DecreaseSealantPressure();
    e.Handled = true;
 }
Esempio n. 5
0
      private void SensorLatitudeTextPanel_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         double latitude = ParameterAccessor.Instance.Latitude;
         DialogResult result = this.LaunchNumberEdit(ref latitude, this.SensorLatitudeTextPanel, "LATITUDE", 4, "°", 40.812838, -90, 90);

         if (result == System.Windows.Forms.DialogResult.OK)
         {
            ParameterAccessor.Instance.Latitude = latitude;
            this.SensorLatitudeTextPanel.ValueText = latitude.ToString("N4");
         }
      }
Esempio n. 6
0
 private void SealantAutoStartButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
 {
    NicBotComm.Instance.StartAutoPump(this.toolLocation);
    this.UpdateSealantControls();
 }
Esempio n. 7
0
 private void SealantRelievePressureButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
 {
    NicBotComm.Instance.RelievePumpPressure(this.toolLocation);
 }
Esempio n. 8
0
      private void DrillRotaionSpeedValuePanel_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         DialogResult result = this.LaunchNumberEdit(this.DrillRotaionSetPointSpeedValuePanel, "DRILL SPEED", this.selectedDrill.RotationSpeed);

         if (System.Windows.Forms.DialogResult.OK == result)
         {
            if (false != this.drillManualActivated)
            {
               NicBotComm.Instance.SetDrillRotationSpeed(this.toolLocation, this.selectedDrill.RotationSpeed.OperationalValue);
            }

            this.DrillRotaionSetPointSpeedValuePanel.ValueText = this.GetValueText(this.selectedDrill.RotationSpeed);
         }

         e.Handled = true;
      }
Esempio n. 9
0
      private void DrillSetupButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         DrillSetupForm drillSetupForm = new DrillSetupForm();
         this.SetDialogLocation(this.DrillSetupButton, drillSetupForm);

         drillSetupForm.FrontDrillParameters = ParameterAccessor.Instance.FrontDrill;         
         drillSetupForm.RearDrillParameters = ParameterAccessor.Instance.RearDrill;
         drillSetupForm.DrillLocation = this.toolLocation;

         this.DimBackground();
         drillSetupForm.ShowDialog();
         this.LightBackground();

         this.toolLocation = drillSetupForm.DrillLocation;
         this.SetDrillSelection(this.toolLocation);
         NicBotComm.Instance.ConfigureDrillServo(this.toolLocation);

         e.Handled = true;
      }
Esempio n. 10
0
      private void DrillSealModeButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         this.UpdateSealantControls();

         this.SealantMainPanel.Left = this.DrillMainPanel.Left;
         this.SealantMainPanel.Top = this.DrillMainPanel.Top;
         this.SealantMainPanel.Visible = true;

         this.SealantManualPanel.Left = this.SealantMainPanel.Left;
         this.SealantManualPanel.Top = this.SealantMainPanel.Top + this.SealantMainPanel.Height + 8;
         this.SealantManualPanel.Visible = this.pumpManualVisible;

         this.DrillMainPanel.Visible = false;
         this.DrillManualPanel.Visible = false;


         e.Handled = true;
      }
Esempio n. 11
0
      private void DrillExtendedValuePanel_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         DialogResult result = this.LaunchNumberEdit(this.DrillExtendedSetPointValuePanel, "INDEX POSITION", this.selectedDrill.ExtendedDistance);

         if (result == System.Windows.Forms.DialogResult.OK)
         {
            NicBotComm.Instance.SetDrillIndexSetPoint(this.toolLocation, this.selectedDrill.ExtendedDistance.OperationalValue);
            //this.DrillExtendedSetPointValuePanel.ValueText = this.GetValueText(this.selectedDrill.ExtendedDistance);
         }

         e.Handled = true;
      }
Esempio n. 12
0
 private void MovementManualAxialToggleButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
 {
    this.MovementAxialToggleButton_HoldTimeout(sender, e);
 }
Esempio n. 13
0
 private void MovementManualSetupButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
 {
    this.MovementSetupButton_HoldTimeout(sender, e);
 }
Esempio n. 14
0
      private void MotorManualMoveSpeedValueButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         DialogResult result = this.LaunchNumberEdit(this.MotorManualMoveSpeedValueButton, "MOVE SPEED", ParameterAccessor.Instance.MovementMotorManualMoveSpeed);

         if (result == System.Windows.Forms.DialogResult.OK)
         {
            this.MotorManualMoveSpeedValueButton.ValueText = this.GetValueText(ParameterAccessor.Instance.MovementMotorManualMoveSpeed);
         }
      }
Esempio n. 15
0
      private void SealantSpeedSetPointValuePanel_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         PumpParameters pumpParameters = (ToolLocations.front == this.toolLocation) ? ParameterAccessor.Instance.FrontPump : ParameterAccessor.Instance.RearPump;
         ValueParameter pumpSpeed = new ValueParameter(pumpParameters.MaximumSpeed);
         pumpSpeed.OperationalValue = NicBotComm.Instance.GetPumpSetPoint(this.toolLocation);
         pumpSpeed.MaximumValue = pumpParameters.MaximumSpeed.OperationalValue;

         DialogResult result = this.LaunchNumberEdit(this.SealantPressureSetPointValuePanel, "PUMP SPEED", pumpSpeed);

         if (result == System.Windows.Forms.DialogResult.OK)
         {
            NicBotComm.Instance.SetPumpSpeed(this.toolLocation, pumpSpeed.OperationalValue);
            this.UpdateSealantControls();
         }

         e.Handled = true;
      }
Esempio n. 16
0
 private void DrillFindOriginButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
 {
    NicBotComm.Instance.FindDrillOrigin(this.toolLocation);
 }
Esempio n. 17
0
      private void SealantSetupButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         SealantSetupForm sealantSetupForm = new SealantSetupForm();
         this.SetDialogLocation(this.SealantSetupButton, sealantSetupForm);

         sealantSetupForm.Pump = (ToolLocations.front == this.toolLocation) ? ParameterAccessor.Instance.FrontPump : ParameterAccessor.Instance.RearPump;
         sealantSetupForm.ToolLocation = this.toolLocation;

         this.DimBackground();
         sealantSetupForm.ShowDialog();
         this.LightBackground();

         this.toolLocation = sealantSetupForm.ToolLocation;
         this.UpdateSealantControls();

         e.Handled = true;
      }
Esempio n. 18
0
 private void DrillSetOriginButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
 {
    NicBotComm.Instance.SetDrillOriginOffset(this.toolLocation);
    double originOffset = NicBotComm.Instance.GetDrillOriginOffset(this.toolLocation);
    NicBotComm.Instance.SetDrillIndexSetPoint(this.toolLocation, originOffset);
 }
Esempio n. 19
0
      private void SealantNozzleToggleButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         bool extended = NicBotComm.Instance.GetNozzleExtended(this.toolLocation);

         if (false != extended)
         {
            NicBotComm.Instance.SetNozzleExtend(this.toolLocation, false);
         }
         else
         {
            NicBotComm.Instance.SetNozzleExtend(this.toolLocation, true);
         }

         this.UpdateSealantControls();
      }
Esempio n. 20
0
      private void DrillManualToggleButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         bool selection = !this.DrillManualToggleButton.OptionASelected;
         this.drillManualActivated = selection;

         if (false != this.drillManualActivated)
         {
            NicBotComm.Instance.SetDrillRotationSpeed(this.toolLocation, this.selectedDrill.RotationSpeed.OperationalValue);
         }
         else
         {
            NicBotComm.Instance.SetDrillRotationSpeed(this.toolLocation, 0);
         }

         e.Handled = true;
      }
Esempio n. 21
0
      private void SealantManualPumpToggleButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         bool selection = !this.SealantManualPumpToggleButton.OptionASelected;
         this.pumpManualActivated = selection;
         this.UpdateSealantControls();

         if (false != this.pumpManualActivated)
         {
            if (false != this.SealantManualModeToggleButton.OptionASelected)
            {
               double pumpPressure = NicBotComm.Instance.GetPumpPressureReading(this.toolLocation);
               NicBotComm.Instance.SetPumpPressure(this.toolLocation, pumpPressure);
            }
            else
            {
               PumpDirections pumpDirection = (false != this.SealantDirectionToggleButton.OptionASelected) ? PumpDirections.forward : PumpDirections.reverse;
               NicBotComm.Instance.SetPumpDirection(this.toolLocation, pumpDirection);

               NicBotComm.Instance.SetPumpSpeed(this.toolLocation, 0);
            }

            NicBotComm.Instance.StartPump(this.toolLocation);
         }
         else
         {
            NicBotComm.Instance.StopPump(this.toolLocation);
        }
      }
Esempio n. 22
0
 private void DrillAutoStartButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
 {
    NicBotComm.Instance.StartAutoDrill(this.toolLocation);
    this.UpdateDrillControls();
 }
Esempio n. 23
0
 private void SealantSpeedDecreaseButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
 {
    this.DecreaseSealantPumpSpeed();
    e.Handled = true;
 }
Esempio n. 24
0
 private void DrillIndexDownButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
 {
    this.IncrementDrillIndex();
    e.Handled = true;
 }
Esempio n. 25
0
      private void SensorLongitudeTextPanel_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         double longitude = ParameterAccessor.Instance.Longitude;
         DialogResult result = this.LaunchNumberEdit(ref longitude, this.SensorLongitudeTextPanel, "LONGITUDE", 4, "°", -73.254690, -180, 180);

         if (result == System.Windows.Forms.DialogResult.OK)
         {
            ParameterAccessor.Instance.Longitude = longitude;
            this.SensorLongitudeTextPanel.ValueText = longitude.ToString("N4");
         }
      }
Esempio n. 26
0
 private void DrillSpeedDecreaseButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
 {
    this.DecrementDrillSpeed();
    e.Handled = true;
 }
Esempio n. 27
0
      private void CameraButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         CameraSelectButton button = (CameraSelectButton)sender;

         if (CameraSelectModes.light == this.cameraSelectMode)
         {
            ValueParameter value = ParameterAccessor.Instance.GetLightValue(button.Camera);

            if (null != value)
            {
               if (false == button.CenterVisible)
               {
                  button.CenterVisible = true;
                  NicBotComm.Instance.SetCameraLightLevel(button.Camera, button.CenterLevel);
               }

               LightIntensitySelectForm intensityForm = new LightIntensitySelectForm();
               this.SetDialogLocation(button, intensityForm);
               intensityForm.LocationText = button.Text;
               intensityForm.IntensityValue = value;
               intensityForm.Camera = button.Camera;
               this.DimBackground();
               intensityForm.ShowDialog();
               this.LightBackground();

               button.CenterLevel = (int)intensityForm.IntensityValue.OperationalValue;
            }
         }

         e.Handled = true;
      }
Esempio n. 28
0
      private void SealDrillModeButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         this.SetDrillSelection(this.toolLocation);

         this.DrillMainPanel.Left = this.SealantMainPanel.Left;
         this.DrillMainPanel.Top = this.SealantMainPanel.Top;
         this.DrillMainPanel.Visible = true;

         this.DrillManualPanel.Left = this.DrillMainPanel.Left;
         this.DrillManualPanel.Top = this.DrillMainPanel.Top + this.DrillMainPanel.Height + 8;
         this.DrillManualPanel.Visible = this.drillManualVisible;

         this.SealantMainPanel.Visible = false;
         this.SealantManualPanel.Visible = false;

         e.Handled = true;
      }
Esempio n. 29
0
 private void ExitButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
 {
    this.processExitNeeded = true;
    this.processStopNeeded = true;
    //this.StopProcess();
    //this.Close();
 }
Esempio n. 30
0
      private void MovementSetupButton_HoldTimeout(object sender, HoldTimeoutEventArgs e)
      {
         MovementSetupForm motorSetupForm = new MovementSetupForm();
         this.SetDialogLocation(this.MovementSetupButton, motorSetupForm);

         this.DimBackground();
         motorSetupForm.ShowDialog();
         this.LightBackground();

         this.UpdateMovementControls();
         e.Handled = true;
      }