프로젝트

일반

사용자정보

개정판 ef7ba61f

IDef7ba61ffd93ccaaa863f5c50d7ca6cba1bb6446
상위 e755dd44
하위 873b1379

백흠경이(가) 5달 전에 추가함

Fix: 선택한 객체가 화면 최상단에 올라오는 오류 수정

Change-Id: I3eb1adeb497bf6d2e7a09dbed185e57478bda0a2

차이점 보기:

MarkupToPDF/Controls/Etc/ImgControl.cs
537 537
        public static ImgControl FromString(string str, SolidColorBrush brush, string sProjectNo, string baseUri)
538 538
        {
539 539
            ImgControl instance = null;
540
            using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(str))
540
            try
541 541
            {
542
                UriBuilder downloadUri = new UriBuilder(baseUri);
543
                UriBuilder uri = new UriBuilder(s.ImagePath);
544
                uri.Host = downloadUri.Host;
545
                uri.Port = downloadUri.Port;
546

  
547
                Image img = new Image();
548
                if (s.ImagePath.Contains(".svg"))
549
                {
550
                    SharpVectors.Converters.SvgImageExtension svgImage = new SharpVectors.Converters.SvgImageExtension(uri.ToString());
551
                    var svg = svgImage.ProvideValue(null);
552

  
553
                    img.Source = (DrawingImage)svg;
554
                }
555
                else
542
                using (S_ImgControl s = JsonSerializerHelper.JsonDeserialize<S_ImgControl>(str))
556 543
                {
557
                    img.Source = new BitmapImage(uri.Uri);
544
                    UriBuilder downloadUri = new UriBuilder(baseUri);
545
                    UriBuilder uri = new UriBuilder(s.ImagePath);
546
                    uri.Host = downloadUri.Host;
547
                    uri.Port = downloadUri.Port;
548

  
549
                    Image img = new Image();
550
                    if (s.ImagePath.Contains(".svg"))
551
                    {
552
                        SharpVectors.Converters.SvgImageExtension svgImage = new SharpVectors.Converters.SvgImageExtension(uri.ToString());
553
                        var svg = svgImage.ProvideValue(null);
554

  
555
                        img.Source = (DrawingImage)svg;
556
                    }
557
                    else
558
                    {
559
                        img.Source = new BitmapImage(uri.Uri);
560
                    }
561

  
562
                    instance = new ImgControl
563
                    {
564
                        CommentAngle = s.Angle,
565
                        StartPoint = s.StartPoint,
566
                        TopRightPoint = s.TR,
567
                        EndPoint = s.EndPoint,
568
                        LeftBottomPoint = s.LB,
569
                        PointSet = s.PointSet,
570
                        Opacity = s.Opac,
571
                        FilePath = uri.Uri.ToString(),
572
                        UserID = s.UserID,
573
                        ImageData = img.Source,
574
                        Memo = s.Memo,
575
                        ZIndex = s.ZIndex
576
                    };
577

  
578
                    instance.ImageData = img.Source;
558 579
                }
559

  
560
                instance = new ImgControl
561
                {
562
                    CommentAngle = s.Angle,
563
                    StartPoint = s.StartPoint,
564
                    TopRightPoint = s.TR,
565
                    EndPoint = s.EndPoint,
566
                    LeftBottomPoint = s.LB,
567
                    PointSet = s.PointSet,
568
                    Opacity = s.Opac,
569
                    FilePath = uri.Uri.ToString(),
570
                    UserID = s.UserID,
571
                    ImageData = img.Source,
572
                    Memo = s.Memo,
573
                    ZIndex = s.ZIndex
574
                };
575

  
576
                instance.ImageData = img.Source;
580
            }
581
            catch (Exception)
582
            {
577 583
            }
578 584

  
579 585
            return instance;

내보내기 Unified diff

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