프로젝트

일반

사용자정보

개정판 53880c83

ID53880c83defd8cc6468fd4130469156a289f4e62
상위 6472f348
하위 97e8ad04

이지연이(가) 5년 이상 전에 추가함

issue #886: Symbol legend 생성 작업 중....

차이점 보기:

MarkupToPDF/Controls/Parsing/MarkupParse.cs
26 26
using System.Net.Cache;
27 27
using System.Collections.ObjectModel;
28 28
using MarkupToPDF.Common;
29
using Svg2Xaml;
29 30

  
30 31
namespace MarkupToPDF.Controls.Parsing
31 32
{
......
3278 3279
                            using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(item))
3279 3280
                            {
3280 3281
                                Image img = new Image();
3281
                                img.Source = new BitmapImage(new Uri(s.ImagePath));
3282
                                //img.Source = new BitmapImage(new Uri(s.ImagePath));
3283
                                if (s.ImagePath.Contains(".svg"))
3284
                                {
3285
                                    byte[] imageData = null;
3286
                                    DrawingImage image = null;
3287
                                    using (System.Net.WebClient web = new System.Net.WebClient())
3288
                                    {
3289
                                        imageData = web.DownloadData(new Uri(s.ImagePath));
3290
                                        System.IO.Stream stream = new System.IO.MemoryStream(imageData);
3291
                                        image = SvgReader.Load(stream);
3292
                                    }
3293
                                    img.Source = image;
3294
                                }
3295
                                else
3296
                                {
3297
                                    img.Source = new BitmapImage(new Uri(s.ImagePath));
3298
                                }
3282 3299

  
3283 3300
                                ImgControl instance = new ImgControl
3284 3301
                                {
......
3295 3312
                                };
3296 3313
                                Layer.Children.Add(instance);
3297 3314
                                instance.ApplyTemplate();
3298
                                instance.ImageData = new BitmapImage(new Uri(s.ImagePath));
3315
                                //instance.ImageData = new BitmapImage(new Uri(s.ImagePath));
3316
                                instance.ImageData = img.Source;
3299 3317
                                instance.SetImage();
3300 3318
                            }
3301 3319
                            break;
......
4021 4039
                            using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(item))
4022 4040
                            {
4023 4041
                                Image img = new Image();
4024
                                img.Source = new BitmapImage(new Uri(s.ImagePath));
4042
                                //img.Source = new BitmapImage(new Uri(s.ImagePath));
4043
                                if (s.ImagePath.Contains(".svg"))
4044
                                {
4045
                                    byte[] imageData = null;
4046
                                    DrawingImage image = null;
4047
                                    using (System.Net.WebClient web = new System.Net.WebClient())
4048
                                    {
4049
                                        imageData = web.DownloadData(new Uri(s.ImagePath));
4050
                                        System.IO.Stream stream = new System.IO.MemoryStream(imageData);
4051
                                        image = SvgReader.Load(stream);
4052
                                    }
4053
                                    img.Source = image;
4054
                                }
4055
                                else
4056
                                {
4057
                                    img.Source = new BitmapImage(new Uri(s.ImagePath));
4058
                                }
4025 4059

  
4026 4060
                                ImgControl instance = new ImgControl
4027 4061
                                {
......
4042 4076
                                instance.MarkupInfoID = markupInfoID;
4043 4077
                                baseLayer.Add(instance);
4044 4078
                                instance.ApplyTemplate();
4045
                                instance.ImageData = new BitmapImage(new Uri(s.ImagePath));
4079
                                //instance.ImageData = new BitmapImage(new Uri(s.ImagePath));
4080
                                instance.ImageData = img.Source;
4046 4081
                                instance.SetImage();
4047 4082

  
4048 4083
                            }
......
4755 4790
                            using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(item))
