프로젝트

일반

사용자정보

개정판 101da246

ID101da24621808de430e8127ee21a48a1b443b740
상위 cb33ad14
하위 a2752679, cd172bb8

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

revised issue #976: updated user selection logic

Change-Id: Ic8dbaa4b6f72ba969493314528f5479a8cffdf54

차이점 보기:

KCOM/Services/BaseServices.cs
317 317

  
318 318
                var select_item = ViewerDataModel.Instance._markupInfoList.Where(info => info.UserID == App.ViewInfo.UserID).OrderByDescending(order => order.Consolidate == Convert.ToInt32(true)).FirstOrDefault();
319 319
                this.gridViewMarkup.SelectedItem = select_item;
320

  
321

  
322
                //var markupItem = ViewerDataModel.Instance._markupInfoList.OrderByDescending(p => p.Consolidate == Convert.ToInt32(true)).ToList(); //Consolidation 된 데이터가 최상단에 올 수 있도록 변경
323

  
324
                //markupItem.ForEach(data =>
325
                //{
326
                //    if (data.Depatment == null)
327
                //    {
328
                //        data.Depatment = "Unknown";
329
                //        //BaseClient.NoticeAccountErrorAsync(_ViewInfo.ProjectNO, data.UserID);
330
                //    }
331
                //});
332

  
333
                //markupItem.Where(data => Convert.ToBoolean(data.Consolidate) && !Convert.ToBoolean(data.PartConsolidate)).ToList().ForEach(data => data.Depatment = "Consolidation");
334

  
335
                //var root = markupItem.Where(data => data.Depatment.Contains("SUB_")).ToList();
336

  
337
                //foreach (var item in root)
338
                //{
339
                //    item.Depatment = item.Depatment.Replace("SUB_", "");
340
                //}
341
                //gridViewMarkup.ItemsSource = markupItem;
342

  
343
                //SetCommentPages(); //색상을 불러오는 내용
344

  
345

  
346
                //if (ViewerDataModel.Instance._markupInfoList.Count() > 0)
347
                //{
348
                //    var com = (from kkk in ViewerDataModel.Instance._markupInfoList where kkk.Consolidate == Convert.ToInt32(true) select kkk).FirstOrDefault();
349

  
350
                //    if (com != null) //콘솔리데이션이 있는 경우
351
                //    {
352
                //        if (com.UserID == _ViewInfo.UserID)
353
                //        {
354
                //            gridViewMarkup.SelectedItems.Add(com);
355
                //        }
356
                //        else
357
                //        {
358
                //            if (ViewerDataModel.Instance._markupInfoList.Where(p => p.UserID == _ViewInfo.UserID).FirstOrDefault() != null)
359
                //            {
360
                //                gridViewMarkup.SelectedItems.Add(ViewerDataModel.Instance._markupInfoList.Where(p => p.UserID == _ViewInfo.UserID).FirstOrDefault());
361
                //            }
362

  
363
                //            else
364
                //            {
365
                //                var data = ViewerDataModel.Instance._markupInfoList.Where(p => p.Consolidate == Convert.ToInt32(true)).FirstOrDefault();
366
                //                //DicUserListOpacity.Add(data.UserID, 1);
367
                //                gridViewMarkup.SelectedItems.Add(ViewerDataModel.Instance._markupInfoList.Where(p => p.Consolidate == Convert.ToInt32(true)).FirstOrDefault());
368
                //            }
369
                //        }
370

  
371
                //    }
372
                //    else
373
                //    {
374
                //        //아무것도 체크 안함
375
                //        //foreach (var item in _markupInfoList)
376
                //        //{
377
                //        //    gridViewMarkup.SelectedItems.Add(item);
378
                //        //} 
379

  
380

  
381
                //        if (ViewerDataModel.Instance._markupInfoList.Where(p => p.UserID == _ViewInfo.UserID).FirstOrDefault() != null) //본인것만 체크
382
                //        {
383
                //            gridViewMarkup.SelectedItems.Add(ViewerDataModel.Instance._markupInfoList.Where(p => p.UserID == _ViewInfo.UserID).FirstOrDefault());
384
                //        }
385
                //    }
386
                //}
387
                //else
388
                //{
389

  
390
                //}
391 320
            }
392 321
        }
393 322

  
......
487 416
                    {
488 417
                        if ((item.UserID == App.ViewInfo.UserID) && (this.pageNavigator.CurrentPage != null))
489 418
                        {
490
                            var instance = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.PageNumber == pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
491
                            var my_item = Common.ViewerDataModel.Instance.MarkupControls_USER.FirstOrDefault();
492
                            Common.ViewerDataModel.Instance.current_page_commentcnt = Common.ViewerDataModel.Instance.MarkupList_USER.Where(data => data.PageNumber == pageNavigator.CurrentPage.PageNumber && data.MarkupInfoID == item.MarkupInfoID).ToList().Count;
493
                            if (my_item == null)
419
                            var controls = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
420
                            if (controls.Count == 0)
494 421
                            {
422
                                var instance = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.PageNumber == pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
495 423
                                foreach (var markup in instance)
496 424
                                {
497 425
                                    MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls_USER, item.DisplayColor, "", 
498 426
                                        item.MarkupInfoID, markup.ID);
499 427
                                }
500 428
                            }
501
                            else
429

  
430
                            controls = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
431
                            foreach (var control in controls)
502 432
                            {
503
                                foreach(var control in Common.ViewerDataModel.Instance.MarkupControls_USER)
504
                                {
505
                                    control.Visibility = Visibility.Visible;
506
                                }
433
                                control.Visibility = Visibility.Visible;
507 434
                            }
508 435
                        }
509 436
                        else if (this.pageNavigator.CurrentPage != null)
510 437
                        {
511
                            foreach(var control in ViewerDataModel.Instance.MarkupControls)
438
                            var controls = Common.ViewerDataModel.Instance.MarkupControls.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
439
                            if (controls.Count == 0)
440
                            {
441
                                var instance = ViewerDataModel.Instance.MarkupList_Pre.Where(d => d.PageNumber == pageNavigator.CurrentPage.PageNumber && d.MarkupInfoID == item.MarkupInfoID).ToList();
442
                                foreach (var markup in instance)
443
                                {
444
                                    MarkupParser.ParseEx(App.ViewInfo.ProjectNO, markup.Data, Common.ViewerDataModel.Instance.MarkupControls, item.DisplayColor, "",
445
                                        item.MarkupInfoID, markup.ID);
446
                                }
447
                            }
448

  
449
                            controls = Common.ViewerDataModel.Instance.MarkupControls.Where(d => d.MarkupInfoID == item.MarkupInfoID).ToList();
450
                            foreach (var control in controls)
512 451
                            {
513 452
                                control.Visibility = Visibility.Visible;
514 453
                            }

내보내기 Unified diff

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