parent
f63d7cf388
commit
37c942fdb2
2 changed files with 4 additions and 14 deletions
|
|
@ -819,8 +819,10 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
{
|
||||
if (settingsValue.Contains("%"))
|
||||
{
|
||||
string onlyNumber = settingsValue.Replace("%", "");
|
||||
double ratio = Helpers.ParseDouble(onlyNumber) / 100;
|
||||
// Remove % and parse out double value
|
||||
double.TryParse(settingsValue.Replace("%", ""), out double doubleValue);
|
||||
|
||||
double ratio = doubleValue / 100;
|
||||
|
||||
if (settingsKey == SettingsKey.first_layer_height)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -80,18 +80,6 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
}).ToArray();
|
||||
}
|
||||
|
||||
internal double ParseDouble(string firstLayerValueString)
|
||||
{
|
||||
double firstLayerValue;
|
||||
|
||||
if (!double.TryParse(firstLayerValueString, out firstLayerValue))
|
||||
{
|
||||
throw new Exception(string.Format("Format cannot be parsed. FirstLayerHeight '{0}'", firstLayerValueString));
|
||||
}
|
||||
|
||||
return firstLayerValue;
|
||||
}
|
||||
|
||||
public void SetBaudRate(string baudRate)
|
||||
{
|
||||
printerSettings.SetValue(SettingsKey.baud_rate, baudRate);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue