개정판 3b938959
issue #000000 검색 수정
Change-Id: I7ac25e17a0b62f753c52f52b8a77b73bb3bbe2bf
KCOM/Common/Converter/SvgImageConverter.cs | ||
---|---|---|
32 | 32 |
|
33 | 33 |
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
34 | 34 |
{ |
35 |
ImageSource imageSource = null; |
|
36 |
|
|
35 | 37 |
try |
36 | 38 |
{ |
37 | 39 |
if (string.IsNullOrWhiteSpace(_appName)) |
... | ... | |
68 | 70 |
|
69 | 71 |
if (svgSource.ToString().EndsWith(".svg")) |
70 | 72 |
{ |
71 |
return this.GetImage(svgSource); |
|
73 |
//SharpVectors.Converters.SvgImageExtension svgImage = new SharpVectors.Converters.SvgImageExtension(svgSource.ToString()); |
|
74 |
|
|
75 |
//return (DrawingImage)svgImage.ProvideValue(null); |
|
76 |
//var context = TaskScheduler.FromCurrentSynchronizationContext(); |
|
77 |
|
|
78 |
//var task = Task.Factory.StartNew<SharpVectors.Converters.SvgImageExtension>(() => |
|
79 |
//{ |
|
80 |
// return new SharpVectors.Converters.SvgImageExtension(svgSource.ToString()); |
|
81 |
|
|
82 |
//},TaskCreationOptions.RunContinuationsAsynchronously).ContinueWith((x)=> |
|
83 |
//{ |
|
84 |
// return (DrawingImage)x.Result.ProvideValue(null); |
|
85 |
//},context); |
|
86 |
|
|
87 |
//imageSource = task.Result; |
|
88 |
|
|
89 |
imageSource = this.GetImage(svgSource); |
|
90 |
//return this.GetImage(svgSource); |
|
72 | 91 |
} |
73 | 92 |
else |
74 | 93 |
{ |
75 |
return new BitmapImage(new Uri(value.ToString()));
|
|
94 |
imageSource = new BitmapImage(new Uri(value.ToString()));
|
|
76 | 95 |
} |
77 | 96 |
|
78 | 97 |
} |
... | ... | |
80 | 99 |
{ |
81 | 100 |
//throw; #82 |
82 | 101 |
} |
83 |
return null; |
|
102 |
|
|
103 |
return imageSource; |
|
84 | 104 |
} |
85 | 105 |
|
86 | 106 |
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
내보내기 Unified diff