프로젝트

일반

사용자정보

개정판 f38ed998

IDf38ed998dccd66643bd75a3dfb7c7807d51bef8c
상위 48c66f9a
하위 40b5ab91, 475c21be, 46a37703

백흠경이(가) 6달 전에 추가함

Fix: 프로그램 로딩 후 처음으로 마크업 항목을 선택하는 로직 수정

Change-Id: I113bb1a094ee81c7ea36d10d9526bd0410ad278b

차이점 보기:

KCOM/Services/BaseServices.cs
84 84
            BaseClient.EditFavoriteVPCompleted += BaseClient_EditFavoriteVPCompleted;
85 85
        }
86 86

  
87

  
88

  
89 87
        private void BaseClient_EditFavoriteVPCompleted(object sender, EditFavoriteVPCompletedEventArgs e)
90 88
        {
91 89
            //Logger.sendResLog("EditFavoriteVPCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
......
477 475
                    if (currentUser == null)
478 476
                    {
479 477
                        /// create a new markupinfo to do comments
480
                        /// 
481 478
                        if (App.ViewInfo.NewCommentPermission)
482 479
                        {
483 480
                            var infoId = Commons.shortGuid();
......
535 532

  
536 533
                    GridViewMarkup_Sorting(gridViewMarkup, new GridViewSortingEventArgs(gridViewMarkup.Columns[0], SortingState.None, SortingState.None));
537 534

  
538
                    var SelectedItem = ViewerDataModel.Instance._markupInfoList.Where(info => info.UserID == App.ViewInfo.UserID).OrderByDescending(order => order.UpdateTime).FirstOrDefault();
539

  
540
                    if (PreviewUserMarkupInfoItem != null)
541
                    {
542
                        this.gridViewMarkup.SelectedItem = PreviewUserMarkupInfoItem;
543
                    }
544
                    else if (SelectedItem != null)
545
                    {
546
                        this.gridViewMarkup.SelectedItem = SelectedItem;
547
                    }
548
                    else if (ViewerDataModel.Instance._markupInfoList.Count() > 0)
549
                    {
550
                        this.gridViewMarkup.SelectedItem = ViewerDataModel.Instance._markupInfoList.First();
551
                    }
535
                    SelectInitialMarkupInfo();
552 536
                }
553 537
            }
554 538
            catch (Exception ex) 
......
569 553
            }
570 554
        }
571 555

  
556
        /// <summary>
557
        /// 프로그램이 로딩되고 난 후 맨처음으로 MarkupInfo를 선택한다. 
558
        /// </summary>
559
        private void SelectInitialMarkupInfo()
