프로젝트

일반

사용자정보

개정판 00143658

ID00143658fe22239538a9e014551671efc7792961
상위 90865212
하위 f23757e4

김태성이(가) 4년 이상 전에 추가함

Print /export Method 실행시 window close button 비활성화

Change-Id: I4809f5f5ff4b6c6cb2d5aefc2fdb015e0f939296

차이점 보기:

KCOM/Controls/PrintControl.xaml.cs
443 443
                    //bitmap.EndInit();
444 444

  
445 445
                        
446
                        var uri = await  App.PageStorage.GetPageUriAsync(PageNo);
446
                        var uri = await  App.PageStorage.GetPageUriAsync(currentPage.PAGE_NUMBER);
447 447
                    //Image bitmap = new Image();
448 448
                    //bitmap.Stretch = Stretch.Fill;
449 449
                    //bitmap.Source = bitmapframe;
450 450
                    //bitmap.Width = Convert.ToDouble(currentPage.PAGE_WIDTH);
451 451
                    //bitmap.Height = Convert.ToDouble(currentPage.PAGE_HEIGHT);
452
                        printCanvas.Children.Clear();
453
                        printCanvas.Width = Convert.ToDouble(currentPage.PAGE_WIDTH);
454
                        printCanvas.Height = Convert.ToDouble(currentPage.PAGE_HEIGHT);
455
                        printCanvas.Background = new ImageBrush { ImageSource = new BitmapImage(uri) };
452
                    printCanvas.Children.Clear();
453
                    printCanvas.Width = Convert.ToDouble(currentPage.PAGE_WIDTH);
454
                    printCanvas.Height = Convert.ToDouble(currentPage.PAGE_HEIGHT);
455
                    printCanvas.Background = new ImageBrush { ImageSource = new BitmapImage(uri)};
456 456

  
457
                        //ImageBrush background = new ImageBrush(bitmap);
458
                        //printCanvas.Background = background;
459
                        //printCanvas.Background = new SolidColorBrush(Colors.Transparent);
457
                    //printCanvas.RenderTransformOrigin = new Point(0.5, 0.5);
458
                    //printCanvas.RenderTransform = new RotateTransform(currentPage.PAGE_ANGLE);
459
                    //ImageBrush background = new ImageBrush(bitmap);
460
                    //printCanvas.Background = background;
461
                    //printCanvas.Background = new SolidColorBrush(Colors.Transparent);
460 462

  
461 463

  
462
                        foreach (var info in gridViewMarkup.SelectedItems.Cast<IKCOM.MarkupInfoItem>())
463
                        {
464
                            load.User_Id = info.UserID;
465
                            load.document_id = _DocInfo.DOCUMENT_ID;
466
                            load.Page_No = PageNo;
467
                            load.DisplayColor = info.DisplayColor;
468
                            load.Markupinfoid = info.MarkupInfoID;
469
                            await load.Markup_LoadAsync(printCanvas);
470
                        }
464
                    foreach (var info in gridViewMarkup.SelectedItems.Cast<IKCOM.MarkupInfoItem>())
465
                    {
466
                        load.User_Id = info.UserID;
467
                        load.document_id = _DocInfo.DOCUMENT_ID;
468
                        load.Page_No = PageNo;
469
                        load.DisplayColor = info.DisplayColor;
470
                        load.Markupinfoid = info.MarkupInfoID;
471
                        await load.Markup_LoadAsync(printCanvas);
472
                    }
471 473

  
472 474
                    //await Dispatcher.InvokeAsync(() => {
473 475
                    //    printCanvas.UpdateLayout();
......
523 525
                if (this.printIndy.IsBusy == true)
524 526
                    return;
525 527

  
528
                (this.Parent as RadWindow).CanClose = false;
529

  
526 530
                await this.Dispatcher.InvokeAsync(() => { 
527 531
                        this.printIndy.IsBusy = true;
528 532
                        printIndy.BusyContent = "Printing. . .";
......
568 572
            {
569 573
                Logger.sendResLog("PrintMethod", ex.Message, 0);
570 574
            }
575
            finally
576
            {
577
                (this.Parent as RadWindow).CanClose = true;
578
            }
571 579

  
572 580
        }
573 581

  
......
579 587
                if (this.printIndy.IsBusy == true)
580 588
                    return;
581 589

  
590
                (this.Parent as RadWindow).CanClose = false;
591

  
582 592
                this.printIndy.IsBusy = true;
583 593
                printIndy.BusyContent = "Exporting. . .";
584 594

  
......
645 655
                                            using (PdfWriter writer = PdfWriter.GetInstance(doc, fs))
646 656
                                            {
647 657
                                                doc.Open();
658
                                                
648 659
                                                float height = doc.PageSize.Height;
649 660
                                                float width = doc.PageSize.Width;
650 661

  
......
667 678

  
668 679
                                                    doc.NewPage();
669 680
                                                    doc.Add(Export_img);
681

  
682
                                                    await System.Threading.Tasks.Task.Delay(100);
683

  
670 684
                                                }
671 685
                                                doc.Close();
672 686
                                            }
......
729 743
                Logger.sendResLog("Export Method", ex.Message, 0);
730 744
                //(Application.Current.MainWindow as MainWindow).dzMainMenu.DialogMessage_Alert("Alert", "관리자 확인이 필요합니다. 다시 시도해 주세요.\n"+ex.Message);
731 745
            }
746
            finally
747
            {
748
                (this.Parent as RadWindow).CanClose = true;
749
            }
750

  
732 751

  
733 752
        }
734 753
        #endregion

내보내기 Unified diff

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