|
@@ -171,6 +171,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
private void FormBtn_Click(object sender, RoutedEventArgs e)
|
|
private void FormBtn_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
{
|
|
ClearToolState(sender as ToggleButton);
|
|
ClearToolState(sender as ToggleButton);
|
|
|
|
+ pdfViewer.PDFToolManager.SetCreateWidgetType(C_WIDGET_TYPE.WIDGET_NONE);
|
|
fromPropertyControl.SetPropertyForType(null, null,null);
|
|
fromPropertyControl.SetPropertyForType(null, null,null);
|
|
if ((bool)(sender as ToggleButton).IsChecked)
|
|
if ((bool)(sender as ToggleButton).IsChecked)
|
|
{
|
|
{
|
|
@@ -245,7 +246,8 @@ namespace Compdfkit_Tools.PDFControl
|
|
private void CreateTextBox()
|
|
private void CreateTextBox()
|
|
{
|
|
{
|
|
pdfViewer.PDFToolManager.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.FormEdit);
|
|
pdfViewer.PDFToolManager.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.FormEdit);
|
|
- TextBoxParam textBoxParam = new TextBoxParam();
|
|
|
|
|
|
+ pdfViewer.PDFToolManager.SetCreateWidgetType(C_WIDGET_TYPE.WIDGET_TEXTFIELD);
|
|
|
|
+ TextBoxParam textBoxParam = new TextBoxParam();
|
|
textBoxParam.LineWidth = 1;
|
|
textBoxParam.LineWidth = 1;
|
|
textBoxParam.FontName = "Helvetica";
|
|
textBoxParam.FontName = "Helvetica";
|
|
textBoxParam.LineColor =new byte[] {0,0,0 };
|
|
textBoxParam.LineColor =new byte[] {0,0,0 };
|
|
@@ -257,6 +259,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
private void CreateRadioBtn()
|
|
private void CreateRadioBtn()
|
|
{
|
|
{
|
|
pdfViewer.PDFToolManager.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.FormEdit);
|
|
pdfViewer.PDFToolManager.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.FormEdit);
|
|
|
|
+ pdfViewer.PDFToolManager.SetCreateWidgetType(C_WIDGET_TYPE.WIDGET_RADIOBUTTON);
|
|
RadioButtonParam radioButtonParam = new RadioButtonParam();
|
|
RadioButtonParam radioButtonParam = new RadioButtonParam();
|
|
radioButtonParam.CheckStyle = C_CHECK_STYLE.CK_CIRCLE;
|
|
radioButtonParam.CheckStyle = C_CHECK_STYLE.CK_CIRCLE;
|
|
radioButtonParam.BorderStyle = C_BORDER_STYLE.BS_SOLID;
|
|
radioButtonParam.BorderStyle = C_BORDER_STYLE.BS_SOLID;
|
|
@@ -270,6 +273,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
private void CreateCheckBox()
|
|
private void CreateCheckBox()
|
|
{
|
|
{
|
|
pdfViewer.PDFToolManager.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.FormEdit);
|
|
pdfViewer.PDFToolManager.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.FormEdit);
|
|
|
|
+ pdfViewer.PDFToolManager.SetCreateWidgetType(C_WIDGET_TYPE.WIDGET_CHECKBOX);
|
|
CheckBoxParam checkBoxParam = new CheckBoxParam();
|
|
CheckBoxParam checkBoxParam = new CheckBoxParam();
|
|
checkBoxParam.CheckStyle = C_CHECK_STYLE.CK_CHECK;
|
|
checkBoxParam.CheckStyle = C_CHECK_STYLE.CK_CHECK;
|
|
checkBoxParam.BorderStyle = C_BORDER_STYLE.BS_SOLID;
|
|
checkBoxParam.BorderStyle = C_BORDER_STYLE.BS_SOLID;
|
|
@@ -283,6 +287,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
private void CreateComboBox()
|
|
private void CreateComboBox()
|
|
{
|
|
{
|
|
pdfViewer.PDFToolManager.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.FormEdit);
|
|
pdfViewer.PDFToolManager.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.FormEdit);
|
|
|
|
+ pdfViewer.PDFToolManager.SetCreateWidgetType(C_WIDGET_TYPE.WIDGET_COMBOBOX);
|
|
ComboBoxParam comboBoxParam = new ComboBoxParam();
|
|
ComboBoxParam comboBoxParam = new ComboBoxParam();
|
|
comboBoxParam.LineColor = new byte[] { 0, 0, 0 };
|
|
comboBoxParam.LineColor = new byte[] { 0, 0, 0 };
|
|
comboBoxParam.LineWidth = 1;
|
|
comboBoxParam.LineWidth = 1;
|
|
@@ -294,6 +299,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
private void CreateListBox()
|
|
private void CreateListBox()
|
|
{
|
|
{
|
|
pdfViewer.PDFToolManager.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.FormEdit);
|
|
pdfViewer.PDFToolManager.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.FormEdit);
|
|
|
|
+ pdfViewer.PDFToolManager.SetCreateWidgetType(C_WIDGET_TYPE.WIDGET_LISTBOX);
|
|
ListBoxParam listBoxParam = new ListBoxParam();
|
|
ListBoxParam listBoxParam = new ListBoxParam();
|
|
listBoxParam.LineColor = new byte[] { 0, 0, 0 };
|
|
listBoxParam.LineColor = new byte[] { 0, 0, 0 };
|
|
listBoxParam.LineWidth = 1;
|
|
listBoxParam.LineWidth = 1;
|
|
@@ -305,6 +311,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
private void CreatePushBtn()
|
|
private void CreatePushBtn()
|
|
{
|
|
{
|
|
pdfViewer.PDFToolManager.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.FormEdit);
|
|
pdfViewer.PDFToolManager.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.FormEdit);
|
|
|
|
+ pdfViewer.PDFToolManager.SetCreateWidgetType(C_WIDGET_TYPE.WIDGET_PUSHBUTTON);
|
|
PushButtonParam pushButtonParam = new PushButtonParam();
|
|
PushButtonParam pushButtonParam = new PushButtonParam();
|
|
pushButtonParam.Text = "Push Button";
|
|
pushButtonParam.Text = "Push Button";
|
|
pushButtonParam.LineWidth = 1;
|
|
pushButtonParam.LineWidth = 1;
|
|
@@ -319,6 +326,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
private void CreateSign()
|
|
private void CreateSign()
|
|
{
|
|
{
|
|
pdfViewer.PDFToolManager.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.FormEdit);
|
|
pdfViewer.PDFToolManager.SetToolType(ComPDFKit.Tool.CPDFToolManager.ToolType.FormEdit);
|
|
|
|
+ pdfViewer.PDFToolManager.SetCreateWidgetType(C_WIDGET_TYPE.WIDGET_SIGNATUREFIELDS);
|
|
SignatureParam signatureParam = new SignatureParam();
|
|
SignatureParam signatureParam = new SignatureParam();
|
|
signatureParam.LineWidth = 1;
|
|
signatureParam.LineWidth = 1;
|
|
signatureParam.LineColor = new byte[] { 0, 0, 0 };
|
|
signatureParam.LineColor = new byte[] { 0, 0, 0 };
|