4756 4791
                            {
4757 4792
                                Image img = new Image();
4758
                                img.Source = new BitmapImage(new Uri(s.ImagePath));
4759

  
4793
                                //img.Source = new BitmapImage(new Uri(s.ImagePath));
4794
                                if (s.ImagePath.Contains(".svg"))
4795
                                {
4796
                                    byte[] imageData = null;
4797
                                    DrawingImage image = null;
4798
                                    using (System.Net.WebClient web = new System.Net.WebClient())
4799
                                    {
4800
                                        imageData = web.DownloadData(new Uri(s.ImagePath));
4801
                                        System.IO.Stream stream = new System.IO.MemoryStream(imageData);
4802
                                        image = SvgReader.Load(stream);
4803
                                    }
4804
                                    img.Source = image;
4805
                                }
4806
                                else
4807
                                {
4808
                                    img.Source = new BitmapImage(new Uri(s.ImagePath));
4809
                                }
4760 4810
                                ImgControl instance = new ImgControl
4761 4811
                                {
4762 4812
                                    Angle = s.Angle,
......
4779 4829
                                baseLayer.Add(instance);
4780 4830

  
4781 4831
                                instance.ApplyTemplate();
4782
                                instance.ImageData = new BitmapImage(new Uri(s.ImagePath));
4832
                                //instance.ImageData = new BitmapImage(new Uri(s.ImagePath));
4833
                                instance.ImageData = img.Source;
4783 4834
                                instance.SetImage();
4784 4835

  
4785 4836
                            }
......
5312 5363
                            using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(item))
5313 5364
                            {
5314 5365
                                Image img = new Image();
5315
                                img.Source = new BitmapImage(new Uri(s.ImagePath));
5316

  
5366
                                //img.Source = new BitmapImage(new Uri(s.ImagePath));
5367
                                if (s.ImagePath.Contains(".svg"))
5368
                                {
5369
                                    byte[] imageData = null;
5370
                                    DrawingImage image = null;
5371
                                    using (System.Net.WebClient web = new System.Net.WebClient())
5372
                                    {
5373
                                        imageData = web.DownloadData(new Uri(s.ImagePath));
5374
                                        System.IO.Stream stream = new System.IO.MemoryStream(imageData);
5375
                                        image = SvgReader.Load(stream);
5376
                                    }
5377
                                    img.Source = image;
5378
                                }
5379
                                else
5380
                                {
5381
                                    img.Source = new BitmapImage(new Uri(s.ImagePath));
5382
                                }
5317 5383
                                ImgControl instance = new ImgControl
5318 5384
                                {
5319 5385
                                    Angle = s.Angle,
......
5330 5396

  
5331 5397
                                instance.ApplyTemplate();
5332 5398
                                //instance.ImageData = new BitmapImage(new Uri(s.ImagePath));
5399
                                instance.ImageData = img.Source;
5333 5400
                                baseLayer.Add(instance);
5334 5401
                                instance.ApplyTemplate();
5335 5402
                                instance.SetImage();
......
6115 6182
                            using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(item))
6116 6183
                            {
6117 6184
                                Image img = new Image();
6118
                                img.Source = new BitmapImage(new Uri(s.ImagePath));
6119

  
6185
                                //img.Source = new BitmapImage(new Uri(s.ImagePath));
6186
                                if (s.ImagePath.Contains(".svg"))
6187
                                {
6188
                                    byte[] imageData = null;
6189
                                    DrawingImage image = null;
6190
                                    using (System.Net.WebClient web = new System.Net.WebClient())
6191
                                    {
6192
                                        imageData = web.DownloadData(new Uri(s.ImagePath));
6193
                                        System.IO.Stream stream = new System.IO.MemoryStream(imageData);
6194
                                        image = SvgReader.Load(stream);
6195
                                    }
6196
                                    img.Source = image;
6197
                                }
6198
                                else
6199
                                {
6200
                                    img.Source = new BitmapImage(new Uri(s.ImagePath));
6201
                                }
6120 6202
                                ImgControl instance = new ImgControl
6121 6203
                                {
6122 6204
                                    Angle = s.Angle,
......
6137 6219
                                instance.MarkupInfoID = markupInfoID;
6138 6220
                                baseLayer.Add(instance);
6139 6221
                                instance.ApplyTemplate();
6140
                                instance.ImageData = new BitmapImage(new Uri(s.ImagePath));
6222
                                //instance.ImageData = new BitmapImage(new Uri(s.ImagePath));
6223
                                instance.ImageData = img.Source;
6141 6224
                                instance.SetImage();
6142 6225
                                return_control = instance;
6143 6226
                            }

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)