프로젝트

일반

사용자정보

개정판 e7dd7ae8

IDe7dd7ae81fe00db63d9c995f7e4cca508f0b1e17
상위 a6b02958
하위 f286e80b

백흠경이(가) 5년 이상 전에 추가함

issue #976: updated user selection logic

Change-Id: I507a81535f28185edf7b22471f0e3c109e6dd582

차이점 보기:

KCOM/Services/BaseServices.cs
198 198

  
199 199
                pureItem.ToList().ForEach(d => d.MarkupList.ForEach(p =>
200 200
                {
201

  
202 201
                    if (d.UserID == App.ViewInfo.UserID)
203 202
                    {
204 203
                        d.userDelete = true;
......
430 429
                 });
431 430
            }
432 431
        }
432

  
433
        /// <summary>
434
        /// 선택한 항목은 Visibility = Visible, 해제한 항목은 Visibility = Hidden 처리한다.
435
        /// </summary>
436
        /// <param name="sender"></param>
437
        /// <param name="e"></param>
433 438
        private void gridViewMarkup_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
434 439
        {
435
            //this.ParentOfType<MainPage>().ReleaseAdorner();
436
            //foreach(MarkupInfoItem data in e.AddedItems)
437
            //{
438
            //    if (!ViewerDataModel.Instance.SelectedmarkupInfoItems.Contains(data))
439
            //        ViewerDataModel.Instance.SelectedmarkupInfoItems.Add(data);
440
            //}
441
            
442

  
443 440
            var dataSet = gridViewMarkup.SelectedItems.Cast<MarkupInfoItem>().Where(data => data.UserID == _ViewInfo.UserID);
444 441
            var dataSet_User = gridViewMarkup.Items.Cast<MarkupInfoItem>().Where(data => data.UserID == _ViewInfo.UserID);
445 442
            var resultA = (from item_Select in dataSet
......
504 501
                            }
505 502
                            else
506 503
                            {
507
                                var test = instance.Where(data => data.MarkupInfoID == my_item.MarkupInfoID).FirstOrDefault();
508

  
509
                                if (test == null)
504
                                foreach(var control in Common.ViewerDataModel.Instance.MarkupControls_USER)
510 505
                                {
511
                                    foreach (var markup in instance)
512
                                    {
513
                                        layerControl.markupParseEx(markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", item.MarkupInfoID, markup.ID);
514
                                    }
506
                                    control.Visibility = Visibility.Visible;
515 507
                                }
516 508
                            }
517 509
                        }
518 510
                        else if (this.pageNavigator.CurrentPage != null)
519 511
                        {
520
                            var instance = ViewerDataModel.Instance.MarkupList_Pre.Where(d => d.PageNumber == pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
521
                            foreach (var markup in instance)
512
                            foreach(var control in ViewerDataModel.Instance.MarkupControls)
522 513
                            {
523
                                layerControl.markupParse(markup.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "", item.MarkupInfoID);
514
                                control.Visibility = Visibility.Visible;
524 515
                            }
525 516
                        }
526 517
                    }
527
                    //}
528 518
                }
529 519
                #endregion
530 520
                #region 코멘트 숨기기
......
537 527
                     where A.MarkupInfoID == B.MarkupInfoID
538 528
                     select B).ToList().ForEach(data =>
539 529
                     {
540
                         Common.ViewerDataModel.Instance.MarkupControls.Remove(data);
530
                         data.Visibility = Visibility.Hidden;
541 531
                     });
542 532

  
543
                    //var myComment = _infoItem.Where(d => d.MarkupInfoID == App.Custom_ViewInfoId).FirstOrDefault();
544 533
                    var myComment = _infoItem.Where(d => d.UserID == App.ViewInfo.UserID).FirstOrDefault();
545 534
                    if (myComment != null)
546 535
                    {
547 536
                        ChangeCommentReact();
548 537
                        Common.ViewerDataModel.Instance.MarkupControls_USER.ToList().ForEach(delegate (MarkupToPDF.Common.CommentUserInfo markupitem)
549 538
                        {
539
                            markupitem.Visibility = Visibility.Hidden;
550 540
                            if (markupitem.IsNew)
551 541
                            {
552 542
                                var root = layerControl.MarkupToString(markupitem, App.ViewInfo.UserID);
......
559 549
                                    PageNumber = this.pageNavigator.CurrentPage.PageNumber,
560 550
                                });
561 551
                            }
562
                            Common.ViewerDataModel.Instance.MarkupControls_USER.Remove(markupitem);
563 552
                        });
564 553
                    }
565 554
                }
......
722 711
            }
723 712
        }
724 713

  
725

  
714
        /// <summary>
715
        /// 문서 정보를 가져온다
716
        /// </summary>
717
        /// <param name="sender"></param>
718
        /// <param name="e"></param>
726 719
        private void BaseClient_GetDocInfoCompleted(object sender, GetDocInfoCompletedEventArgs e)
727 720
        {
728 721
            Logger.sendResLog("GetDocInfoCompleted", "UserState : " + e.UserState + "\r Result :" + e.Result + "\r Cancelled :" + e.Cancelled + "\r Error :" + e.Error, 1);

내보내기 Unified diff

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