프로젝트

일반

사용자정보

개정판 6dcbe4a7

ID6dcbe4a7b1857cf8093a9b61fe77eac35b4ce105
상위 3aafb914
하위 f3937dd7

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

issue #811: 외부 사용자 경우에도 페이지 이미지가 보이도록 수정

Change-Id: I3c5c6350de58062ba7620637026ab53a4efda797

차이점 보기:

KCOM/Controls/PrintControl.xaml.cs
178 178
            this.IsEnabled = true;
179 179

  
180 180
            //Layer Control을 통째로 가져와야 하는건가
181
            //this.LayerControl = LayerControl;
182 181
            this._DocInfo = DocInfo;
183 182
            this._DefaultTileUri = TileSourceUri;
184 183
            this.ProjectNo = ProjectNo;
KCOM/Events/Implementation/TopMenuEvent.cs
23 23
using MarkupToPDF.Controls.Parsing;
24 24
using Telerik.Windows.Data;
25 25
using System.ComponentModel;
26
using System.Web;
26 27

  
27 28
namespace KCOM.Views
28 29
{
......
428 429
            }
429 430

  
430 431
            RadWindow PrintWindow = new RadWindow();
431
            //IKCOM.MarkupInfoItem _result = null;
432 432
            PrintWindow.Width = 850;
433 433
            PrintWindow.Height = 600;
434
            //PrintWindow.Width = 650;
435
            //PrintWindow.Height = 550;
436 434
            PrintWindow.Header = Type;
437 435

  
438 436
            List<IKCOM.MarkupInfoItem> markupinfo = new List<IKCOM.MarkupInfoItem>();
439 437

  
440
            Logger.sendReqLog("GetPrintDocItemList: ", App.ViewInfo.ProjectNO + "," + App.ViewInfo.DocumentItemID + "," + ViewerDataModel.Instance._markupInfoList.ToList(), 1);
441 438
            markupinfo = Common.ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetPrintDocItemList(App.ViewInfo.ProjectNO, App.ViewInfo.DocumentItemID, ViewerDataModel.Instance._markupInfoList.ToList());
442 439

  
443 440
            if (markupinfo.Count() > 0)
......
449 446
                Logger.sendResLog("GetPrintDocItemList", "FALSE", 1);
450 447
            }
451 448

  
449
            /// Tile Source URL을 구한다
450
            string sImageURL = ViewerDataModel.Instance.SystemMain.dzMainMenu.GetImageURL(App.ViewInfo.DocumentItemID, this.ParentOfType<MainWindow>().dzMainMenu.pageNavigator.CurrentPage.PageNumber);
451
            var url = new Uri(sImageURL);
452 452
            string sFolder = App.ViewInfo.DocumentItemID.All(char.IsDigit) ? (Convert.ToInt64(App.ViewInfo.DocumentItemID) / 100).ToString() : App.ViewInfo.DocumentItemID.Substring(0, 5);
453
            var Tile_Url = string.Format(@"{0}/TileSource/{1}_Tile/{2}/{3}/",
454
                App.SystemInfo.HostName,
453
            var Tile_Url = string.Format(@"{0}://{1}:{2}/TileSource/{3}_Tile/{4}/{5}/",
454
                url.Scheme, url.Host, url.Port,
455 455
                App.ViewInfo.ProjectNO,
456 456
                sFolder,
457 457
                App.ViewInfo.DocumentItemID
458 458
                );
459
            /// up to here
459 460

  
460 461
            PrintWindow.Content = new KCOM.Control.PrintControl(
461 462
                      Tile_Url,
......
2690 2691
        public void Paste_Start()
2691 2692
        {
2692 2693
            //마크업 붙여넣기
2693
            //if (Clipboard.GetText().Contains("|DZ|"))
2694 2694
            if (Clipboard.GetText().Contains("|OR||DZ|"))
2695 2695
            {
2696 2696
                List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>();
......
2728 2728

  
2729 2729
                        adornerSet.Add(item as MarkupToPDF.Common.CommentUserInfo);
2730 2730

  
2731
                        //Controls.AdornerFinal final = new Controls.AdornerFinal(item as MarkupToPDF.Common.CommentUserInfo);
2732
                        //this.dzMainMenu.SelectLayer.Children.Add(final);
2733

  
2734 2731
                        multi_Undo_Data = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo);
2735 2732

  
2736 2733
                        UndoData.Markup_List.Add(multi_Undo_Data);
......
2754 2751
                    {
2755 2752
                        final.TranslateItems(0.001, 0.001); //dummy
2756 2753
                    }
2757

  
2758 2754
                }
2759
                
2760 2755

  
2761 2756
                this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Add(final);
2762

  
2763
                //붙여 넣을때 원본 컨트롤과 겹치지 않도록 설정
2764
                //Canvas.SetLeft(final, 50);
2765
                //Canvas.SetTop(final, 50);
2766 2757
            }
2767 2758
            //외부 이미지 붙여넣기
2768 2759
            else if (Clipboard.GetImage() != null)
......
2815 2806

  
2816 2807
                    fileInfo.Delete();
2817 2808

  
2818
                    //System.Drawing.Image clipboardImage = System.Windows.Forms.Clipboard.GetImage();
2819 2809
                    System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(clipboardImage);
2820 2810
                    IntPtr hBitmap = bmp.GetHbitmap();
2821 2811
                    System.Windows.Media.ImageSource WpfBitmap = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(hBitmap, IntPtr.Zero, Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
2822 2812
                    Image img = new Image();
2823
                    //img.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri(filename));
2824 2813
                    if (filename.Contains(".svg"))
2825 2814
                    {
2826 2815
                        byte[] imageData = null;
......
2841 2830
                    var currentControl = new MarkupToPDF.Controls.Etc.ImgControl
2842 2831
                    {
2843 2832
                        PointSet = new List<Point>(),
2844
                        //FilePath = img.Source.ToString(),
2845 2833
                        FilePath = filename,
2846 2834
                        ImageData = img.Source,
2847 2835
                        StartPoint = new Point(100, 100),
KCOM/Views/MainMenu.xaml.cs
265 265
        /// <author>humkyung</author>
266 266
        /// <param name="sDocumentID"></param>
267 267
        /// <returns></returns>
268
        private string GetImageURL(string sDocumentID, int iPageNo)
268
        public string GetImageURL(string sDocumentID, int iPageNo)
269 269
        {
270 270
            string uri = string.Empty;
271 271

  

내보내기 Unified diff

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