Browse Source

PDFAnnotation - Stamp剩余功能(除删除)

zhuyi 1 year ago
parent
commit
0bb8f859f1
38 changed files with 688 additions and 62 deletions
  1. 6 0
      compdfkit_demo_windows/compdfkit/annotation-ctrl-demo/annotation-ctrl-demo.csproj.user
  2. 101 8
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationData/CPDFAnnotationData.cs
  3. 3 0
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationControl/CPDFAnnotationControl.xaml.cs
  4. 39 3
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFStampUI.xaml
  5. 26 0
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFStampUI.xaml.cs
  6. 99 6
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFStampUIViewModel.cs
  7. 18 12
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CreateStampDialog.xaml
  8. 242 10
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CreateStampDialog.xaml.cs
  9. 15 0
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/DeleteDialog.xaml
  10. 37 0
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/DeleteDialog.xaml.cs
  11. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Accepted.png
  12. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Approved.png
  13. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Completed.png
  14. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Confidential.png
  15. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Draft.png
  16. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Empty_stamp.png
  17. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Final.png
  18. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/ForComment.png
  19. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/ForPublicRelease.png
  20. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/InformationOnly.png
  21. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/InitialHere.png
  22. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/NotApproved.png
  23. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/NotForPublicRelease.png
  24. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/PreliminaryResults.png
  25. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/PrivateMark1.png
  26. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/PrivateMark2.png
  27. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/PrivateMark3.png
  28. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Rejected.png
  29. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/SignHere.png
  30. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Void.png
  31. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Witness.png
  32. BIN
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/revised.png
  33. 34 0
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/Convert/UnVisivleConvert.cs
  34. 24 17
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Properties/Settings.Designer.cs
  35. 7 5
      compdfkit_demo_windows/compdfkit/compdfkit-tools/Properties/Settings.settings
  36. 5 0
      compdfkit_demo_windows/compdfkit/compdfkit-tools/app.config
  37. 31 0
      compdfkit_demo_windows/compdfkit/compdfkit-tools/compdfkit-tools.csproj
  38. 1 1
      compdfkit_demo_windows/compdfkit/compdfkit/compdfkit.csproj.user

+ 6 - 0
compdfkit_demo_windows/compdfkit/annotation-ctrl-demo/annotation-ctrl-demo.csproj.user

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <ProjectView>ProjectFiles</ProjectView>
+  </PropertyGroup>
+</Project>

+ 101 - 8
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationData/CPDFAnnotationData.cs

@@ -3,6 +3,7 @@ using compdfkit_tools.PDFControl;
 using ComPDFKitViewer.AnnotEvent;
 using System;
 using System.Collections.Generic;
+using System.ComponentModel;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -105,19 +106,111 @@ namespace compdfkit_tools.Data
         public DashStyle DashStyle = DashStyles.Solid;
         public LineType LineType = new LineType() { HeadLineType = C_LINE_TYPE.LINETYPE_NONE, TailLineType = C_LINE_TYPE.LINETYPE_NONE };
     }
-    public class CPDFStampData : CPDFAnnotationData
+    public class CPDFStampData : CPDFAnnotationData, INotifyPropertyChanged
     {
-        public string StampText = "";
-        public string SourcePath = "";
-        public int MaxWidth = 0;
-        public int MaxHeight= 0;
-        public StampType Type = StampType.UNKNOWN_STAMP;
-        public double Opacity = 1;
-        public BitmapSource ImageSource=null;
+        public event PropertyChangedEventHandler PropertyChanged;
+        public void RaisePropertyChanged(string PropertyName)
+        {
+            if (this.PropertyChanged != null)
+            {
+                this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs(PropertyName));
+            }
+        }
+
+        private string stampText;
+
+        public string StampText
+        {
+            get { return stampText; }
+            set
+            {
+                stampText=value;
+                RaisePropertyChanged("StampText");
+            }
+        }
+
+        private string sourcePath;
+
+        public string SourcePath
+        {
+            get { return sourcePath; }
+            set
+            {
+                sourcePath = value;
+                RaisePropertyChanged("SourcePath");
+            }
+        }
+
+
+        private int maxWidth;
+
+        public int MaxWidth
+        {
+            get { return maxWidth; }
+            set
+            {
+                maxWidth = value;
+                RaisePropertyChanged("MaxWidth");
+            }
+        }
+
+        private int maxHeight;
+
+        public int MaxHeight
+        {
+            get { return maxHeight; }
+            set
+            {
+                maxHeight = value;
+                RaisePropertyChanged("MaxHeight");
+            }
+        }
+
+
+        private StampType type = StampType.UNKNOWN_STAMP;
+
+        public StampType Type
+        {
+            get { return type; }
+            set
+            {
+                type = value;
+                RaisePropertyChanged("Type");
+            }
+        }
+
+        private double opacity;
+
+        public double Opacity
+        {
+            get { return opacity; }
+            set
+            {
+                opacity = value;
+                RaisePropertyChanged("Opacity");
+            }
+        }
+        private BitmapSource imageSource;
+
+        public BitmapSource ImageSource
+        {
+            get { return imageSource; }
+            set
+            {
+                imageSource = value;
+                RaisePropertyChanged("ImageSource");
+            }
+        }
+
         public TextStampColor TextColor = TextStampColor.TEXTSTAMP_WHITE;
         public string StampTextDate = "";
         public TextStampSharp TextSharp = TextStampSharp.TEXTSTAMP_NONE;
         public bool IsCheckedDate=false;
         public bool IsCheckedTime=false;
