개정판 a1e2ba68
markus 외부주소 오류 수정
Change-Id: I03bd3df4edb78472d7d45f7a8c5db87fdfda226b
MarkupToPDF/Controls/Etc/ImgControl.cs | ||
---|---|---|
461 | 461 |
/// </summary> |
462 | 462 |
/// <param name="str"></param> |
463 | 463 |
/// <returns></returns> |
464 |
public static ImgControl FromString(string str, SolidColorBrush brush, string sProjectNo) |
|
464 |
public static ImgControl FromString(string str, SolidColorBrush brush, string sProjectNo, string baseUri)
|
|
465 | 465 |
{ |
466 | 466 |
ImgControl instance = null; |
467 | 467 |
using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(str)) |
468 | 468 |
{ |
469 |
UriBuilder downloadUri = new UriBuilder(baseUri); |
|
470 |
UriBuilder uri = new UriBuilder(s.ImagePath); |
|
471 |
uri.Host = downloadUri.Host; |
|
472 |
uri.Port = downloadUri.Port; |
|
473 |
|
|
469 | 474 |
Image img = new Image(); |
470 | 475 |
if (s.ImagePath.Contains(".svg")) |
471 | 476 |
{ |
... | ... | |
473 | 478 |
DrawingImage image = null; |
474 | 479 |
using (System.Net.WebClient web = new System.Net.WebClient()) |
475 | 480 |
{ |
476 |
imageData = web.DownloadData(new Uri(s.ImagePath));
|
|
481 |
imageData = web.DownloadData(uri.Uri);
|
|
477 | 482 |
System.IO.Stream stream = new System.IO.MemoryStream(imageData); |
478 | 483 |
image = SvgReader.Load(stream); |
479 | 484 |
} |
... | ... | |
481 | 486 |
} |
482 | 487 |
else |
483 | 488 |
{ |
484 |
img.Source = new BitmapImage(new Uri(s.ImagePath));
|
|
489 |
img.Source = new BitmapImage(uri.Uri);
|
|
485 | 490 |
} |
486 | 491 |
|
487 | 492 |
instance = new ImgControl |
내보내기 Unified diff