프로젝트

일반

사용자정보

개정판 959b3ef2

ID959b3ef22f27c7c39a29b05d4ed4215c2a88616f
상위 399976da
하위 de6499db, e05bed4e

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

issue #000: add DeleteCommand class

Change-Id: I3edc8872d4351d2e0f7c3b25691631606d20cbd3

차이점 보기:

KCOM/Events/Event_KeyEvent.cs
29 29

  
30 30
        MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn();
31 31
                
32
        private List<CommentUserInfo> SelectedItems
33
        {
34
            get
35
            {
36
                List<CommentUserInfo> res = new List<CommentUserInfo>();
37
                foreach (var item in this.dzMainMenu.SelectLayer.Children)
38
                {
39
                    if (item.GetType().Name == "AdornerFinal")
40
                    {
41
                        foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
42
                        {
43
                            res.Add(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo);
44
                        }
45
                    }
46
                }
47

  
48
                return res;
49
            }
50
        }
32 51

  
33 52
        public void KeyEventDownAction(object sender, KeyEventArgs e)
34 53
        {
......
559 578
                #region 삭제하기(Delete)
560 579
                case Key.Delete:
561 580
                    {
581
                        DeleteCommand.Instance.Execute(this.SelectedItems);
582
                        /*
562 583
                        if (this.dzMainMenu.SelectLayer.Children.Count > 0)
563 584
                        {
564
                            Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
565

  
566 585
                            UndoData = new Undo_data()
567 586
                            {
568 587
                                IsUndo = false,
......
575 594
                            {
576 595
                                if (item.GetType().Name == "AdornerFinal")
577 596
                                {
578
                                    //List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>();
579

  
580 597
                                    (item as Controls.AdornerFinal).unRegister();
581

  
582 598
                                    foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
583 599
                                    {
584
                                        //if (!ViewerDataModel.Instance.MarkupControls.Contains(InnerItem.DrawingData))
585
                                        if (!ViewerDataModel.Instance.MarkupControls_USER.Contains(InnerItem.DrawingData))
600
                                        Multi_Undo_data multi_Undo_Data = new Multi_Undo_data()
586 601
                                        {
587
                                            //this.dzMainMenu.ReleaseAdorner();
588

  
589
                                            multi_Undo_Data.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
590
                                            UndoData.Markup_List.Add(multi_Undo_Data);
591
                                            multi_Undo_Data = new Multi_Undo_data();
592

  
593
                                            ViewerDataModel.Instance.MarkupControls.Remove(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo);
594

  
595
                                            var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
596
                                            //var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.MarkupInfoID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).MarkupInfoID).FirstOrDefault();
602
                                            Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo
603
                                        };
604
                                        UndoData.Markup_List.Add(multi_Undo_Data);
597 605

  
598
                                            ViewerDataModel.Instance.MarkupList_USER.Remove(Item_);
606
                                        ViewerDataModel.Instance.MarkupControls_USER.Remove(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo);
607
                                        ViewerDataModel.Instance.MarkupControls.Remove(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo);
599 608

  
600
                                            //임시파일에서도 삭제한다.
601
                                            TempFile.DelTemp((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString());
602
                                                     
603
                                            //adornerSet.Add((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo));                                           
609
                                        var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
610
                                        ViewerDataModel.Instance.MarkupList_USER.Remove(Item_);
604 611

  
605
                                        }
612
                                        //임시파일에서도 삭제한다.
613
                                        TempFile.DelTemp((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString());
606 614
                                    }
607 615
                                }
608 616

  
......
611 619
                                    ViewerDataModel.Instance.UndoDataList.Remove(i);                                    
612 620
                                });
613 621
                                ViewerDataModel.Instance.UndoDataList.Add(UndoData);
614

  
615
                                
616 622
                            }
617 623
                        }
624
                        */
618 625

  
619 626
                        this.dzMainMenu.SelectLayer.Children.Clear();                        
620 627
                    }

내보내기 Unified diff

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