프로젝트

일반

사용자정보

개정판 5b46312f

ID5b46312f69d6b5ff2a66c43870107b3be020e057
상위 d2cd1e16
하위 64f6713a

김동진이(가) 6년 이상 전에 추가함

누락 메서드 rollback

차이점 보기:

KCOM/Views/MainMenu.xaml.cs
5776 5776
            return false;
5777 5777
        }
5778 5778

  
5779
       
5779
        private void zoomAndPanControl_DragOver(object sender, DragEventArgs e)
5780
        {
5781
            e.Effects = DragDropEffects.Copy;
5782
        }
5783

  
5784
        private void zoomAndPanControl_DragEnter(object sender, DragEventArgs e)
5785
        {
5786
            e.Effects = DragDropEffects.Copy;
5787
        }
5788

  
5789
        private void zoomAndPanControl_DragLeave(object sender, DragEventArgs e)
5790
        {
5791
            e.Effects = DragDropEffects.None;
5792
        }
5793

  
5794
        private void zoomAndPanControl_Drop(object sender, DragEventArgs e)
5795
        {
5796
            if (e.Data.GetDataPresent(typeof(string)))
5797
            {
5798
                this.getCurrentPoint = e.GetPosition(drawingRotateCanvas);
5799
                string dragData = e.Data.GetData(typeof(string)) as string;
5800
                Move_Symbol(sender, dragData);
5801
            }
5802
        }
5803

  
5804
        private void Move_Symbol(object sender, string dragData)
5805
        {
5806
            if (dragData.Contains("|DZ|"))
5807
            {
5808
                List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>();
5809

  
5810
                string[] delimiterChars = { "|DZ|" };
5811
                string[] data = dragData.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries);
5812

  
5813
                this.ParentOfType<MainWindow>().dzMainMenu.ReleaseAdorner();
5814

  
5815
                Multi_Undo_data multi_Undo_Data = new Multi_Undo_data();
5816

  
5817
                //강인구 Undo/Redo 보류
5818
                UndoData = new Undo_data()
5819
                {
5820
                    IsUndo = false,
5821
                    Event = Event_Type.Create,
5822
                    EventTime = DateTime.Now,
5823
                    Markup_List = new List<Multi_Undo_data>()
5824
                };
5825

  
5826
                ViewerDataModel.Instance.UndoDataList.Where(data1 => data1.IsUndo == true).ToList().ForEach(i =>
5827
                {
5828
                    ViewerDataModel.Instance.UndoDataList.Remove(i);
5829
                });
5830

  
5831
                foreach (string parse in data)
5832
                {
5833
                    if (parse != "")
5834
                    {
5835
                        System.Windows.Controls.Control item = this.layerControl.markupParse_Paste(parse, ViewerDataModel.Instance.MarkupControls_USER);
5836
                        (item as MarkupToPDF.Common.CommentUserInfo).CommentID = Events.Save.shortGuid();
5837

  
5838
                        ViewerDataModel.Instance.MarkupControls.Remove(item as MarkupToPDF.Common.CommentUserInfo);
5839
                        ViewerDataModel.Instance.MarkupControls_USER.Remove(item as MarkupToPDF.Common.CommentUserInfo);
5840

  
5841
                        adornerSet.Add(item as MarkupToPDF.Common.CommentUserInfo);
5842

  
5843
                        multi_Undo_Data = this.ParentOfType<MainWindow>().dzMainMenu.Control_Style(item as MarkupToPDF.Common.CommentUserInfo);
5844

  
5845
                        UndoData.Markup_List.Add(multi_Undo_Data);
5846
                        ViewerDataModel.Instance.UndoDataList.Add(UndoData);
5847
                    }
5848
                }
5849
                Controls.AdornerFinal final = new Controls.AdornerFinal(adornerSet);
5850

  
5851
                /// move symbol to current mouse point
5852
                double realPointX = this.getCurrentPoint.X - final.BorderSize.X - (final.BorderSize.Width / 2);
5853
                double realPointY = this.getCurrentPoint.Y - final.BorderSize.Y - (final.BorderSize.Height / 2);
5854
                final.MoveAdorner(new System.Windows.Controls.Primitives.DragDeltaEventArgs(realPointX, realPointY));
5855

  
5856
                if (final.MemberSet.Where(type => type.Drawingtype == MarkupToPDF.Controls.Common.ControlType.TextControl).FirstOrDefault() != null)
5857
                {
5858
                    final.MoveAdorner(new System.Windows.Controls.Primitives.DragDeltaEventArgs(0.001, 0.001)); //dummy
5859
                }
5860
                /// up to here
5861

  
5862
                ViewerDataModel.Instance.SystemMain.dzMainMenu.SelectLayer.Children.Add(final);
5863
            }
5864
        }
5865

  
5780 5866
    }
5781 5867
}

내보내기 Unified diff

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