Convert thread thickness and filter stitches threshold from double to float

Branch_2.1.x
Nathan Crawford 2015-04-17 00:24:39 -04:00
rodzic 088682071b
commit 0d4ec463f2
2 zmienionych plików z 12 dodań i 12 usunięć

Wyświetl plik

@ -220,14 +220,14 @@ namespace embroideryReader
}
}
public double threadThickness
public float threadThickness
{
get
{
double thickness = settings.getValue(SETTING_THREAD_THICKNESS, 5.0);
if (thickness < 1.0)
float thickness = settings.getValue(SETTING_THREAD_THICKNESS, 5.0f);
if (thickness < 1.0f)
{
thickness = 1.0;
thickness = 1.0f;
}
return thickness;
}
@ -237,14 +237,14 @@ namespace embroideryReader
}
}
public double filterStitchesThreshold
public float filterStitchesThreshold
{
get
{
double threshold = settings.getValue(SETTING_FILTER_STITCHES_THRESHOLD, 64.0);
if (threshold < 10.0)
float threshold = settings.getValue(SETTING_FILTER_STITCHES_THRESHOLD, 64.0f);
if (threshold < 10.0f)
{
threshold = 10.0;
threshold = 10.0f;
}
return threshold;
}

Wyświetl plik

@ -94,16 +94,16 @@ namespace embroideryReader
private void btnOK_Click(object sender, EventArgs e)
{
double threadThickness;
if (Double.TryParse(txtThreadThickness.Text, out threadThickness))
float threadThickness;
if (Single.TryParse(txtThreadThickness.Text, out threadThickness))
{
settings.threadThickness = threadThickness;
}
settings.filterStiches = chkUglyStitches.Checked;
double threshold;
if (Double.TryParse(txtThreshold.Text, out threshold))
float threshold;
if (Single.TryParse(txtThreshold.Text, out threshold))
{
settings.filterStitchesThreshold = threshold;
}