+
+    }
+    public class CustomStampList : List<CPDFStampData>
+    {
+
     }
 }

+ 3 - 0
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationControl/CPDFAnnotationControl.xaml.cs

@@ -84,6 +84,9 @@ namespace compdfkit_tools.Annotation.PDFAnnotationControl
                     (annotationPanel as CPDFShapeUI).PropertyChanged += CPDFAnnotationControl_PropertyChanged;
                     SetAnnotationProperty((annotationPanel as CPDFShapeUI).GetShapeData());
                     break;
+                case AnnotationType.Stamp:
+                    (annotationPanel as CPDFStampUI).PropertyChanged += CPDFAnnotationControl_PropertyChanged;
+                    break;
                 default:
                     break;
             }

+ 39 - 3
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFStampUI.xaml

@@ -85,7 +85,21 @@
                 Background="Transparent"
                 BorderThickness="0"
                 ItemsSource="{Binding StandardStampList}"
-                    />
+                    >
+                    <ListBox.ItemTemplate>
+                        <DataTemplate>
+                            <Image
+                                Height="40"
+                                Source="{Binding SourcePath}"
+                                Stretch="Uniform" />
+                        </DataTemplate>
+                    </ListBox.ItemTemplate>
+                    <ListBox.ItemContainerStyle>
+                        <Style TargetType="ListBoxItem">
+                            <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListBoxItem_PreviewMouseLeftButtonDown" />
+                        </Style>
+                    </ListBox.ItemContainerStyle>
+                </ListBox>
             </TabItem>
             <TabItem Header="Customize">
                 <Grid>
@@ -96,7 +110,7 @@
                     </Grid.RowDefinitions>
                     <UniformGrid  Rows="1" >
                         <Button Content="文字" Height="20" Click="Text_Click"/>
-                        <Button Content="图片" Height="20"/>
+                        <Button Content="图片" Height="20" Click="Image_Click"/>
                     </UniformGrid>
                     <ListView
                     Grid.Row="1"
@@ -106,11 +120,33 @@
                     BorderThickness="0"
                     ItemsSource="{Binding CustomStampList}"
                     >
+                        <ListView.GroupStyle>
+                            <GroupStyle>
+                                <GroupStyle.HeaderTemplate>
+                                    <DataTemplate>
+                                        <TextBlock Text="{Binding Name}"/>
+                                    </DataTemplate>
+                                </GroupStyle.HeaderTemplate>
+                                <GroupStyle.Panel>
+                                    <ItemsPanelTemplate>
+                                        <VirtualizingStackPanel Visibility="Visible"/>
+                                    </ItemsPanelTemplate>
+                                </GroupStyle.Panel>
+                            </GroupStyle>
+                        </ListView.GroupStyle>
                         <ListView.ItemTemplate>
                             <DataTemplate>
-                                <TextBlock  Text="111" Width="50" Background="Red"/>
+                                <Image
+                                Height="40"
+                                Source="{Binding SourcePath}"
+                                Stretch="Uniform" />
                             </DataTemplate>
                         </ListView.ItemTemplate>
+                        <ListBox.ItemContainerStyle>
+                            <Style TargetType="ListViewItem">
+                                <EventSetter Event="PreviewMouseLeftButtonDown" Handler="ListViewItem_PreviewMouseLeftButtonDown_1" />
+                            </Style>
+                        </ListBox.ItemContainerStyle>
                     </ListView>
                 </Grid>
             </TabItem>

+ 26 - 0
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFStampUI.xaml.cs

@@ -44,9 +44,35 @@ namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
         private void Text_Click(object sender, RoutedEventArgs e)
         {
             CreateStampDialog createStampDialog = new CreateStampDialog();
+            createStampDialog.SetCreateHeaderIndex(0);
             createStampDialog.Owner = Window.GetWindow(this);
             createStampDialog.ShowDialog();
             (this.DataContext as CPDFStampUIViewModel).UpDataCustomStamp(createStampDialog.cPDFStampData);
         }
