프로젝트

일반

사용자정보

개정판 f5f788c2

IDf5f788c253d1b138f9e69e0107998933e2ca0f8d
상위 6a19b48d
하위 f3686788, 5c64268e

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

issue #0000 저장기능 수정

Change-Id: Iea19dc20c703cb1e07d3d5a2034d419eda6fa5b6

차이점 보기:

KCOM/Views/MainMenu.xaml.cs
117 117
    {
118 118
        #region 프로퍼티
119 119

  
120
        private BitmapFrame tempPageImage =null;  
121

  
120 122
        public CommentUserInfo currentControl { get; set; }
121 123
        public ControlType controlType { get; set; }
122 124
        private Move move = new Move();
......
244 246
            //App.splashString(ISplashMessage.MAINMENU_0);
245 247
            InitializeComponent();
246 248

  
249
            tempPageImage = BitmapFrame.Create(new Uri(@"pack://application:,,,/KCOM;component/Resources/Images/ExtImage/blank.png"), BitmapCreateOptions.None, BitmapCacheOption.OnLoad);
247 250
            //List<testItem> testItems = new List<testItem>
248 251
            //{
249 252
            //    new testItem{Title = "test1"},
......
677 680
        /// <param name="e"></param>
678 681
        private async void pageNavigator_PageChanging(object sender, Controls.Sample.PageChangeEventArgs e)
679 682
        {
680
            //await Task.Delay(10);
681

  
682
            // 마크업 로드
683
            //await this.Dispatcher.InvokeAsync(()=>MarkupLoad(e.PageNumber));
683
            //    await PageLoadAsync(e.CurrentPage,e.PageNumber);
684
            //}
684 685

  
685
            ViewerDataModel.Instance.PageAngle = e.CurrentPage.PAGE_ANGLE;
686
            //private async Task PageLoadAsync(DOCPAGE page, int PageNo)
687
            //{
688
            DOCPAGE page = e.CurrentPage;
689
            int PageNo = e.PageNumber;
686 690

  
687
            var token = ViewerDataModel.Instance.NewCancellationToken();
688
            
689
            await MarkupLoadAsync(e.PageNumber, ViewerDataModel.Instance.PageAngle, token);
691
            ViewerDataModel.Instance.PageAngle = page.PAGE_ANGLE;
690 692

  
691 693
            // 페이지 이미지 변경
692
            await PageChangingAsync(e.CurrentPage, e.PageNumber, token);
694

  
695

  
696
            /// 컨트롤을 새로 생성한다.
697
            Common.ViewerDataModel.Instance.MarkupControls_USER.Clear();    //전체 제거
698
            Common.ViewerDataModel.Instance.MarkupControls.Clear();         //전체 제거
699

  
700
            ViewerDataModel.Instance.ImageViewPath = tempPageImage;
701
            ViewerDataModel.Instance.ImageViewWidth = 1;
702
            ViewerDataModel.Instance.ImageViewHeight = 1;
703

  
704
            await PageChangingAsync(page, PageNo, ViewerDataModel.Instance.NewPagImageCancelToken());
705
           
706
            await MarkupLoadAsync(PageNo, ViewerDataModel.Instance.PageAngle, ViewerDataModel.Instance.NewMarkupCancelToken());
707

  
708
            //var pagechangeTask = PageChangingAsync(page, page.PAGE_NUMBER, ViewerDataModel.Instance.NewPagImageCancelToken());
709

  
710
            //var markupLoadTask = MarkupLoadAsync(page.PAGE_NUMBER, ViewerDataModel.Instance.PageAngle, ViewerDataModel.Instance.NewMarkupCancelToken());
711

  
712
            //await Task.WhenAll(pagechangeTask, markupLoadTask);
693 713
        }
694 714

  
695 715
        private async Task PageChangingAsync(DOCPAGE currentPage, int changePageNumber,CancellationToken token)
......
719 739
            var contentScale = zoomAndPanControl.ContentScale;
720 740

  
721 741
            #region 페이지 이미지 로딩 수정
742
            
722 743

  
723 744
            ViewerDataModel.Instance.ImageViewPath = await App.PageStorage.GetPageImageAsync(token,changePageNumber);
724 745

  
746
            if(token.IsCancellationRequested)
747
            {
748
                return;
749
            }
750

  
725 751
            ScaleImage(pageWidth, pageHeight);
726 752

  
727 753
            ViewerDataModel.Instance.ImageViewWidth = pageWidth;
......
1156 1182

  
1157 1183
                    foreach (var markupitem in markupitems)
1158 1184
                    {
1159
                        await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync,PageAngle, item.DisplayColor, "", item.MarkupInfoID);
1185
                        await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync,PageAngle, item.DisplayColor, "", item.MarkupInfoID);
1160 1186

  
1161 1187
                        if (cts.IsCancellationRequested)
1162 1188
                        {
......
4695 4721

  
4696 4722
                if (isSave)
4697 4723
                {
4698
                    var token = ViewerDataModel.Instance.NewCancellationToken();
4724
                    var token = ViewerDataModel.Instance.NewMarkupCancelToken();
4699 4725

  
4700 4726
                    await MarkupLoadAsync(pageNavigator.CurrentPage.PageNumber, ViewerDataModel.Instance.PageAngle, token);
4701 4727
                     
......
4725 4751

  
4726 4752
                if (isSave)
4727 4753
                {
4728
                    var token = ViewerDataModel.Instance.NewCancellationToken();
4754
                    var token = ViewerDataModel.Instance.NewMarkupCancelToken();
4729 4755
                    await MarkupLoadAsync(pageNavigator.CurrentPage.PageNumber, ViewerDataModel.Instance.PageAngle, token);
4730 4756

  
4731 4757
                    List<IKCOM.MarkupInfoItem> MySelectItem = new List<IKCOM.MarkupInfoItem>();
......
5054 5080
                        var markupitems = item.MarkupList.Where(pageItem => pageItem.PageNumber == ViewerDataModel.Instance.SyncPageNumber).ToList();
5055 5081
                        foreach (var markupitem in markupitems)
5056 5082
                        {
5057
                            await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync,0, item.DisplayColor, "", item.MarkupInfoID);
5083
                            await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync,0, item.DisplayColor, "", item.MarkupInfoID);
5058 5084
                        }
5059 5085
                    }
5060 5086

  
......
5714 5740
            _canvas.Background = Brushes.White;
5715 5741
            _canvas.Width = adorner_.BorderSize.Width;
5716 5742
            _canvas.Height = adorner_.BorderSize.Height;
5717
            await MarkupParser.ParseAsync(App.BaseAddress, App.ViewInfo.ProjectNO, data, _canvas,ViewerDataModel.Instance.PageAngle, "#FFFF0000", "", ViewerDataModel.Instance.CancellationToken());
5743
            await MarkupParser.ParseAsync(App.BaseAddress, App.ViewInfo.ProjectNO, data, _canvas,ViewerDataModel.Instance.PageAngle, "#FFFF0000", "", ViewerDataModel.Instance.NewMarkupCancelToken());
5718 5744

  
5719 5745
            BitmapEncoder encoder = new PngBitmapEncoder();
5720 5746

  
......
6008 6034
                    {
6009 6035
                        if (item.PageNumber == pageNavigator.CurrentPage.PageNumber)
6010 6036
                        {
6011
                            await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.CancellationToken(), App.ViewInfo.ProjectNO, item.Data, Common.ViewerDataModel.Instance.MarkupControls_USER,ViewerDataModel.Instance.PageAngle, "#FFFF0000", "",
6037
                            await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, item.Data, Common.ViewerDataModel.Instance.MarkupControls_USER,ViewerDataModel.Instance.PageAngle, "#FFFF0000", "",
6012 6038
                                 items.MarkupInfoID, Commons.shortGuid());
6013 6039
                        }
6014 6040
                    }

내보내기 Unified diff

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