Преглед изворни кода

其他-移除之前测试的代码

zhuyi пре 1 година
родитељ
комит
94ecdd40dc

+ 0 - 29
Demo/Examples/Annotations/Annotations.csproj

@@ -44,24 +44,9 @@
     <Reference Include="ComPDFKit.Viewer, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
       <HintPath>..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Viewer.dll</HintPath>
     </Reference>
-<<<<<<< HEAD
-    <Reference Include="ComPDFKit.Tool.RE, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\Compdfkit_Tools\ComPDFKit.Tool.RE.dll</HintPath>
-    </Reference>
-    <Reference Include="ComPDFKit.Viewer, Version=1.9.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Viewer.dll</HintPath>
-    </Reference>
-    <Reference Include="ComPDFKit.Viewer.RE, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\Compdfkit_Tools\ComPDFKit.Viewer.RE.dll</HintPath>
-    </Reference>
-    <Reference Include="PresentationFramework.Aero2" />
-=======
     <Reference Include="PresentationFramework.Aero2, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <HintPath>..\packages\PresentationFramework.Aero2.1.0.1\lib\PresentationFramework.Aero2.dll</HintPath>
     </Reference>
->>>>>>> bbc9a3f1809e713bf9d3a6376d7e90f20b806df1
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Data" />
@@ -118,22 +103,8 @@
     </None>
   </ItemGroup>
   <ItemGroup>
-<<<<<<< HEAD
-    <None Include="App.config" />
-  </ItemGroup>
-  <ItemGroup>
-    <Content Include="ComPDFKit.Tool.RE.dll">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <Content Include="ComPDFKit.Viewer.RE.dll">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <Resource Include="ComPDFKit_Logo.ico" />
-    <Content Include="..\license_key_win.xml">
-=======
     <None Include="..\license_key_windows.xml">
       <Link>license_key_windows.xml</Link>
->>>>>>> bbc9a3f1809e713bf9d3a6376d7e90f20b806df1
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
   </ItemGroup>

+ 0 - 5
Demo/Examples/Annotations/MainWindow.xaml

@@ -8,12 +8,7 @@
         xmlns:common="clr-namespace:Compdfkit_Tools.Common;assembly=ComPDFKit_Tools"
         mc:Ignorable="d"
         Loaded="MainWindow_Loaded"
-<<<<<<< HEAD
-        Closed="MainWindow_Closed"
-        Title="Annotations_ComPDFKit V1.9.1" Height="720" Width="1080"  WindowStartupLocation="CenterScreen">
-=======
         Title="Annotations_ComPDFKit V1.10.0" Height="720" Width="1080"  WindowStartupLocation="CenterScreen">
->>>>>>> bbc9a3f1809e713bf9d3a6376d7e90f20b806df1
     <Window.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>

Разлика између датотеке није приказан због своје велике величине
+ 1 - 138
Demo/Examples/Annotations/MainWindow.xaml.cs


+ 1 - 464
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationControl/CPDFAnnotationControl.xaml.cs

@@ -15,14 +15,6 @@ using Compdfkit_Tools.Annotation.PDFAnnotationUI;
 using Microsoft.Win32;
 using System.Windows.Media;
 using Compdfkit_Tools.Properties;