+
+        private void Image_Click(object sender, RoutedEventArgs e)
+        {
+
+            CreateStampDialog createStampDialog = new CreateStampDialog();
+            createStampDialog.SetCreateHeaderIndex(1);
+            createStampDialog.Owner = Window.GetWindow(this);
+            createStampDialog.ShowDialog();
+            (this.DataContext as CPDFStampUIViewModel).UpDataCustomStamp(createStampDialog.cPDFStampData);
+        }
+
+        private void ListBoxItem_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            PropertyChanged?.Invoke(this, (sender as ListBoxItem).DataContext as CPDFStampData);
+        }
+
+        private void ListBoxItem_PreviewMouseLeftButtonDown_1(object sender, MouseButtonEventArgs e)
+        {
+            PropertyChanged?.Invoke(this, (sender as ListBoxItem).DataContext as CPDFStampData);
+        }
+
+        private void ListViewItem_PreviewMouseLeftButtonDown_1(object sender, MouseButtonEventArgs e)
+        {
+            PropertyChanged?.Invoke(this, (sender as ListViewItem).DataContext as CPDFStampData);
+        }
     }
 }

+ 99 - 6
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFStampUIViewModel.cs

@@ -10,6 +10,7 @@ using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows.Data;
 
 namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
 {
@@ -19,12 +20,53 @@ namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
 
         public void RaisePropertyChanged(string PropertyName)
         {
-            if (this.PropertyChanged!=null)
+            if (this.PropertyChanged != null)
             {
                 this.PropertyChanged.Invoke(this, new PropertyChangedEventArgs(PropertyName));
             }
         }
+        #region StandardStamp
 
+        List<string> Path = new List<string>
+        {
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/Approved.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/NotApproved.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/Completed.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/Final.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/Draft.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/Confidential.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/ForPublicRelease.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/NotForPublicRelease.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/ForComment.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/Void.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/PreliminaryResults.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/InformationOnly.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/Accepted.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/Rejected.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/Witness.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/InitialHere.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/SignHere.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/revised.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/PrivateMark1.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/PrivateMark2.png",
+            "pack://application:,,,/com.compdfkit.tools;component/Asset/Resource/Annotation/StampIcons/PrivateMark3.png",
+        };
+        List<string> StampText = new List<string>
+        {
+            "Approved","NotApproved","Completed","Final","Draft","Confidential","ForPublicRelease","NotForPublicRelease",
+            "ForComment","Void","PreliminaryResults","InformationOnly","Accepted","Rejected","Witness","InitialHere","SignHere",
+            "revised","PrivateMark#1","PrivateMark#2","PrivateMark#3"
+        };
+        List<int> MaxWidth = new List<int>
+        {
+            218,292,234,130,150,280,386,461,282,121,405,366,30,30,133,133,133,173,30,30,30
+        };
+        List<int> MaxHeight = new List<int>
+        {
+           66,66,66,66,66,66,66,66,66,66,66,66,30,30,39,39,39,66,30,30,30
+        };
+
+        #endregion
         public ObservableCollection<CPDFStampData> StandardStampList { get; set; }
         public ObservableCollection<CPDFStampData> CustomStampList { get; set; }
 
@@ -34,11 +76,27 @@ namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
             CustomStampList = new ObservableCollection<CPDFStampData>();
             InitStandardStamp();
             LoadSettings();
+
+
+            ICollectionView groupView = CollectionViewSource.GetDefaultView(CustomStampList);
+            groupView.GroupDescriptions.Add(new PropertyGroupDescription(nameof(CPDFStampData.Type)));
         }
 
         public void InitStandardStamp()
         {
-
+            for (int i = 0; i < Path.Count; i++)
+            {
+                CPDFStampData standardStamp = new CPDFStampData();
+                standardStamp.Author = "";
+                standardStamp.Opacity = 1;
+                standardStamp.SourcePath = Path[i];
+                standardStamp.StampText = StampText[i];
+                standardStamp.MaxWidth = MaxWidth[i];
+                standardStamp.MaxHeight = MaxHeight[i];
+                standardStamp.Type = StampType.STANDARD_STAMP;
+                standardStamp.AnnotationType = AnnotationType.Stamp;
+                StandardStampList.Add(standardStamp);
+            }
         }
 
         /// <summary>