560
        {
561
            if (!App.ViewInfo.CreateFinalPDFPermission && !App.ViewInfo.NewCommentPermission)
562
            {
563
                #region Consolidate 항목이 있으면 Consolidate 항목만 추가
564
                if (ViewerDataModel.Instance._markupInfoList.Any(x => x.Consolidate == 1 && x.AvoidConsolidate == 0))
565
                {
566
                    var Consolidates = ViewerDataModel.Instance._markupInfoList.Where(x => x.Consolidate == 1 && x.AvoidConsolidate == 0).ToList();
567
                    Consolidates.ForEach(x => gridViewMarkup.SelectedItems.Add(x));
568
                }
569
                #endregion
570
                #region Consolidate 항목이 없을 경우에는 AvoidConsolidate를 제외한 모든 항목들을 선택
571
                else
572
                {
573
                    var Consolidates = ViewerDataModel.Instance._markupInfoList.Where(x => x.AvoidConsolidate == 0).ToList();
574
                    Consolidates.ForEach(x => gridViewMarkup.SelectedItems.Add(x));
575
                }
576
                #endregion
577
            }
578
            else if (!App.ViewInfo.CreateFinalPDFPermission && App.ViewInfo.NewCommentPermission)   /// Eng'r Comment Mode
579
            {
580
                var MarkupInfoColl = ViewerDataModel.Instance._markupInfoList.Where(x => x.AvoidConsolidate == 0).ToList();
581

  
582
                #region Team consolidate 항목 선택
583
                var Candidates = MarkupInfoColl.Where(x => x.PartConsolidate == 1).ToList();
584
                MarkupInfoColl.RemoveAll(x => Candidates.Exists(y => y == x));
585
                #endregion
586

  
587
                #region 추가되지 않은 사용자들을 추가
588
                foreach (var item in MarkupInfoColl.Where(x => !Candidates.Exists(y => y.UserID == x.UserID)))
589
                {
590
                    Candidates.Add(item);
591
                }
592
                #endregion
593

  
594
                Candidates.ForEach(x => gridViewMarkup.SelectedItems.Add(x));
595
            }
596
            else if (App.ViewInfo.CreateFinalPDFPermission && App.ViewInfo.NewCommentPermission)    /// Orig Comment Model
597
            {
598
                if (ViewerDataModel.Instance._markupInfoList.Any(x => x.Consolidate == 1 && x.AvoidConsolidate == 0))
599
                {
600
                    var Consolidates = ViewerDataModel.Instance._markupInfoList.Where(x => x.Consolidate == 1 && x.AvoidConsolidate == 0).ToList();
601
                    Consolidates.ForEach(x => gridViewMarkup.SelectedItems.Add(x));
602
                }
603
                else if (ViewerDataModel.Instance._markupInfoList.Any(x => x.PartConsolidate == 1))
604
                {
605
                    var PartConsolidates = ViewerDataModel.Instance._markupInfoList.Where(x => x.PartConsolidate == 1).ToList();
606
                    PartConsolidates.ForEach(x => gridViewMarkup.SelectedItems.Add(x));
607
                }
608
                else
609
                {
610
                    var Comments = ViewerDataModel.Instance._markupInfoList.Where(x => x.Consolidate != 1 && x.AvoidConsolidate != 1).ToList();
611
                    Comments.ForEach(x => gridViewMarkup.SelectedItems.Add(x));
612
                }
613
            }
614

  
615
            if (!gridViewMarkup.SelectedItems.Any())
616
            {
617
                var SelectedItem = ViewerDataModel.Instance._markupInfoList.Where(info => info.UserID == App.ViewInfo.UserID).OrderByDescending(order => order.UpdateTime).FirstOrDefault();
618

  
619
                if (PreviewUserMarkupInfoItem != null)
620
                {
621
                    this.gridViewMarkup.SelectedItem = PreviewUserMarkupInfoItem;
622
                }
623
                else if (SelectedItem != null)
624
                {
625
                    this.gridViewMarkup.SelectedItem = SelectedItem;
626
                }
627
                else if (ViewerDataModel.Instance._markupInfoList.Any())
628
                {
629
                    this.gridViewMarkup.SelectedItem = ViewerDataModel.Instance._markupInfoList[0];
630
                }
631
            }
632
        }
633

  
572 634
        private void GridViewMarkup_Sorting(object sender, GridViewSortingEventArgs e)
573 635
        {
574 636
            IEnumerable<IKCOM.MarkupInfoItem> markuplist = e.DataControl.ItemsSource as IEnumerable<IKCOM.MarkupInfoItem>;
......
1064 1126

  
1065 1127
        private void BaseClient_GetConversionStateCompleted(object sender, GetConversionStateCompletedEventArgs e)
1066 1128
        {
1067
            
1068
            //Logger.sendResLog("GetConversionStateCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);
1069
            string failedmsg = CommonLib.Common.GetAlertMessageString("GetConversionStateFailed", "MSG", "Too Many V/P Files are uploading instantaneously, This V/P file can not be open now. Please feel free to re-open wait a moment again!\n\n현재 일시적으로 많은 양의 V/P가 등록되고 있어 이 문서를 열람할 수 없습니다.\n잠시만 기다려 주신 후 다시 열람하여 주시기 바랍니다");
1070
            if (e.Error == null && e.Result == true)
1129
            if (e.Error == null && e.Result)
1071 1130
            {
1072 1131
                //Logger.sendReqLog("GetDocumentItemInfoAsync", _ViewInfo.ProjectNO + "," + _ViewInfo.DocumentItemID + "," + _ViewInfo.UserID, 1);
1073 1132

  
......
1093 1152
            }
1094 1153
            else
1095 1154
            {
1096
                
1155
                string failedmsg = CommonLib.Common.GetAlertMessageString("GetConversionStateFailed", "MSG", "Too Many V/P Files are uploading instantaneously, This V/P file can not be open now. Please feel free to re-open wait a moment again!\n\n현재 일시적으로 많은 양의 V/P가 등록되고 있어 이 문서를 열람할 수 없습니다.\n잠시만 기다려 주신 후 다시 열람하여 주시기 바랍니다");
1097 1156
                DialogMessage_Alert(failedmsg, "Warning");
1098 1157
            }
1099 1158
        }

내보내기 Unified diff

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