6 using Syncfusion.Windows.Forms.Tools;
24 this.InitializeComponent();
34 this.resolution = res;
35 this.radialSliderLaserSweepSteps.Value = this.resolution.
SweepSteps;
36 this.RadialSliderPrecision.Value = this.resolution.
Steps;
37 this.textBoxDegrees.Text = this.resolution.
Degrees.ToString(CultureInfo.InvariantCulture);
47 private void RadialSliderPrecision_ValueChanged(
object sender, RadialSlider.ValueChangedEventArgs args)
50 this.resolution.
Steps = (int)Math.Round(
this.RadialSliderPrecision.Value);
51 this.RadialSliderPrecision.Value = this.resolution.
Steps;
53 float degreePerStep = this.configuration.Motor.MicroStepsEnabled
54 ? 360.0f / (float)(this.configuration.Motor.Steps*
this.configuration.Motor.MicroSteps)
55 : 360.0f / (float)this.configuration.Motor.Steps;
57 this.resolution.Degrees = degreePerStep *
this.resolution.Steps;
58 this.textBoxDegrees.Text =
this.resolution.Degrees.ToString(CultureInfo.InvariantCulture);
59 this.UpdateResolutionConfiguration();
69 private void radialSliderLaserSweepSteps_ValueChanged(
object sender, RadialSlider.ValueChangedEventArgs args)
71 this.resolution.
SweepSteps = (int)Math.Round(
this.radialSliderLaserSweepSteps.Value);
72 this.radialSliderLaserSweepSteps.Value = this.resolution.
SweepSteps;
73 this.UpdateResolutionConfiguration();
77 private void UpdateResolutionConfiguration()
79 for (
int i = 0; i < this.configuration.Resolutions.Count; i++)
81 if (this.configuration.Resolutions[i].Precision !=
this.resolution.Precision)
84 this.configuration.Resolutions[i] = this.resolution;
Configuration of a scan resulution
int Steps
Gets or sets the steps.
PrecisionControl()
Initializes a new instance of the PrecisionControl class.
Class for creating a singleton for a generic class
static T Instance
Gets the instance.
Control for setting a precision
void Init(Resolution res)
Initializes the specified resource.
int SweepSteps
Gets or sets the sweep steps.
float Degrees
Gets or sets the degrees.