@@ -46,10 +104,31 @@ namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
         /// </summary>
         public void LoadSettings()
         {
-
+            CustomStampList stamps = Settings.Default.CustomStampList;
+            if (stamps != null)
+            {
+                for (int i = 0; i < stamps.Count; i++)
+                {
+                    CPDFStampData customStamp = new CPDFStampData();
+                    customStamp.Opacity = 1;
+                    customStamp.Author = stamps[i].Author;
+                    customStamp.StampText = stamps[i].StampText;
+                    customStamp.StampTextDate = stamps[i].StampTextDate;
+                    customStamp.MaxWidth = stamps[i].MaxWidth;
+                    customStamp.MaxHeight = stamps[i].MaxHeight;
+                    customStamp.SourcePath = stamps[i].SourcePath;
+                    customStamp.Type = stamps[i].Type;
+                    customStamp.TextSharp = stamps[i].TextSharp;
+                    customStamp.TextColor = stamps[i].TextColor;
+                    customStamp.IsCheckedTime = stamps[i].IsCheckedTime;
+                    customStamp.IsCheckedDate = stamps[i].IsCheckedDate;
+                    customStamp.AnnotationType = AnnotationType.Stamp;
+                    CustomStampList.Add(customStamp);
+                }
+            }
         }
 
-        public void DeleteStamp(CPDFStampData stampData) 
+        public void DeleteStamp(CPDFStampData stampData)
         {
             int index = CustomStampList.IndexOf(stampData);
             DirectoryInfo CreatedFilePathFolder = new DirectoryInfo(stampData.SourcePath);
@@ -58,11 +137,25 @@ namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
                 Directory.Delete(stampData.SourcePath, true);
             }
             CustomStampList.RemoveAt(index);
+
+            CustomStampList stamps = Settings.Default.CustomStampList;
+            stamps.RemoveAt(index);
+            Settings.Default.Save();
         }
         public void UpDataCustomStamp(CPDFStampData oldstamp)
         {
-            CustomStampList.Add(oldstamp);
+            if (oldstamp != null)
+            {
+                CustomStampList.Add(oldstamp);
+                //缓存数据
+                CustomStampList stamps = Settings.Default.CustomStampList;
+                if (stamps == null)
+                {
+                    stamps = Settings.Default.CustomStampList = new CustomStampList();
+                }
+                stamps.Add(oldstamp);
+                Settings.Default.Save();
+            }
         }
-
     }
 }

+ 18 - 12
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CreateStampDialog.xaml

@@ -3,12 +3,14 @@
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        xmlns:local="clr-namespace:compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI"
+        xmlns:local="clr-namespace:compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI" xmlns:convert="clr-namespace:compdfkit_tools.Common.Convert"
         mc:Ignorable="d"
         ShowInTaskbar="False"
         ResizeMode="NoResize"
+        Loaded="Window_Loaded"
         Title="CreateStampDialog" Height="450" Width="800">
     <Window.Resources>
+        <convert:UnVisivleConvert x:Key="UnVisivleConvert"/>
         <SolidColorBrush x:Key="TabItem.Selected.Background" Color="#FFFFFF"/>
         <SolidColorBrush x:Key="TabItem.Selected.Border" Color="#ACACAC"/>
         <Style x:Key="TabControlStyle1" TargetType="{x:Type TabControl}">
@@ -93,30 +95,34 @@
                         <RowDefinition Height="20"/>
                     </Grid.RowDefinitions>
                     <Image  x:Name="TextImage" />
-                    <ComboBox SelectedIndex="0" Grid.Row="1">
-                        <ComboBoxItem Content="左箭头"/>
+                    <ComboBox x:Name="ShapeBox" SelectedIndex="0" Grid.Row="1" SelectionChanged="ComboBox_SelectionChanged">
+                        <ComboBoxItem Content="左箭头" />
                     </ComboBox>
                     <StackPanel Orientation="Horizontal" Grid.Row="2">
-                        <RadioButton Content="红" Checked="RadioButton_Checked" Tag="0" IsChecked="True"/>
+                        <RadioButton x:Name="DefaultBtn" Content="红" Checked="RadioButton_Checked" Tag="0" IsChecked="True"/>
                         <RadioButton Content="绿" Checked="RadioButton_Checked" Tag="1"/>
                         <RadioButton Content="蓝" Checked="RadioButton_Checked" Tag="2"/>
                     </StackPanel>