-using CPDFViewer = ComPDFKitViewer.PdfViewer.CPDFViewer;
-using ComPDFKit.Tool;
-using ComPDFKit.PDFAnnotation;
-using ComPDFKit.Import;
-using ComPDFKitViewer.Helper;
-using ComPDFKitViewer.Annot;
-using System.Windows.Input;
-using System.Linq;
 
 namespace Compdfkit_Tools.PDFControl
 {
@@ -57,465 +49,13 @@ namespace Compdfkit_Tools.PDFControl
         private bool disableClean;
         public event EventHandler ClearAnnotationBar;
 
-        #region Rebuild
-
-        private CPDFViewerTool cPDFViewerTool;
-        CPDFAnnotation cPDFAnnotation;
-        bool openCreateAnnot = false;
-        bool selectedAnnot = false;
-        CPDFAnnotationData pdfAnnotationData = null;
-        C_ANNOTATION_TYPE CreateAnnotType = C_ANNOTATION_TYPE.C_ANNOTATION_UNKOWN;
-        public void LoadPDFViewToolHandler()
-        {
-            cPDFViewerTool.SetViewerModel(ComPDFKit.Tool.MouseModess.kViewer);
-            cPDFViewerTool.MouseLeftButtonDownHandler += CPDFViewerTool_MouseLeftButtonDownHandler;
-            cPDFViewerTool.MouseLeftButtonUpHandler += CPDFViewerTool_MouseLeftButtonUpHandler;
-            cPDFViewerTool.MouseMoveHandler += CPDFViewerTool_MouseMoveHandler;
-            cPDFViewerTool.SelectedDataChanging += CPDFViewerTool_SelectedDataChanging;
-            cPDFViewerTool.SelectedDataChanged += CPDFViewerTool_SelectedDataChanged;
-        }
-
-        private void CPDFViewerTool_SelectedDataChanged(object sender, ComPDFKit.Tool.DrawRect.SelectedRectData e)
-        {
-            if (e.annotData.AnnotType == C_ANNOTATION_TYPE.C_ANNOTATION_LINE)
-            {
-                CPDFLineAnnotation annotLine = (e.annotData.Annot as CPDFLineAnnotation);
-                //annotLine.SetLinePoints(startPoint, endPoint);
-                //annotLine.UpdateAp();
-            }
-            else
-            {
-                Rect rect1 = new Rect(
-                    (e.Square.Left - e.annotData.PaintOffset.X) / e.annotData.CurrentZoom,
-                    (e.Square.Top - e.annotData.PaintOffset.Y) / e.annotData.CurrentZoom,
-                    e.Square.Width / e.annotData.CurrentZoom,
-                    e.Square.Height / e.annotData.CurrentZoom
-                    );
-                Rect rect = DpiHelper.StandardRectToPDFRect(rect1);
-                CRect cRect = new CRect((float)rect.Left, (float)rect.Bottom, (float)rect.Right, (float)rect.Top);
-                e.annotData.Annot.SetRect(cRect);
-            }
-            cPDFViewerTool.GetCPDFViewer().UpDataRenderFrame();
-        }
-
-        private void CPDFViewerTool_SelectedDataChanging(object sender, ComPDFKit.Tool.DrawRect.SelectedRectData e)
-        {
-
-        }
-
-        private void CPDFViewerTool_MouseMoveHandler(object sender, MouseHitTeseType e)
-        {
-            if (e == ComPDFKit.Tool.MouseHitTeseType.kSelectRect)
-            {
-                if (selectedAnnot)
-                {
-                    cPDFViewerTool.DrawMoveSelectedRect();
-                }
-            }
-            else
-            {
-                if (!openCreateAnnot)
-                {
-                    if (Keyboard.IsKeyDown(Key.LeftShift) || Keyboard.IsKeyDown(Key.RightShift))
-                    {
-                        cPDFViewerTool.SetAnnotIsProportionalScaling(true);
-                    }
-                    else
-                    {
-                        cPDFViewerTool.SetAnnotIsProportionalScaling(false);
-                    }
-                    cPDFViewerTool.MoveDrawAnnot();
-                }
-            }
-        }
-
-        private void CPDFViewerTool_MouseLeftButtonUpHandler(object sender, MouseHitTeseType e)
-        {
-            if (e == ComPDFKit.Tool.MouseHitTeseType.kSelectRect)
-            {
-                if (selectedAnnot)
-                {
-                    cPDFViewerTool.DrawEndSelectedRect();
-                }
-            }
-            else
-            {
-                if (!openCreateAnnot)
-                {
-                    Point StartPoint = cPDFViewerTool.GetStartPoint();
-                    Point EndPoint = cPDFViewerTool.GetEndPoint();
-                    List<Point> points = cPDFViewerTool.GetInkDrawPoints();
-                    Rect rect = cPDFViewerTool.EndDrawAnnot();
-                    if (cPDFAnnotation != null)
-                    {
-                        if (cPDFAnnotation.Type == C_ANNOTATION_TYPE.C_ANNOTATION_INK)
-                        {
-                            List<List<CPoint>> inkPathList = new List<List<CPoint>>();
-                            List<CPoint> inkPath = new List<CPoint>();
-                            float Left = -1;
-                            float Right = -1;
-                            float Top = -1;
-                            float Bottom = -1;
-                            foreach (Point inkNode in points)
-                            {
-                                inkPath.Add(new CPoint((float)DpiHelper.StandardNumToPDFNum(inkNode.X), (float)DpiHelper.StandardNumToPDFNum(inkNode.Y)));
-
-                                if (Left == -1)
-                                {
-                                    Left = inkPath.Min(x => x.x);
-                                }
-                                else
-                                {
-                                    Left = Math.Min(Left, inkPath.Min(x => x.x));
-                                }
-                                if (Right == -1)
-                                {
-                                    Right = inkPath.Max(x => x.x);
-                                }
-                                else
-                                {
-                                    Right = Math.Max(Right, inkPath.Max(x => x.x));
-                                }
-                                if (Top == -1)
-                                {
-                                    Top = inkPath.Min(x => x.y);
-                                }
-                                else
-                                {
-                                    Top = Math.Min(Top, inkPath.Min(x => x.y));
-                                }
-                                if (Bottom == -1)
-                                {
-                                    Bottom = inkPath.Max(x => x.y);
-                                }
-                                else
-                                {
-                                    Bottom = Math.Max(Bottom, inkPath.Max(x => x.y));
-                                }
-                            }
-                            inkPathList.Add(inkPath);
-                            (cPDFAnnotation as CPDFInkAnnotation).SetInkPath(inkPathList);
-                            (cPDFAnnotation as CPDFInkAnnotation).SetInkRect(new CRect(Left, Bottom, Right, Top));
-                            cPDFAnnotation.UpdateAp();
-                            cPDFViewerTool.ClearDrawAnnot();
-                            cPDFViewerTool.GetCPDFViewer().UpDataRenderFrame();
-                            cPDFAnnotation = null;
-                            return;
-                        }
-                        if (rect.Width <= 0 && rect.Width <= 0)
-                        {
-                            cPDFAnnotation.RemoveAnnot();
-                            cPDFAnnotation = null;
-                            return;
-                        }
-                        if (cPDFAnnotation.Type== C_ANNOTATION_TYPE.C_ANNOTATION_LINE)
-                        {
-                            (cPDFAnnotation as CPDFLineAnnotation).SetLinePoints(new CPoint((float)StartPoint.X, (float)StartPoint.Y), new CPoint((float)EndPoint.X, (float)EndPoint.Y));
-                        }
-                        CRect cRect = new CRect((float)rect.Left, (float)rect.Bottom, (float)rect.Right, (float)rect.Top);
-                        cPDFAnnotation.SetRect(cRect);
-                        cPDFAnnotation.UpdateAp();
-                        cPDFViewerTool.ClearDrawAnnot();
-                        cPDFViewerTool.GetCPDFViewer().UpDataRenderFrame();
-                    }
-                }
-            }
-        }
-
-        private void CPDFViewerTool_MouseLeftButtonDownHandler(object sender, MouseHitTeseType e)
-        {
-            if (e == ComPDFKit.Tool.MouseHitTeseType.kUnknown)
-            {
-                if (!openCreateAnnot)
-                {
-                    if (CreateAnnotType!= C_ANNOTATION_TYPE.C_ANNOTATION_UNKOWN)
-                    {
-                        cPDFAnnotation = cPDFViewerTool.StartDrawAnnot(CreateAnnotType);
-                        if (cPDFAnnotation != null)
-                        {
-                            cPDFViewerTool.CleanSelectedRect();
-                            selectedAnnot = false;
-                            SetAnnotAttributes(cPDFAnnotation, pdfAnnotationData);
-                            return;
-                        }
-                    }
-                }
-                else
-                {
-                    cPDFViewerTool.CleanSelectedRect();
-                    selectedAnnot = false;
-                }
-            }
-            else
-            {
-                cPDFViewerTool.DrawStartSelectedSaRect();
-                selectedAnnot = true;
-            }
-        }
-
-        public void SetAnnotAttributes(CPDFAnnotation cPDFAnnotation, CPDFAnnotationData data)
-        {
-            if (pdfAnnotationData==null)
-            {
-                return;
-            }
-            switch (cPDFAnnotation.Type)
-            {
-                case C_ANNOTATION_TYPE.C_ANNOTATION_UNKOWN:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_TEXT:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_LINK:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_FREETEXT:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_LINE:
-                    if (data.AnnotationType == CPDFAnnotationType.Line|| data.AnnotationType == CPDFAnnotationType.Arrow)
-                    {
-                        CPDFLineShapeData lineData = data as CPDFLineShapeData;
-                        CPDFLineAnnotation lineAnnot = cPDFAnnotation as CPDFLineAnnotation;
-                        lineAnnot.SetLineWidth(lineData.Thickness);
-                        byte[] lineColor = { lineData.BorderColor.R, lineData.BorderColor.G, lineData.BorderColor.B };
-                        lineAnnot.SetLineColor(lineColor);
-                        byte transparency = (byte)Math.Round(lineData.Opacity * 255);
-                        lineAnnot.SetTransparency(transparency);
-
-                        if (lineData.DashStyle != null)
-                        {
-                            if (lineData.DashStyle.Dashes.Count == 0)
-                            {
-                                lineAnnot.SetBorderStyle(C_BORDER_STYLE.BS_SOLID, new float[0]);
-                            }
-                            else
-                            {
-                                List<float> floatArray = new List<float>();
-                                foreach (var num in lineData.DashStyle.Dashes)
-                                {
-                                    floatArray.Add((float)num);
-                                }
-                                lineAnnot.SetBorderStyle(C_BORDER_STYLE.BS_DASHDED, floatArray.ToArray());
-                            }
-                        }
-                        lineAnnot.SetLineType(lineData.LineType.HeadLineType, lineData.LineType.TailLineType);
-                        lineAnnot.SetAuthor(lineData.Author);
-                        lineAnnot.SetContent(lineData.Note);
-                        lineAnnot.UpdateAp();
-                    }
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_SQUARE:
-                    if (data.AnnotationType == CPDFAnnotationType.Square)
-                    {
-
-                        CPDFShapeData squareData = data as CPDFShapeData;
-                        CPDFSquareAnnotation squareAnnot = cPDFAnnotation as CPDFSquareAnnotation;
-                        squareAnnot.SetLineWidth(squareData.Thickness);
-                        byte[] bgColor = { squareData.FillColor.R, squareData.FillColor.G, squareData.FillColor.B };
-                        if (squareData.FillColor != Colors.Transparent)
-                        {
-                            squareAnnot.SetBgColor(bgColor);
-                        }
-                        else
-                        {
-                            squareAnnot.ClearBgColor();
-                        }
-                        byte[] lineColor = { squareData.BorderColor.R, squareData.BorderColor.G, squareData.BorderColor.B };
-                        squareAnnot.SetLineColor(lineColor);
-                        byte transparency = (byte)Math.Round(squareData.Opacity * 255);
-                        squareAnnot.SetTransparency(transparency);
-
-                        if (squareData.DashStyle != null)
-                        {
-                            if (squareData.DashStyle.Dashes.Count == 0)
-                            {
-                                squareAnnot.SetBorderStyle(C_BORDER_STYLE.BS_SOLID, new float[0]);
-                            }
-                            else
-                            {
-                                List<float> floatArray = new List<float>();
-                                foreach (var num in squareData.DashStyle.Dashes)
-                                {
-                                    floatArray.Add((float)num);
-                                }
-                                squareAnnot.SetBorderStyle(C_BORDER_STYLE.BS_DASHDED, floatArray.ToArray());
-                            }
-                        }
-                        squareAnnot.SetAuthor(squareData.Author);
-                        squareAnnot.SetContent(squareData.Note);
-                        squareAnnot.UpdateAp();
-                    }
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_CIRCLE:
-                    if (data.AnnotationType == CPDFAnnotationType.Circle)
-                    {
-
-                        CPDFShapeData circleData = data as CPDFShapeData;
-                        CPDFCircleAnnotation circleAnnot = cPDFAnnotation as CPDFCircleAnnotation;
-                        circleAnnot.SetLineWidth(circleData.Thickness);
-                        byte[] bgColor = { circleData.FillColor.R, circleData.FillColor.G, circleData.FillColor.B };
-                        if (circleData.FillColor!= Colors.Transparent)
-                        {
-                            circleAnnot.SetBgColor(bgColor);
-                        }
-                        else
-                        {
-                            circleAnnot.ClearBgColor();
-                        }
-                        byte[] lineColor = { circleData.BorderColor.R, circleData.BorderColor.G, circleData.BorderColor.B };
-                        circleAnnot.SetLineColor(lineColor);
-                        byte transparency = (byte)Math.Round(circleData.Opacity * 255);
-                        circleAnnot.SetTransparency(transparency);
-
-                        if (circleData.DashStyle != null)
-                        {
-                            if (circleData.DashStyle.Dashes.Count == 0)
-                            {
-                                circleAnnot.SetBorderStyle(C_BORDER_STYLE.BS_SOLID, new float[0]);
-                            }
-                            else
-                            {
-                                List<float> floatArray = new List<float>();
-                                foreach (var num in circleData.DashStyle.Dashes)
-                                {
-                                    floatArray.Add((float)num);
-                                }
-                                circleAnnot.SetBorderStyle(C_BORDER_STYLE.BS_DASHDED, floatArray.ToArray());
-                            }
-                        }
-                        circleAnnot.SetAuthor(circleData.Author);
-                        circleAnnot.SetContent(circleData.Note);
-                        circleAnnot.UpdateAp();
-                    }
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_POLYGON:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_POLYLINE:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_HIGHLIGHT:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_UNDERLINE:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_SQUIGGLY:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_STRIKEOUT:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_STAMP:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_CARET:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_INK:
-                    if (data.AnnotationType == CPDFAnnotationType.Freehand)
-                    {
-                        CPDFFreehandData inkData = data as CPDFFreehandData;
-                        CPDFInkAnnotation inkAnnot = cPDFAnnotation as CPDFInkAnnotation;
-                        inkAnnot.SetThickness((float)inkData.Thickness);
-                        byte[] lineColor = { inkData.BorderColor.R, inkData.BorderColor.G, inkData.BorderColor.B };
-                        inkAnnot.SetInkColor(lineColor);
-                        byte transparency = (byte)Math.Round(inkData.Opacity * 255);
-                        inkAnnot.SetTransparency(transparency);
-
-                        inkAnnot.SetAuthor(inkData.Author);
-                        inkAnnot.SetContent(inkData.Note);
-                    }
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_POPUP:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_FILEATTACHMENT:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_SOUND:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_MOVIE:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_WIDGET:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_SCREEN:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_PRINTERMARK:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_TRAPNET:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_WATERMARK:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_3D:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_RICHMEDIA:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_REDACT:
-                    break;
-                case C_ANNOTATION_TYPE.C_ANNOTATION_INTERCHANGE:
-                    break;
-                default:
-                    break;
-            }
-        }
-
-        public void SetCreateAnnot(CPDFAnnotationData data)
-        {
-            CPDFAnnotationType annotationType = data.AnnotationType;
-            pdfAnnotationData = data;
-            switch (annotationType)
-            {
-                case CPDFAnnotationType.Unknow:
-                    cPDFViewerTool.SetViewerModel(ComPDFKit.Tool.MouseModess.kViewer);
-                    return;
-                case CPDFAnnotationType.Highlight:
-                    break;
-                case CPDFAnnotationType.Underline:
-                    break;
-                case CPDFAnnotationType.Strikeout:
-                    break;
-                case CPDFAnnotationType.Squiggly:
-                    break;
-                case CPDFAnnotationType.FreeText:
-                    break;
-                case CPDFAnnotationType.Freehand:
-                    CreateAnnotType = C_ANNOTATION_TYPE.C_ANNOTATION_INK;
-                    cPDFViewerTool.SetViewerModel(ComPDFKit.Tool.MouseModess.kCreateAnnot);
-                    break;
-                case CPDFAnnotationType.Note:
-                    break;
-                case CPDFAnnotationType.Circle:
-                    CreateAnnotType = C_ANNOTATION_TYPE.C_ANNOTATION_CIRCLE;
-                    cPDFViewerTool.SetViewerModel(ComPDFKit.Tool.MouseModess.kCreateAnnot);
-                    break;
-                case CPDFAnnotationType.Square:
-                    CreateAnnotType = C_ANNOTATION_TYPE.C_ANNOTATION_SQUARE;
-                    cPDFViewerTool.SetViewerModel(ComPDFKit.Tool.MouseModess.kCreateAnnot);
-                    break;
-                case CPDFAnnotationType.Arrow:
-                case CPDFAnnotationType.Line:
-                    CreateAnnotType = C_ANNOTATION_TYPE.C_ANNOTATION_LINE;
-                    cPDFViewerTool.SetViewerModel(ComPDFKit.Tool.MouseModess.kCreateAnnot);
-                    break;
-                case CPDFAnnotationType.Stamp:
-                    break;
-                case CPDFAnnotationType.Signature:
-                    break;
-                case CPDFAnnotationType.Link:
-                    break;
-                case CPDFAnnotationType.Audio:
-                    break;
-                case CPDFAnnotationType.Image:
-                    break;
-                default:
-                    break;
-            }
-        }
-
-        #endregion
-
         public CPDFAnnotationControl()
         {
             InitializeComponent();
         }
 
-
-        public void SetPDFViewer(CPDFViewer pdfViewer, CPDFViewerTool tool)
+        public void SetPDFViewer(CPDFViewer pdfViewer)
         {
-            cPDFViewerTool = tool;
-            if (cPDFViewerTool != null)
-            {
-                LoadPDFViewToolHandler();
-            }
             if (this.pdfViewer != null)
             {
                 UnLoadPDFViewHandler();
@@ -524,7 +64,6 @@ namespace Compdfkit_Tools.PDFControl
             LoadPDFViewHandler();
         }
 
-
         public void LoadPDFViewHandler()
         {
             if (this.pdfViewer != null)
@@ -664,8 +203,6 @@ namespace Compdfkit_Tools.PDFControl
                 return;
             }
 
-            SetCreateAnnot(pdfAnnotationData);
-
             CPDFAnnotationType annotationType = pdfAnnotationData.AnnotationType;
             AnnotHandlerEventArgs annotHandlerEventArgs = null;
             Dictionary<AnnotAttrib, object> annotAttribsList = new Dictionary<AnnotAttrib, object>();

+ 0 - 22
Demo/Examples/Compdfkit_Tools/Compdfkit_Tools.csproj

@@ -47,24 +47,11 @@
     <Reference Include="ComPDFKit.Desk, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
       <HintPath>..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Desk.dll</HintPath>
     </Reference>
-<<<<<<< HEAD
-    <Reference Include="ComPDFKit.Tool.RE, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>.\ComPDFKit.Tool.RE.dll</HintPath>
-    </Reference>
-    <Reference Include="ComPDFKit.Viewer, Version=1.9.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\packages\ComPDFKit.NetFramework.1.9.0\lib\ComPDFKit.Viewer.dll</HintPath>
-=======
     <Reference Include="ComPDFKit.Viewer, Version=1.10.0.0, Culture=neutral, processorArchitecture=MSIL">
       <HintPath>..\packages\ComPDFKit.NetFramework.1.10.0\lib\ComPDFKit.Viewer.dll</HintPath>
     </Reference>
     <Reference Include="Nager.Country, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
       <HintPath>..\packages\Nager.Country.4.0.0\lib\netstandard2.0\Nager.Country.dll</HintPath>
->>>>>>> bbc9a3f1809e713bf9d3a6376d7e90f20b806df1
-    </Reference>
-    <Reference Include="ComPDFKit.Viewer.RE, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>.\ComPDFKit.Viewer.RE.dll</HintPath>
     </Reference>
     <Reference Include="PresentationFramework.Aero2, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <HintPath>..\packages\PresentationFramework.Aero2.1.0.1\lib\PresentationFramework.Aero2.dll</HintPath>
@@ -479,16 +466,7 @@
     <Resource Include="Asset\Resource\Transparent_btn_ic.png" />
     <Resource Include="Asset\Resource\warn.png" />
     <Resource Include="ComPDFKit_Logo.ico" />
-<<<<<<< HEAD
-    <Content Include="ComPDFKit.Tool.RE.dll">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-    <Content Include="ComPDFKit.Viewer.RE.dll">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Content>
-=======
     <Resource Include="Asset\Resource\Logo.png" />
->>>>>>> bbc9a3f1809e713bf9d3a6376d7e90f20b806df1
     <Content Include="VirtualizingWrapPanel.dll">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>

+ 5 - 12
Demo/Examples/Compdfkit_Tools/Edit/PDFContentEditControl.xaml.cs

@@ -14,7 +14,6 @@ using System.Windows.Media;
 using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
-using CPDFViewer = ComPDFKitViewer.PdfViewer.CPDFViewer;
 
 namespace Compdfkit_Tools.Edit
 {
@@ -23,10 +22,11 @@ namespace Compdfkit_Tools.Edit
     /// </summary>
     public partial class PDFContentEditControl : UserControl
     {
+        private UIElement contentEditPanel = null;
+        private UIElement tempContentEditPanel = null;
+
         private PDFImageEditControl PDFImageEditControl = new PDFImageEditControl();
         private PDFTextEditControl PDFTextEditControl = new PDFTextEditControl();
-        private PDFTextEditControl tempPDFTextEditControl = null;
-        private PDFEditEvent editEvent = null;
 
         public CPDFViewer PDFView { get; private set; }
         public PDFEditEvent EditEvent { get; set; }
@@ -51,19 +51,12 @@ namespace Compdfkit_Tools.Edit
             }
             else
             {
-                tempPDFTextEditControl = new PDFTextEditControl();
-                this.editEvent = editEvent;
-                tempPDFTextEditControl.Loaded += TempPDFTextEditControl_Loaded;
+                PDFTextEditControl tempPDFTextEditControl = new PDFTextEditControl();
+                tempPDFTextEditControl.SetPDFTextEditData(editEvent);
                 ContentEditContainer.Child = tempPDFTextEditControl;
             }
         }
 
-        private void TempPDFTextEditControl_Loaded(object sender, RoutedEventArgs e)
-        {
-            tempPDFTextEditControl.SetPDFTextEditData(editEvent);
-
-        }
-
         public void ClearContentControl()
         {
             ContentEditContainer.Child = null;

+ 0 - 1
Demo/Examples/Compdfkit_Tools/Edit/PDFImageEdit/PDFImageEditControl/PDFImageEditControl.xaml.cs

@@ -11,7 +11,6 @@ using Microsoft.Win32;
 using System.Diagnostics;
 using System.Drawing;
 using System.IO;
-using CPDFViewer = ComPDFKitViewer.PdfViewer.CPDFViewer;
 
 namespace Compdfkit_Tools.Edit
 {

+ 0 - 1
Demo/Examples/Compdfkit_Tools/Edit/PDFTextEdit/PDFTextEditControl/PDFTextEditControl.xaml.cs

@@ -7,7 +7,6 @@ using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Controls.Primitives;
 using System.Windows.Media;
-using CPDFViewer = ComPDFKitViewer.PdfViewer.CPDFViewer;
 
 namespace Compdfkit_Tools.Edit
 {

+ 0 - 1
Demo/Examples/Compdfkit_Tools/Form/Property/PushButtonProperty.xaml.cs

@@ -9,7 +9,6 @@ using System.Windows.Media;
 using System.Collections.ObjectModel;
 using ComPDFKit.PDFDocument.Action;
 using ComPDFKitViewer.PdfViewer;
-using CPDFViewer = ComPDFKitViewer.PdfViewer.CPDFViewer;
 
 namespace Compdfkit_Tools.PDFControl
 {

+ 0 - 1
Demo/Examples/Compdfkit_Tools/Form/Property/RadioButtonProperty.xaml.cs

@@ -9,7 +9,6 @@ using System.Linq;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Media;
-using CPDFViewer = ComPDFKitViewer.PdfViewer.CPDFViewer;
 
 namespace Compdfkit_Tools.PDFControl
 {

+ 1 - 20
Demo/Examples/Compdfkit_Tools/PDFView/PDFDisplaySettings/PDFDisplaySettingsControl/CPDFDisplaySettingsControl.xaml.cs

@@ -1,11 +1,9 @@
-using ComPDFKit.Tool;
-using Compdfkit_Tools.PDFControlUI;
+using Compdfkit_Tools.PDFControlUI;
 using ComPDFKitViewer;
 using ComPDFKitViewer.PdfViewer;
 using System.Collections.Generic;
 using System.Windows;
 using System.Windows.Controls;
-using CPDFViewer = ComPDFKitViewer.PdfViewer.CPDFViewer;
 
 namespace Compdfkit_Tools.PDFControl
 {
@@ -15,7 +13,6 @@ namespace Compdfkit_Tools.PDFControl
         /// PDFViewer
         /// </summary>
         private CPDFViewer pdfView;
-        private CPDFViewerTool pdfViewerTool;
 
         public CPDFDisplaySettingsControl()
         {
@@ -26,18 +23,11 @@ namespace Compdfkit_Tools.PDFControl
         private void CPDFDisplaySettingsControl_Loaded(object sender, RoutedEventArgs e)
         {
             ViewModeUI.ViewModeChanged += ViewModeUI_ViewModeChanged;
-            ViewModeUI.ToolViewModeChanged += ViewModeUI_ToolViewModeChanged;
             ViewModeUI.SplitModeChanged += ViewModeUI_SplitModeChanged;
             ViewModeUI.CropModeChanged += ViewModeUI_CropModeChanged;
             DrawModeUI.DrawModeChanged += DrawModeUI_DrawModeChanged;
         }
 
-        private void ViewModeUI_ToolViewModeChanged(object sender, ViewModes e)
-        {
-            pdfViewerTool.GetCPDFViewer().SetViewMode(e);
-            pdfViewerTool.GetCPDFViewer().UpDataRenderFrame();
-        }
-
         private void ViewModeUI_CropModeChanged(object sender, bool e)
         {
             pdfView?.SetCropMode(e);
@@ -80,15 +70,6 @@ namespace Compdfkit_Tools.PDFControl
                 ViewModeUI.SetCropUI(pdfView.IsCropMode());
             } 
         }
-        public void InitWithPDFViewerTool(CPDFViewerTool newPDFViewTool)
-        {
-            pdfViewerTool = newPDFViewTool;
-            if(pdfViewerTool != null)
-            {
-                ViewModeUI.SetSplitModeUI(pdfView.Mode);
-                ViewModeUI.SetViewModeUI(pdfView.ModeView);
-            } 
-        }
 
         public void SetVisibilityWhenContentEdit(Visibility visible)
         {

+ 0 - 1
Demo/Examples/Compdfkit_Tools/PDFView/PDFDisplaySettings/PDFDisplaySettingsControl/CPDFDrawModeControl.xaml.cs

@@ -3,7 +3,6 @@ using ComPDFKitViewer.PdfViewer;
 using System.Collections.Generic;
 using System.Windows;
 using System.Windows.Controls;
-using CPDFViewer = ComPDFKitViewer.PdfViewer.CPDFViewer;
 
 namespace Compdfkit_Tools.PDFControl
 {

+ 6 - 14
Demo/Examples/Compdfkit_Tools/PDFView/PDFDisplaySettings/PDFDisplaySettingsUI/CPDFViewModeUI.xaml.cs

@@ -27,8 +27,6 @@ namespace Compdfkit_Tools.PDFControlUI
 
         public event EventHandler<ViewMode> ViewModeChanged;
 
-        public event EventHandler<ViewModes> ToolViewModeChanged;
-
         public event EventHandler<bool> CropModeChanged;
 
 
@@ -100,8 +98,7 @@ namespace Compdfkit_Tools.PDFControlUI
             ClearViewState();
             BookViewBtn.IsChecked = true;
             BookViewPath.Fill = ActivePathBrush;
-            //ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked==true? ViewMode.BookContinuous:ViewMode.Book);
-            ToolViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewModes.BookContinuous : ViewModes.Book);
+            ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked==true? ViewMode.BookContinuous:ViewMode.Book);
         }
 
         private void DoubleViewBtn_Click(object sender, RoutedEventArgs e)
@@ -109,8 +106,7 @@ namespace Compdfkit_Tools.PDFControlUI
             ClearViewState();
             DoubleViewBtn.IsChecked = true;
             DoubleViewPath.Fill = ActivePathBrush;
-            //ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.DoubleContinuous:ViewMode.Double);
-            ToolViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewModes.DoubleContinuous:ViewModes.Double);
+            ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.DoubleContinuous:ViewMode.Double);
         }
 
         private void SingleViewBtn_Click(object sender, RoutedEventArgs e)
@@ -118,8 +114,7 @@ namespace Compdfkit_Tools.PDFControlUI
             ClearViewState();
             SingleViewBtn.IsChecked = true;
             SingleViewPath.Fill = ActivePathBrush;
-            //ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.SingleContinuous:ViewMode.Single);
-            ToolViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewModes.SingleContinuous : ViewModes.Single);
+            ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.SingleContinuous:ViewMode.Single);
         }
 
         private void CropModeBtn_Click(object sender, RoutedEventArgs e)
@@ -131,22 +126,19 @@ namespace Compdfkit_Tools.PDFControlUI
         {
             if(SingleViewBtn.IsChecked==true)
             {
-                //ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.SingleContinuous : ViewMode.Single);
-                ToolViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewModes.SingleContinuous : ViewModes.Single);
+                ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.SingleContinuous : ViewMode.Single);
                 return;
             }
 
             if (DoubleViewBtn.IsChecked == true)
             {
-                //ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.DoubleContinuous : ViewMode.Double);
-                ToolViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewModes.DoubleContinuous : ViewModes.Double);
+                ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.DoubleContinuous : ViewMode.Double);
                 return;
             }
 
             if(BookViewBtn.IsChecked == true)
             {
-                //ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.BookContinuous : ViewMode.Book);
-                ToolViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewModes.BookContinuous : ViewModes.Book);
+                ViewModeChanged?.Invoke(this, ContinuePageBtn.IsChecked == true ? ViewMode.BookContinuous : ViewMode.Book);
             }
         }
 

