프로젝트

일반

사용자정보

개정판 f816dd63

IDf816dd6357f0fb301a464a292ede54cf45105b5e
상위 d0b39faa
하위 4169a7ba, f86d9939

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

issue #923: add RedoCommand class

Change-Id: I4030ff812a02655439edccaa65cdaaa035e1549a

차이점 보기:

KCOM/Events/Event_KeyEvent.cs
1 1
using KCOM.Common;
2
using KCOM.Events;
2 3
using MarkupToPDF.Common;
3 4
using MarkupToPDF.Controls.Parsing;
4 5
using Svg2Xaml;
......
537 538
                #region Undo(Ctrl + Z)
538 539
                case Key.Z:
539 540
                    {
540
                        if (ViewerDataModel.Instance.IsPressCtrl)
541
                        {
542
                            this.dzMainMenu.Undo();
543
                        }                        
541
                        if (ViewerDataModel.Instance.IsPressCtrl) UndoCommand.Instance.Execute();
544 542
                    }
545 543
                    break;
546 544
                #endregion
......
548 546
                #region Redo(Ctrl + Y)
549 547
                case Key.Y:
550 548
                    {
551
                        if (ViewerDataModel.Instance.IsPressCtrl)
552
                        {
553
                            this.dzMainMenu.Redo();
554
                        }
549
                        if (ViewerDataModel.Instance.IsPressCtrl) RedoCommand.Instance.Execute();
555 550
                    }
556 551
                    break;
557 552
                #endregion
......
560 555
                case Key.Delete:
561 556
                    {
562 557
                        DeleteCommand.Instance.Execute(SelectionSet.Instance.SelectedItems);
563
                        /*
564
                        if (this.dzMainMenu.SelectLayer.Children.Count > 0)
565
                        {
566
                            UndoData = new Undo_data()
567
                            {
568
                                IsUndo = false,
569
                                Event = Event_Type.Delete,
570
                                EventTime = DateTime.Now,
571
                                Markup_List = new List<Multi_Undo_data>()
572
                            };
573

  
574
                            foreach (var item in this.dzMainMenu.SelectLayer.Children)
575
                            {
576
                                if (item.GetType().Name == "AdornerFinal")
577
                                {
578
                                    (item as Controls.AdornerFinal).unRegister();
579
                                    foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>())
580
                                    {
581
                                        Multi_Undo_data multi_Undo_Data = new Multi_Undo_data()
582
                                        {
583
                                            Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo
584
                                        };
585
                                        UndoData.Markup_List.Add(multi_Undo_Data);
586

  
587
                                        ViewerDataModel.Instance.MarkupControls_USER.Remove(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo);
588
                                        ViewerDataModel.Instance.MarkupControls.Remove(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo);
589

  
590
                                        var Item_ = ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
591
                                        ViewerDataModel.Instance.MyMarkupList.Remove(Item_);
592

  
593
                                        //임시파일에서도 삭제한다.
594
                                        TempFile.DelTemp((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString());
595
                                    }
596
                                }
597

  
598
                                ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i =>
599
                                {
600
                                    ViewerDataModel.Instance.UndoDataList.Remove(i);                                    
601
                                });
602
                                ViewerDataModel.Instance.UndoDataList.Add(UndoData);
603
                            }
604
                        }
605
                        */
606

  
607
                        this.dzMainMenu.SelectLayer.Children.Clear();                        
558
                        this.dzMainMenu.SelectLayer.Children.Clear();
608 559
                    }
609 560
                    break;
610 561
                #endregion

내보내기 Unified diff

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