-                    <TextBox x:Name="StampText" Grid.Row="3" TextChanged="TextBox_TextChanged"/>
-                    <CheckBox Name="Date" Content="日期" Grid.Row="4"/>
-                    <CheckBox Name="Time" Content="时间" Grid.Row="5"/>
+                    <TextBox x:Name="StampText" Grid.Row="3" Text="Stamp Text" TextChanged="TextBox_TextChanged"/>
+                    <CheckBox Name="Date" Content="日期" Grid.Row="4" Checked="Date_Checked" Unchecked="Date_Unchecked"/>
+                    <CheckBox Name="Time" Content="时间" Grid.Row="5" Checked="Time_Checked" Unchecked="Time_Unchecked"/>
                 </Grid>
             </TabItem>
             <TabItem Header="图片">
                 <Grid>
-                    <Button Content="添加文件"/>
-                    <Image/>
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="367*"/>
+                        <ColumnDefinition Width="427*"/>
+                    </Grid.ColumnDefinitions>
+                    <Button x:Name="AddImageBtn" Content="添加文件" Grid.ColumnSpan="2" Click="OpenImage_Click"/>
+                    <Image  x:Name="ImageImage" Grid.ColumnSpan="2" Visibility="{Binding ElementName=AddImageBtn,Path=Visibility, Converter={StaticResource UnVisivleConvert}}"/>
                 </Grid>
             </TabItem>
         </TabControl>
         <StackPanel Grid.Row="2" Orientation="Horizontal">
-            <Button Content="清除"/>
-            <Button Content="确定" Click="Button_Click"/>
-            <Button Content="取消"/>
+            <Button Content="Clear" Click="Clear_Click"/>
+            <Button Content="Save" Click="Save_Click"/>
+            <Button Content="Cancel" Click="Cancel_Click"/>
         </StackPanel>
     </Grid>
 </Window>

+ 242 - 10
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CreateStampDialog.xaml.cs

@@ -1,20 +1,23 @@
 using ComPDFKit.PDFAnnotation;
 using compdfkit_tools.Data;
+using ComPDFKitViewer;
 using ComPDFKitViewer.AnnotEvent;
+using Microsoft.Win32;
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
+using System.Reflection;
+using System.Runtime.InteropServices.ComTypes;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Data;
 using System.Windows.Documents;
-using System.Windows.Forms;
 using System.Windows.Input;
 using System.Windows.Media;
 using System.Windows.Media.Imaging;
-using System.Windows.Shapes;
 
 namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
 {
@@ -24,19 +27,35 @@ namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
     public partial class CreateStampDialog : Window
     {
         public CPDFStampData cPDFStampData;
-        C_TEXTSTAMP_SHAPE Shape;
-        C_TEXTSTAMP_COLOR Color;
+        private string SaveToPath;
+        private string StampTextDate;
+        private static int Dpi;
+        private string CustomStampPath;
+        private int StampWidth;
+        private int StampHeight;
+        private static float ScaleDpi { get { return (96F / Dpi); } }
+        private C_TEXTSTAMP_SHAPE Shape;
+        private C_TEXTSTAMP_COLOR Color;
+        bool PageLoaded=false;
         public CreateStampDialog()
         {
             InitializeComponent();
         }
 
+        public void SetCreateHeaderIndex(int index)
+        {
+            CreateHeader.SelectedIndex = index;
+        }
+
         private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
         {
-            UpDataStamp();
+            if (PageLoaded)
+            {
+                UpTextPreview();
+            }
         }
 
-        private void Button_Click(object sender, RoutedEventArgs e)
+        private void Save_Click(object sender, RoutedEventArgs e)
         {
             StampType Type = StampType.UNKNOWN_STAMP;
             switch (CreateHeader.SelectedIndex)
@@ -50,6 +69,7 @@ namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
                 default:
                     break;
             }
+            CretaeStampData(Type);
             this.Close();
         }
 
@@ -59,20 +79,101 @@ namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
             {
                 case "0":
                     Color = C_TEXTSTAMP_COLOR.TEXTSTAMP_RED;
+                    UpTextPreview();
                     break;
                 case "1":
                     Color = C_TEXTSTAMP_COLOR.TEXTSTAMP_GREEN;
+                    UpTextPreview();
                     break;
                 case "2":
                     Color = C_TEXTSTAMP_COLOR.TEXTSTAMP_BLUE;
+                    UpTextPreview();
                     break;
                 default:
                     break;
             }
         }
 