+ 0 - 1
Demo/Examples/Compdfkit_Tools/PDFView/PDFScaling/PDFScalingControl/CPDFScalingControl.xaml.cs

@@ -3,7 +3,6 @@ using ComPDFKitViewer.PdfViewer;
 using System;
 using System.Windows;
 using System.Windows.Controls;
-using CPDFViewer = ComPDFKitViewer.PdfViewer.CPDFViewer;
 
 namespace Compdfkit_Tools.PDFControl
 {

+ 0 - 326
Demo/Examples/PDFViewer/MainPage.xaml.cs

@@ -333,334 +333,8 @@ namespace PDFViewer
             }
             else if (currentMode == "Docs Editor")
             {
-<<<<<<< .merge_file_a05868
-                if (pdfViewControl != null && pdfViewControl.PDFView != null && pdfViewControl.PDFView.Document != null)
-                {
-                    CPDFDocument pdfDoc = pdfViewControl.PDFView.Document;
-                    SaveFileDialog saveDialog = new SaveFileDialog();
-                    saveDialog.Filter = "(*.pdf)|*.pdf";
-                    saveDialog.DefaultExt = ".pdf";
-                    saveDialog.OverwritePrompt = true;
-
-                    if (saveDialog.ShowDialog() == true)
-                    {
-                        pdfDoc.WriteToFilePath(saveDialog.FileName);
-                    }
-                }
-            }
-        }
-
-        /// <summary>
-        /// Save the file in the current path.
-        /// </summary>
-        public void SaveFile()
-        {
-            if (pdfViewControl != null && pdfViewControl.PDFView != null && pdfViewControl.PDFView.Document != null)
-            {
-                CPDFDocument pdfDoc = pdfViewControl.PDFView.Document;
-                if (pdfDoc.WriteToLoadedPath())
-                {
-                    pdfViewControl.PDFView.UndoManager.CanSave = false;
-                    return;
-                }
-
-                SaveFileDialog saveDialog = new SaveFileDialog();
-                saveDialog.Filter = "(*.pdf)|*.pdf";
-                saveDialog.DefaultExt = ".pdf";
-                saveDialog.OverwritePrompt = true;
-
-                if (saveDialog.ShowDialog() == true)
-                {
-                    pdfDoc.WriteToFilePath(saveDialog.FileName);
-                }
-            }
-        }
-
-        public void OpenFile()
-        {
-            string filePath = CommonHelper.GetFilePathOrEmpty();
-            string oldFilePath = pdfViewControl.PDFView.Document.FilePath;
-
-            if (!string.IsNullOrEmpty(filePath) && pdfViewControl != null)
-            {
-                if (pdfViewControl.PDFView != null && pdfViewControl.PDFView.Document != null)
-                {
-                    if (oldFilePath.ToLower() == filePath.ToLower())
-                    {
-                        return;
-                    }
-                }
-
-                if ((bool)CheckExistBeforeOpenFileEvent?.Invoke(new string[] { filePath, oldFilePath }))
-                {
-                    return;
-                }
-
-                passwordViewer = new PDFViewControl();
-                passwordViewer.PDFView.InitDocument(filePath);
-                if (passwordViewer.PDFView.Document == null)
-                {
-                    MessageBox.Show("Open File Failed");
-                    return;
-                }
-
-                if (passwordViewer.PDFView.Document.IsLocked)
-                {
-                    PasswordUI.SetShowText(System.IO.Path.GetFileName(filePath) + " password encrypted.");
-                    PasswordUI.ClearPassword();
-                    PopupBorder.Visibility = Visibility.Visible;
-                    PasswordUI.Visibility = Visibility.Visible;
-                }
-                else
-                {
-                    pdfViewControl = passwordViewer;
-                    LoadDocument();
-                    FileChangeEvent?.Invoke(null, EventArgs.Empty);
-                }
-            }
-        }
-
-        private void OpenFile_Click(object sender, RoutedEventArgs e)
-        {
-            OpenFile();
-        }
-        #endregion
-
-        #region ToolPanel expand and collapse
-        private void ExpandLeftPanel(bool isExpand)
-        {
-            BotaSideTool.Visibility = isExpand ? Visibility.Visible : Visibility.Collapsed;
-            Splitter.Visibility = isExpand ? Visibility.Visible : Visibility.Collapsed;
-            if (isExpand)
-            {
-                BodyGrid.ColumnDefinitions[0].Width = new GridLength(320);
-                BodyGrid.ColumnDefinitions[1].Width = new GridLength(15);
-            }
-            else
-            {
-                BodyGrid.ColumnDefinitions[0].Width = new GridLength(0);
-                BodyGrid.ColumnDefinitions[1].Width = new GridLength(0);
-            }
-        }
-
-        private void ControlLeftPanel()
-        {
-            if (LeftToolPanelButton != null)
-            {
-                bool isExpand = LeftToolPanelButton.IsChecked == true;
-                ExpandLeftPanel(isExpand);
-            }
-        }
-
-        private void ControlRightPanel()
-        {
-            if ((bool)ViewSettingBtn.IsChecked)
-            {
-                ViewSettingBtn.IsChecked = false;
-            }
-            if (RightPanelButton != null)
-            {
-                if (RightPanelButton.IsChecked == true)
-                {
-                    if (currentMode == "Annotation")
-                    {
-                        ExpandRightPropertyPanel(pdfAnnotationControl, Visibility.Visible);
-                    }
-                    else if (currentMode == "Edit")
-                    {
-                        ExpandRightPropertyPanel(pdfContentEditControl, Visibility.Visible);
-                    }
-                    else if (currentMode == "Forms")
-                    {
-                        ExpandRightPropertyPanel(pdfFormControl, Visibility.Visible);
-                    }
-                    else if (currentMode == "Content Editor")
-                    {
-                        ExpandRightPropertyPanel(pdfContentEditControl, Visibility.Visible);
-                    }
-                    else
-                    {
-                        ExpandRightPropertyPanel(pdfAnnotationControl, Visibility.Visible);
-
-                    }
-                }
-                else
-                {
-                    ExpandRightPropertyPanel(null, Visibility.Collapsed);
-                }
-            }
-        }
-
-        private void LeftToolPanelButton_Click(object sender, RoutedEventArgs e)
-        {
-            ControlLeftPanel();
-        }
-
-        private void ExpandSearchBtn_Click(object sender, RoutedEventArgs e)
-        {
-            ExpandLeftPanel(true);
-            LeftToolPanelButton.IsChecked = true;
-            BotaSideTool.SelectBotaTool(BOTATools.Search);
-        }
-
-        private void ShowViewSettings()
-        {
-            if (ViewSettingBtn != null)
-            {
-                if (ViewSettingBtn.IsChecked == true)
-                {
-                    displayPanel.InitWithPDFViewer(pdfViewControl.PDFView);
-                    PropertyContainer.Child = displayPanel;
-                    PropertyContainer.Visibility = Visibility.Visible;
-                    if ((bool)RightPanelButton.IsChecked)
-                    {
-                        RightPanelButton.IsChecked = false;
-                    }
-                }
-                else
-                {
-                    PropertyContainer.Child = null;
-                    PropertyContainer.Visibility = Visibility.Collapsed;
-                }
-            }
-        }
-
-        private void ViewSettingBtn_Click(object sender, RoutedEventArgs e)
-        {
-            ShowViewSettings();
-        }
-
-        public void ExpandRightPropertyPanel(UIElement properytPanel, Visibility visible)
-        {
-            PropertyContainer.Width = 260;
-            PropertyContainer.Child = properytPanel;
-            PropertyContainer.Visibility = visible;
-            if (visible == Visibility.Hidden || visible == Visibility.Collapsed)
-            {
-                RightPanelButton.IsChecked = false;
-            }
-        }
-
-        private void RightPanelButton_Click(object sender, RoutedEventArgs e)
-        {
-            ControlRightPanel();
-        }
-        #endregion
-
-        #region Event handle
-
-        private void AnnotationBarControl_AnnotationPropertyChanged(object sender, CPDFAnnotationType e)
-        {
-            pdfAnnotationControl.LoadAnnotationPanel(e);
-            if (e != CPDFAnnotationType.Audio && e != CPDFAnnotationType.Image)
-            {
-                ExpandRightPropertyPanel(pdfAnnotationControl, Visibility.Visible);
-                RightPanelButton.IsChecked = true;
-            }
-        }
-
-        private void PDFView_AnnotActiveHandler(object sender, AnnotAttribEvent e)
-        {
-            if ((bool)ViewSettingBtn.IsChecked)
-            {
-                ViewSettingBtn.IsChecked = false;
-                RightPanelButton.IsChecked = true;
-            }
-            PropertyContainer.Child = pdfAnnotationControl;
-            pdfAnnotationControl.SetAnnotEventData(e);
-        }
-
-        private void PDFView_WidgetClickHandler(object sender, WidgetArgs e)
-        {
-            if (e is WidgetSignArgs)
-            {
-                RightPanelButton.IsChecked = true;
-                ExpandRightPropertyPanel(pdfFormControl, Visibility.Visible);
-                pdfFormControl.SetPropertyForType(e, null);
-            }
-            else
-            {
-                RightPanelButton.IsChecked = false;
-                ExpandRightPropertyPanel(null, Visibility.Collapsed);
-            }
-        }
-
-        private void PDFView_PDFEditCommandHandler(object sender, PDFEditCommand e)
-        {
-            if (e == null)
-            {
-                return;
-            }
-
-            if (e.EditType == CPDFEditType.EditText)
-            {
-                e.Handle = true;
-                PDFEditTextContextMenu(sender, e);
-            }
-
-            if (e.EditType == CPDFEditType.EditImage)
-            {
-                e.Handle = true;
-                PDFEditImageContextMenu(sender, e);
-            }
-        }
-
-        /// <summary>
-        /// Text and Image Selected Event
-        /// </summary>
-        private void PDFView_PDFEditActiveHandler(object sender, ComPDFKitViewer.PDFEditEvent e)
-        {
-            PropertyContainer.Child = pdfContentEditControl;
-            lastPDFEditEvent = e;
-            if ((bool)ViewSettingBtn.IsChecked)
-            {
-                ViewSettingBtn.IsChecked = false;
-                RightPanelButton.IsChecked = true;
-                ExpandRightPropertyPanel(pdfContentEditControl, Visibility.Visible);
-            }
-
-            if (e == null)
-            {
-                PropertyContainer.Child = pdfContentEditControl;
-
-                if (pdfTextCreateParam != null && pdfViewControl != null && pdfViewControl.PDFView != null)
-                {
-                    if (pdfViewControl.PDFView.GetPDFEditCreateType() == CPDFEditType.EditText)
-                    {
-                        pdfContentEditControl.SetPDFTextEditData(pdfTextCreateParam);
-                    }
-                    else if (pdfViewControl.PDFView.GetPDFEditCreateType() == CPDFEditType.None)
-                    {
-                        pdfContentEditControl.ClearContentControl();
-
-                    }
-                }
-                else
-                {
-                    pdfContentEditControl.ClearContentControl();
-                }
-                return;
-            }
-
-            if (e.EditType == CPDFEditType.EditText)
-            {
-                pdfContentEditControl.SetPDFTextEditData(e, true);
-                return;
-            }
-
-            if (e.EditType == CPDFEditType.EditImage && pdfViewControl != null)
-            {
-                UIElement pageView = sender as UIElement;
-                if (pageView != null)
-                {
-                    pageView.MouseLeftButtonUp += PageView_MouseLeftButtonUp;
-                }
-                pdfContentEditControl.SetPDFImageEditData(e);
-                return;
-=======
                 pageEditControl.ExitPageEdit -= PageEditControl_ExitPageEdit;
                 NotDocsEditorVisible = Visibility.Visible;
->>>>>>> .merge_file_a27492
             }
 
             if (item.Content as string == "Viewer")