프로젝트

일반

사용자정보

개정판 448c5399

ID448c5399cf649bbf082f9ac8cf2a3fd01eaa060b
상위 d97dbc7f
하위 604465bd, 5b372dc6

김태성이(가) 약 5년 전에 추가함

Thumbnail download에서 오류 발생 수정

Change-Id: Iaa768613c35ba6a81ac3337d3e296942d3d6ea89

차이점 보기:

KCOM/Controls/Sample.xaml.cs
588 588

  
589 589
            foreach (var page in items)
590 590
            {
591
                System.Diagnostics.Debug.WriteLine("thumbnail download process " + page.PAGE_NUMBER);
591 592

  
592 593
            //}
593 594
            //ViewerDataModel.Instance.Document_Info.OrderBy(data => data.PAGE_NUMBER).ToList().ForEach(page =>
......
650 651
                        });
651 652
                    }
652 653
                }
653
            }
654 654

  
655
            if (ImgListbox.ItemsSource == null)
656
            {
657
                ImgListbox.ItemsSource = this._thumbnailItems;
655
                if (ImgListbox.ItemsSource == null)
656
                {
657
                    ImgListbox.ItemsSource = this._thumbnailItems;
658 658

  
659
                //this.CurrentPage = this._thumbnailItems.FirstOrDefault();
659
                    //this.CurrentPage = this._thumbnailItems.FirstOrDefault();
660 660

  
661
                //this._thumbnailItems.ToList().ForEach(data =>
662
                //{
663
                //    data.Width = ImgListbox.ActualWidth;
664
                //    data.Height = ImgListbox.ActualHeight;
665
                //});
661
                    //this._thumbnailItems.ToList().ForEach(data =>
662
                    //{
663
                    //    data.Width = ImgListbox.ActualWidth;
664
                    //    data.Height = ImgListbox.ActualHeight;
665
                    //});
666 666

  
667
                if (ImgListbox.Items.Count > 0)
668
                {
669
                    int StartPageIdx = 1;
670
                
671
                    if (StartPageIdx <= 0 || StartPageIdx > ImgListbox.Items.Count || StartPageIdx == 1)
667
                    if (ImgListbox.Items.Count > 0)
672 668
                    {
673
                        ImgListbox.SelectedItem = ImgListbox.Items[0];
669
                        int StartPageIdx = 1;
670

  
671
                        if (StartPageIdx <= 0 || StartPageIdx > ImgListbox.Items.Count || StartPageIdx == 1)
672
                        {
673
                            ImgListbox.SelectedItem = ImgListbox.Items[0];
674
                        }
675
                        else
676
                        {
677
                            ImgListbox.SelectedItem = ImgListbox.Items[StartPageIdx];
678
                        }
674 679
                    }
675
                    else
680

  
681
                    if (ThumbInitialized != null)
676 682
                    {
677
                        ImgListbox.SelectedItem = ImgListbox.Items[StartPageIdx];
683
                        ThumbInitialized(this, new EventArgs());
678 684
                    }
679 685
                }
680
            }
681
            else
682
            {
683
                ImgListbox.UpdateLayout();
684
                ImgListbox.ItemsSource = this._thumbnailItems;
685
            }
686
                else
687
                {
688
                    ImgListbox.UpdateLayout();
689
                    ImgListbox.ItemsSource = this._thumbnailItems;
690
                }
686 691

  
687
            if(ThumbInitialized != null)
688
            {
689
                ThumbInitialized(this, new EventArgs());
690 692
            }
693

  
694
            //if (ImgListbox.ItemsSource == null)
695
            //{
696
            //    ImgListbox.ItemsSource = this._thumbnailItems;
697

  
698
            //    //this.CurrentPage = this._thumbnailItems.FirstOrDefault();
699

  
700
            //    //this._thumbnailItems.ToList().ForEach(data =>
701
            //    //{
702
            //    //    data.Width = ImgListbox.ActualWidth;
703
            //    //    data.Height = ImgListbox.ActualHeight;
704
            //    //});
705

  
706
            //    if (ImgListbox.Items.Count > 0)
707
            //    {
708
            //        int StartPageIdx = 1;
709
                
710
            //        if (StartPageIdx <= 0 || StartPageIdx > ImgListbox.Items.Count || StartPageIdx == 1)
711
            //        {
712
            //            ImgListbox.SelectedItem = ImgListbox.Items[0];
713
            //        }
714
            //        else
715
            //        {
716
            //            ImgListbox.SelectedItem = ImgListbox.Items[StartPageIdx];
717
            //        }
718
            //    }
719
            //}
720
            //else
721
            //{
722
            //    ImgListbox.UpdateLayout();
723
            //    ImgListbox.ItemsSource = this._thumbnailItems;
724
            //}
725

  
726
            //if(ThumbInitialized != null)
727
            //{
728
            //    ThumbInitialized(this, new EventArgs());
729
            //}
691 730
        }
692 731

  
693 732
        private async void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)

내보내기 Unified diff

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