-        private void UpDataStamp()
+        private void OpenImage()
         {
+            OpenFileDialog openFile = new OpenFileDialog();
+            openFile.Filter = "All Image Files(*.bmp;*.gif;*.jpeg;*.jpg;*.png;*.tiff)|*.bmp;*.gif;*.jpeg;*.jpg;*.png;*.tiff|(*.bmp)|*.bmp|" +
+                "(*.gif)|*.gif|" +
+                "(*.jpeg)|*.jpeg|" +
+                "(*.jpg)|*.jpg|" +
+                "(*.png)|*.png|" +
+                "(*.tiff)|*.tiff";
+            if (openFile.ShowDialog() == false)
+            {
+                return;
+            }
+            string path = CustomStampPath;
+            string name = Guid.NewGuid().ToString();
+            if (!string.IsNullOrEmpty(CustomStampPath))
+            {
+                BitmapImage image = new BitmapImage(new Uri(openFile.FileName));
+                double scale = Math.Min((double)600 / image.PixelWidth, (double)600 / image.PixelHeight);
+                scale = Math.Min(scale, 1);
+                string ext = Path.GetExtension(openFile.FileName);
+                if (ext.ToUpper() == ".PNG")
+                {
+                    BitmapEncoder encoder = new PngBitmapEncoder();
+                    var targetBitmap = new TransformedBitmap(image, new ScaleTransform(scale, scale));
+                    encoder.Frames.Add(BitmapFrame.Create(targetBitmap));
+                    path = System.IO.Path.Combine(path, name);
+                    using (FileStream stream = new FileStream(path, FileMode.Create))
+                    {
+                        encoder.Save(stream);
+                    }
+                    if (!string.IsNullOrEmpty(SaveToPath))
+                    {
+                        DirectoryInfo CreatedFilePathFolder = new DirectoryInfo(SaveToPath);
+                        if (CreatedFilePathFolder.Exists)
+                        {
+                            Directory.Delete(SaveToPath, true);
+                        }
+                    }
+                    SaveToPath = path;
+                    ImageImage.Source = targetBitmap;
+                    StampWidth = targetBitmap.PixelWidth;
+                    StampHeight = targetBitmap.PixelHeight;
+                }
+                else
+                {
+                    BitmapEncoder encoder = new JpegBitmapEncoder();
+                    TransformedBitmap targetBitmap = new TransformedBitmap(image, new ScaleTransform(scale, scale));
+                    encoder.Frames.Add(BitmapFrame.Create(targetBitmap));
+                    path = System.IO.Path.Combine(path, name);
+                    using (FileStream stream = new FileStream(path, FileMode.Create))
+                    {
+                        encoder.Save(stream);
+                    }
+                    if (!string.IsNullOrEmpty(SaveToPath))
+                    {
+                        DirectoryInfo CreatedFilePathFolder = new DirectoryInfo(SaveToPath);
+                        if (CreatedFilePathFolder.Exists)
+                        {
+                            Directory.Delete(SaveToPath, true);
+                        }
+                    }
+                    SaveToPath = path;
+                    ImageImage.Source = targetBitmap;
+                    StampWidth = targetBitmap.PixelWidth;
+                    StampHeight = targetBitmap.PixelHeight;
+                }
+            }
+            else
+            {
+                SaveToPath = "";
+            }
+        }
+
+        private void UpTextPreview()
+        {
+            if(!PageLoaded)
+            { 
+                return; 
+            }
             string date = "";
             string dateType = "";
             if ((bool)Date.IsChecked)
@@ -95,9 +196,9 @@ namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
                 PixelFormat fmt = PixelFormats.Bgra32;
                 BitmapSource bps = BitmapSource.Create(width, height, 96, 96, fmt, null, bytes, (width * fmt.BitsPerPixel + 7) / 8);
                 TextImage.Source = bps;
-                //StampTextDate = date;
-                //StampWidth = stampWidth;
-                //StampHeight = stampHeight;
+                StampTextDate = date;
+                StampWidth = stampWidth;
+                StampHeight = stampHeight;
                 //Type = StampType.TEXT_STAMP;
             }
             else
@@ -105,5 +206,136 @@ namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
                 TextImage.Source = null;
             }
         }
