Exemplo n.º 1
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 16, Configuration.FieldSeparator),
                       Id,
                       ProviderAdjustmentNumber?.ToDelimitedString(),
                       PayerAdjustmentNumber?.ToDelimitedString(),
                       AdjustmentSequenceNumber.HasValue ? AdjustmentSequenceNumber.Value.ToString(culture) : null,
                       AdjustmentCategory?.ToDelimitedString(),
                       AdjustmentAmount?.ToDelimitedString(),
                       AdjustmentQuantity?.ToDelimitedString(),
                       AdjustmentReasonPa?.ToDelimitedString(),
                       AdjustmentDescription,
                       OriginalValue.HasValue ? OriginalValue.Value.ToString(Consts.NumericFormat, culture) : null,
                       SubstituteValue.HasValue ? SubstituteValue.Value.ToString(Consts.NumericFormat, culture) : null,
                       AdjustmentAction?.ToDelimitedString(),
                       ProviderAdjustmentNumberCrossReference?.ToDelimitedString(),
                       ProviderProductServiceLineItemNumberCrossReference?.ToDelimitedString(),
                       AdjustmentDate.HasValue ? AdjustmentDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       ResponsibleOrganization?.ToDelimitedString()
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
Exemplo n.º 2
0
 public void ZoomOut(AdjustmentAmount AdjAmount)
 {
     if (AdjAmount == AdjustmentAmount.All)
     {
         projector.ResetPanning();
         camera.ZoomTarget = this.MinimumPixelsPerRadian;
     }
     else
     {
         camera.ZoomTarget = validateZoom(camera.ZoomTarget / getZoomAdjustmentAmount(AdjAmount));
     }
     showZoomMessage();
 }
Exemplo n.º 3
0
 private void zoomIn(AdjustmentAmount AdjAmount)
 {
     if (AdjAmount == AdjustmentAmount.All)
     {
         projector.ResetPanning();
         camera.ZoomTarget = fullZoomAmount((camera.DesiredPosition - camera.BodyBeingViewed.Position).Magnitude, camera.BodyBeingViewed);
     }
     else
     {
         camera.ZoomTarget = validateZoom(camera.ZoomTarget * getZoomAdjustmentAmount(AdjAmount));
     }
     showZoomMessage();
 }
Exemplo n.º 4
0
 private void slowDown(AdjustmentAmount AdjAmount)
 {
     if (physics.StartupDone)
     {
         if (physics.SlowDown(AdjAmount))
         {
             messageWidget.SetMessage(String.Format("Slow Down Time: {0:0}x", physics.TimeFactor));
         }
         else
         {
             messageWidget.SetMessage("Real Time");
         }
     }
 }
Exemplo n.º 5
0
 private void speedUp(AdjustmentAmount AdjAmount)
 {
     if (physics.StartupDone)
     {
         if (physics.SpeedUp(AdjAmount))
         {
             messageWidget.SetMessage(String.Format("Speed Up Time: {0:0}x", physics.TimeFactor));
         }
         else
         {
             messageWidget.SetMessage("Maximum Speed");
         }
     }
 }
Exemplo n.º 6
0
        private double getPanAdjustmentAmount(AdjustmentAmount AdjAmount)
        {
            switch (AdjAmount)
            {
            case AdjustmentAmount.All:
            case AdjustmentAmount.Large:
                return(5);

            case AdjustmentAmount.Normal:
                return(1);

            case AdjustmentAmount.Fine:
            default:
                return(0.25);
            }
        }
Exemplo n.º 7
0
        private double getZoomAdjustmentAmount(AdjustmentAmount AdjAmount)
        {
            switch (AdjAmount)
            {
            case AdjustmentAmount.All:
            case AdjustmentAmount.Large:
                return(5);

            case AdjustmentAmount.Normal:
                return(1.15);

            case AdjustmentAmount.Fine:
            default:
                return(1.04);
            }
        }
Exemplo n.º 8
0
        private double getSpeedFactor(AdjustmentAmount AdjAmount)
        {
            switch (AdjAmount)
            {
            case AdjustmentAmount.All:
                return(double.MaxValue);

            case AdjustmentAmount.Large:
                return(32.0);

            case AdjustmentAmount.Normal:
                return(2.0);

            case AdjustmentAmount.Fine:
            default:
                return(1.25);
            }
        }
Exemplo n.º 9
0
 protected override void SetAmount(FixedAdjustmentAmount value)
 {
     Amount = value;
 }
Exemplo n.º 10
0
 protected override void SetAmount(PercentageAdjustmentAmount value)
 {
     Amount = value;
 }
Exemplo n.º 11
0
 public bool SlowDown(AdjustmentAmount AdjAmount)
 {
     return(changeSpeed(TimeFactor / getSpeedFactor(AdjAmount)));
 }
Exemplo n.º 12
0
 public bool SpeedUp(AdjustmentAmount AdjAmount)
 {
     return(changeSpeed(TimeFactor * getSpeedFactor(AdjAmount)));
 }
Exemplo n.º 13
0
 private void tiltLeft(AdjustmentAmount AdjAmount)
 {
     messageWidget.SetMessage("Tilt Left");
     projector.PanRotate(getPanAdjustmentAmount(AdjAmount));
 }
Exemplo n.º 14
0
 private void panDown(AdjustmentAmount AdjAmount)
 {
     messageWidget.SetMessage("Pan Down");
     projector.PanInclination(-getPanAdjustmentAmount(AdjAmount) / camera.Zoom);
 }
Exemplo n.º 15
0
 private void panRight(AdjustmentAmount AdjAmount)
 {
     messageWidget.SetMessage("Pan Right");
     projector.PanAzimuth(-getPanAdjustmentAmount(AdjAmount) / camera.Zoom);
 }