Skip to content

Commit

Permalink
fix crashing issue when decimal symbol is not a period.
Browse files Browse the repository at this point in the history
update version;
  • Loading branch information
Carl Chang committed Nov 25, 2023
1 parent 8b7a928 commit f3852b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Helpers/Converters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
public class MathMultiplyConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
if (!(value is double)) value = System.Convert.ToDouble(value);
if (!(parameter is double)) parameter = System.Convert.ToDouble(parameter);
if (!(value is double)) value = System.Convert.ToDouble(value, culture);
if (!(parameter is double)) parameter = System.Convert.ToDouble(parameter, culture);
return (double)value * (double)parameter;
}

Expand All @@ -115,7 +115,7 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
public class ThicknessMultiplyConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
var val = System.Convert.ToDouble(value);
var val = System.Convert.ToDouble(value, culture);
var paras = (parameter as string)?.Split(',', ' ');
if (paras?.Length == 4)
return new Thickness(val * double.Parse(paras[0]),
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.8.0")]
[assembly: AssemblyFileVersion("1.2.8.0")]
[assembly: AssemblyVersion("1.2.9.0")]
[assembly: AssemblyFileVersion("1.2.9.0")]

0 comments on commit f3852b5

Please sign in to comment.