+
+        private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+            switch (ShapeBox.SelectedIndex)
+            {
+                case 0:
+                    Shape = C_TEXTSTAMP_SHAPE.TEXTSTAMP_LEFT_TRIANGLE;
+                    break;
+                default:
+                    break;
+            }
+            UpTextPreview();
+        }
+
+        private void CretaeStampData(StampType Type)
+        {
+            switch (Type)
+            {
+                case StampType.UNKNOWN_STAMP:
+                    break;
+                case StampType.IMAGE_STAMP:
+                    CreateCPDFStampData();
+                    cPDFStampData.Type = Type;
+                    break;
+                case StampType.TEXT_STAMP:
+                    SaveImageToPath();
+                    CreateCPDFStampData();
+                    cPDFStampData.Type = Type;
+                    break;
+                default:
+                    break;
+            }
+        }
+
+        private void SaveImageToPath()
+        {
+            string path = CustomStampPath;
+            string name = Guid.NewGuid().ToString();
+            if (!string.IsNullOrEmpty(path)&& TextImage.Source!=null)
+            {
+                BitmapEncoder encoder = new PngBitmapEncoder();
+                encoder.Frames.Add(BitmapFrame.Create((BitmapSource)TextImage.Source));
+                path = System.IO.Path.Combine(path, name);
+                using (FileStream stream = new FileStream(path, FileMode.Create))
+                {
+                    encoder.Save(stream);
+                }
+                SaveToPath = path;
+            }
+            else
+            {
+                SaveToPath = "";
+            }
+        }
+
+        private void CreateCPDFStampData()
+        {
+            CPDFStampData stamp = new CPDFStampData();
+            stamp.Opacity = 1;
+            stamp.SourcePath = SaveToPath;
+            stamp.StampText = StampText.Text;
+            stamp.MaxWidth = (int)(double)((StampWidth / 72D * Dpi) * ScaleDpi);
+            stamp.MaxHeight = (int)(double)((StampHeight / 72D * Dpi) * ScaleDpi);
+            stamp.StampTextDate = StampTextDate;
+            stamp.TextColor = (TextStampColor)(int)Color;
+            stamp.TextSharp = (TextStampSharp)(int)Shape;
+            stamp.IsCheckedDate = (bool)Date.IsChecked;
+            stamp.IsCheckedTime = (bool)Time.IsChecked;
+            stamp.AnnotationType = AnnotationType.Stamp;
+            cPDFStampData = stamp;
+        }
+
+        private void Window_Loaded(object sender, RoutedEventArgs e)
+        {
+            var flags = BindingFlags.NonPublic | BindingFlags.Static;
+            var dpiProperty = typeof(SystemParameters).GetProperty("Dpi", flags);
+            Dpi = (int)dpiProperty.GetValue(null, null);
+
+            CustomStampPath = System.IO.Path.Combine(Environment.CurrentDirectory, "ComPDFKit");
+            CustomStampPath = System.IO.Path.Combine(CustomStampPath, "CustomStamp");
+            System.IO.DirectoryInfo directoryInfo = System.IO.Directory.CreateDirectory(CustomStampPath);
+
+            PageLoaded=true;
+
+            UpTextPreview();
+        }
+
+
+        private void OpenImage_Click(object sender, RoutedEventArgs e)
+        {
+            OpenImage();
+            AddImageBtn.Visibility = Visibility.Collapsed;
+        }
+
+
+        private void Cancel_Click(object sender, RoutedEventArgs e)
+        {
+            this.Close();
+        }
+
+        private void Clear_Click(object sender, RoutedEventArgs e)
+        {
+            cPDFStampData=null;
+            ImageImage.Source=null;
+            TextImage.Source=null;
+            DefaultBtn.IsChecked = true;
+            Date.IsChecked = false;
+            Time.IsChecked = false;
+            StampText.Text = "Stamp Text";
+            UpTextPreview();
+        }
+
+        private void Date_Checked(object sender, RoutedEventArgs e)
+        {
+            UpTextPreview();
+        }
+
+        private void Date_Unchecked(object sender, RoutedEventArgs e)
+        {
+            UpTextPreview();
+        }
+
+        private void Time_Checked(object sender, RoutedEventArgs e)
+        {
+            UpTextPreview();
+        }
+
+        private void Time_Unchecked(object sender, RoutedEventArgs e)
+        {
+            UpTextPreview();
+        }
     }
 }

+ 15 - 0
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/DeleteDialog.xaml

@@ -0,0 +1,15 @@
+<Window x:Class="compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI.DeleteDialog"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI"
+        mc:Ignorable="d"
+        Title="DeleteDialog" Height="450" Width="800">
+    <Grid>
+        <StackPanel Orientation="Horizontal">
+            <Button Content="确定" Click="Button_Click"/>
+            <Button Content="取消" Click="Button_Click_1"/>
+        </StackPanel>
+    </Grid>
+</Window>

+ 37 - 0
compdfkit_demo_windows/compdfkit/compdfkit-tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/DeleteDialog.xaml.cs

@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace compdfkit_tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
+{
+    /// <summary>
+    /// DeleteDialog.xaml 的交互逻辑
+    /// </summary>
+    public partial class DeleteDialog : Window
+    {
+        public DeleteDialog()
+        {
+            InitializeComponent();
+        }
+
+        private void Button_Click(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+        private void Button_Click_1(object sender, RoutedEventArgs e)
+        {
+
+        }
+    }
+}

BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Accepted.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Approved.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Completed.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Confidential.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Draft.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Empty_stamp.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Final.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/ForComment.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/ForPublicRelease.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/InformationOnly.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/InitialHere.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/NotApproved.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/NotForPublicRelease.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/PreliminaryResults.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/PrivateMark1.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/PrivateMark2.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/PrivateMark3.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Rejected.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/SignHere.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Void.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/Witness.png


BIN
compdfkit_demo_windows/compdfkit/compdfkit-tools/Asset/Resource/Annotation/StampIcons/revised.png


+ 34 - 0
compdfkit_demo_windows/compdfkit/compdfkit-tools/Common/Convert/UnVisivleConvert.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+
+namespace compdfkit_tools.Common.Convert
+{
+    public class UnVisivleConvert : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if ((Visibility)value == Visibility.Visible)
+            {
+                return Visibility.Collapsed;
+            }
+            else
+                return Visibility.Visible;
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if ((Visibility)value == Visibility.Visible)
+            {
+                return Visibility.Collapsed;
+            }
+            else
+                return Visibility.Visible;
+        }
+    }
+}

+ 24 - 17
compdfkit_demo_windows/compdfkit/compdfkit-tools/Properties/Settings.Designer.cs

@@ -1,30 +1,37 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
+//     此代码由工具生成。
+//     运行时版本:4.0.30319.42000
 //
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
+//     对此文件的更改可能会导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
 // </auto-generated>
 //------------------------------------------------------------------------------
 
-namespace compdfkit_tools.Properties
-{
-
-
+namespace compdfkit_tools.Properties {
+    
+    
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
-    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
-    {
-
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+        
         private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
-        public static Settings Default
-        {
-            get
-            {
+        
+        public static Settings Default {
+            get {
                 return defaultInstance;
             }
         }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        public global::compdfkit_tools.Data.CustomStampList CustomStampList {
+            get {
+                return ((global::compdfkit_tools.Data.CustomStampList)(this["CustomStampList"]));
+            }
+            set {
+                this["CustomStampList"] = value;
+            }
+        }
     }
 }

+ 7 - 5
compdfkit_demo_windows/compdfkit/compdfkit-tools/Properties/Settings.settings

@@ -1,7 +1,9 @@
 <?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
-  <Profiles>
-    <Profile Name="(Default)" />
-  </Profiles>
-  <Settings />
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="compdfkit_tools.Properties" GeneratedClassName="Settings">
+  <Profiles />
+  <Settings>
+    <Setting Name="CustomStampList" Type="compdfkit_tools.Data.CustomStampList" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+  </Settings>
 </SettingsFile>

+ 5 - 0
compdfkit_demo_windows/compdfkit/compdfkit-tools/app.config

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <configSections>
+    </configSections>
+</configuration>

+ 31 - 0
compdfkit_demo_windows/compdfkit/compdfkit-tools/compdfkit-tools.csproj

@@ -65,6 +65,10 @@
     <Reference Include="PresentationFramework" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Annotation\PDFAnnotationPanel\PDFAnnotationUI\DeleteDialog.xaml.cs">
+      <DependentUpon>DeleteDialog.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Common\Convert\UnVisivleConvert.cs" />
     <Compile Include="Common\PropertyControl\PDFArrow\CPDFArrowControl.xaml.cs">
       <DependentUpon>CPDFArrowControl.xaml</DependentUpon>
     </Compile>
@@ -243,12 +247,35 @@
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
     </EmbeddedResource>
+    <None Include="app.config" />
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
     </None>
   </ItemGroup>
   <ItemGroup>
+    <Resource Include="Asset\Resource\Annotation\StampIcons\Accepted.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\Approved.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\Completed.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\Confidential.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\Draft.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\Empty_stamp.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\Final.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\ForComment.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\ForPublicRelease.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\InformationOnly.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\InitialHere.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\NotApproved.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\NotForPublicRelease.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\PreliminaryResults.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\PrivateMark1.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\PrivateMark2.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\PrivateMark3.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\Rejected.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\revised.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\SignHere.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\Void.png" />
+    <Resource Include="Asset\Resource\Annotation\StampIcons\Witness.png" />
     <Content Include="VirtualizingWrapPanel.dll">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
@@ -257,6 +284,10 @@
     <Resource Include="Asset\Resource\Annotation\Rect.png" />
   </ItemGroup>
   <ItemGroup>
+    <Page Include="Annotation\PDFAnnotationPanel\PDFAnnotationUI\DeleteDialog.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Common\PropertyControl\PDFArrow\CPDFArrowControl.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 1 - 1
compdfkit_demo_windows/compdfkit/compdfkit/compdfkit.csproj.user

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <ProjectView>ShowAllFiles</ProjectView>
+    <ProjectView>ProjectFiles</ProjectView>
   </PropertyGroup>
 </Project>