Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ImportedProjects
SVG
Commits
6d1b5eb5
Commit
6d1b5eb5
authored
Jul 15, 2014
by
tebjan
Committed by
Eric Domke
Jul 24, 2014
Browse files
color converter now uses invariant culture to parse
parent
31b085c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/Painting/SvgColourConverter.cs
View file @
6d1b5eb5
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Drawing
;
using
System.Globalization
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
namespace
Svg
{
...
...
@@ -31,6 +32,9 @@ namespace Svg
if
(
colour
!=
null
)
{
var
oldCulture
=
Thread
.
CurrentThread
.
CurrentCulture
;
Thread
.
CurrentThread
.
CurrentCulture
=
System
.
Globalization
.
CultureInfo
.
InvariantCulture
;
colour
=
colour
.
Trim
();
if
(
colour
.
StartsWith
(
"rgb"
))
...
...
@@ -79,6 +83,8 @@ namespace Svg
colour
=
string
.
Format
(
culture
,
"#{0}{0}{1}{1}{2}{2}"
,
colour
[
1
],
colour
[
2
],
colour
[
3
]);
return
base
.
ConvertFrom
(
context
,
culture
,
colour
);
}
Thread
.
CurrentThread
.
CurrentCulture
=
oldCulture
;
}
return
base
.
ConvertFrom
(
context
,
culture
,
value
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment