프로젝트

일반

사용자정보

개정판 ac4f1e13

IDac4f1e13b52e9641951fd7437ded61125f1b4e0b
상위 c8b87260
하위 72424099

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

Markup load 비동기로 변경

Change-Id: I471906b1090f7f3f0fd18e97d88a54f75fd1f673

차이점 보기:

KCOM/Services/BaseServices.cs
442 442
            }
443 443
        }
444 444

  
445
        private void gridViewRevMarkup_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
445
        private async void gridViewRevMarkup_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
446 446
        {
447 447
            List<MarkupInfoItem> gridSelectionItem = gridViewRevMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
448 448
            //if (ViewerDataModel.Instance.PageBalanceNumber == 0)
......
462 462
                    //{
463 463
                    //    layerControl.markupParse(markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
464 464
                    //});
465
                    item.MarkupList.Where(pageItem => pageItem.PageNumber == ViewerDataModel.Instance.PageNumber).ToList().ForEach(delegate (MarkupItem markupitem)
465

  
466
                    var pageItems = item.MarkupList.Where(pageItem => pageItem.PageNumber == ViewerDataModel.Instance.PageNumber).ToList();
467

  
468
                    foreach (var markupitem in pageItems)
466 469
                    {
467
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
468
                    });
470
                       await MarkupParser.ParseExAsync(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_Sync, item.DisplayColor, "", item.MarkupInfoID);
471
                    }
469 472
                }
470 473
            }
471 474
            else if (e.RemovedItems.Count > 0)
......
487 490
        /// </summary>
488 491
        /// <param name="sender"></param>
489 492
        /// <param name="e"></param>
490
        private void gridViewMarkup_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
493
        private async void gridViewMarkup_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
491 494
        {
492 495
            SelectionSet.Instance.UnSelect(Common.ViewerDataModel.Instance.SystemMain.dzMainMenu);
493 496

  
......
566 569
                            if (controls.Count == 0)
567 570
                            {
568 571
                                var instance = ViewerDataModel.Instance.MyMarkupList.Where(d => d.PageNumber == this.pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
572

  
569 573
                                foreach (var markup in instance)
570 574
                                {
571
                                    MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", 
575
                                    await MarkupParser.ParseExAsync(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", 
572 576
                                        item.MarkupInfoID, markup.ID);
573 577
                                }
574 578
                            }
......
588 592
                                var instance = ViewerDataModel.Instance.MarkupList_Pre.Where(d => d.PageNumber == this.pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
589 593
                                foreach (var markup in instance)
590 594
                                {
591
                                    MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "",
595
                                    await MarkupParser.ParseExAsync(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "",
592 596
                                        item.MarkupInfoID, markup.ID);
593 597
                                }
594 598
                            }
......
852 856
            //hubConnection.Stop();
853 857
        }
854 858

  
855
        public void MarkupUserListDisplay()
859
        public async void MarkupUserListDisplay()
856 860
        {
857 861
            List<MarkupInfoItem> gridItem = gridViewMarkup.Items.Cast<MarkupInfoItem>().ToList(); //전체 마크업
858 862
            List<MarkupInfoItem> gridSelectionItem = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().ToList(); //선택 된 마크업
......
894 898

  
895 899
            foreach (var item in gridSelectionItem)
896 900
            {
901

  
897 902
                if (item.UserID == App.ViewInfo.UserID)
898 903
                {
899
                    ViewerDataModel.Instance.MyMarkupList.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
904
                    var markupItems = ViewerDataModel.Instance.MyMarkupList.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList();
905

  
906
                    foreach (var markupitem in markupItems)
900 907
                    {
901
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", 
902
                            item.MarkupInfoID, markupitem.ID);
903
                    });
908
                        await MarkupParser.ParseExAsync(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", 
909
                                item.MarkupInfoID, markupitem.ID);
910
                    }
904 911
                }
905 912
                else
906 913
                {
907
                    ViewerDataModel.Instance.MarkupList_Pre.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().ForEach(delegate (MarkupItemEx markupitem)
914
                    var markupItems = ViewerDataModel.Instance.MarkupList_Pre.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList();
915

  
916
                    foreach (var markupitem in markupItems)
908 917
                    {
909
                        MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID);
910
                    });
918
                        await MarkupParser.ParseExAsync(App.ViewInfo.ProjectNO, markupitem.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID);
919
                    }
911 920
                }
912 921
            }
913 922
        }

내보내기 Unified diff

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