Commit add1d346 by 施晓雨

1

parent 1d0a407a
......@@ -32,8 +32,12 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Kivii.Pdf.V4.0, Version=5.5.2020.6250, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Kivii.Pdf.5.5.2020.6250\lib\net40\Kivii.Pdf.V4.0.dll</HintPath>
<Reference Include="Kivii.Common.V4.0, Version=5.5.2020.6060, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Kivii.Common.5.5.2020.6060\lib\net40\Kivii.Common.V4.0.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Kivii.Pdf.V4.0, Version=5.5.2020.6260, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Kivii.Pdf.5.5.2020.6260\lib\net40\Kivii.Pdf.V4.0.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
......@@ -56,6 +60,7 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StamperRequest.cs" />
<EmbeddedResource Include="frmMain.resx">
<DependentUpon>frmMain.cs</DependentUpon>
</EmbeddedResource>
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Kivii.Pdf.Test
{
[Route("/Pdf/Stamper")]
public class StamperRequest:IReturn<object>
{
public List<StampSetting> Settings { get; set; }
}
}
......@@ -38,6 +38,7 @@
this.btnSelectSaveFolder = new System.Windows.Forms.Button();
this.label23 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label28 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.label22 = new System.Windows.Forms.Label();
......@@ -85,7 +86,9 @@
this.label26 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.label25 = new System.Windows.Forms.Label();
this.label28 = new System.Windows.Forms.Label();
this.label29 = new System.Windows.Forms.Label();
this.tbxServiceUrl = new System.Windows.Forms.TextBox();
this.btnStampByService = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
......@@ -129,21 +132,24 @@
//
// groupBox2
//
this.groupBox2.Controls.Add(this.btnStampByService);
this.groupBox2.Controls.Add(this.tbxServiceUrl);
this.groupBox2.Controls.Add(this.btnStamp);
this.groupBox2.Controls.Add(this.tbxSaveFolder);
this.groupBox2.Controls.Add(this.label29);
this.groupBox2.Controls.Add(this.btnSelectSaveFolder);
this.groupBox2.Controls.Add(this.label23);
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox2.Location = new System.Drawing.Point(0, 548);
this.groupBox2.Location = new System.Drawing.Point(0, 494);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(441, 109);
this.groupBox2.Size = new System.Drawing.Size(441, 163);
this.groupBox2.TabIndex = 13;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "操作";
//
// btnStamp
//
this.btnStamp.Location = new System.Drawing.Point(14, 65);
this.btnStamp.Location = new System.Drawing.Point(13, 56);
this.btnStamp.Name = "btnStamp";
this.btnStamp.Size = new System.Drawing.Size(75, 23);
this.btnStamp.TabIndex = 6;
......@@ -220,11 +226,20 @@
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(441, 548);
this.groupBox1.Size = new System.Drawing.Size(441, 494);
this.groupBox1.TabIndex = 12;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "单功能操作参数";
//
// label28
//
this.label28.Location = new System.Drawing.Point(12, 436);
this.label28.Name = "label28";
this.label28.Size = new System.Drawing.Size(413, 71);
this.label28.TabIndex = 8;
this.label28.Text = "W=0-20cm(图片宽度范围),H=0-200px(高度范围,支持cm,mm,默认pix),X=0-200(在页面中的X轴范围),Y=0-200(Y轴范围),I" +
"=0-10(图片索引范围),R=5(匹配次数,默认为1),S=3(跳过匹配的次数,默认为0),T=*包含*;*尾匹配;首匹配*;全匹配(文本匹配)";
//
// label20
//
this.label20.AutoSize = true;
......@@ -646,14 +661,31 @@
this.label25.TabIndex = 1;
this.label25.Text = "PDF路径";
//
// label28
// label29
//
this.label28.Location = new System.Drawing.Point(12, 436);
this.label28.Name = "label28";
this.label28.Size = new System.Drawing.Size(413, 109);
this.label28.TabIndex = 8;
this.label28.Text = "W=0-20cm(图片宽度范围),H=0-200px(高度范围,支持cm,mm,默认pix),X=0-200(在页面中的X轴范围),Y=0-200(Y轴范围),I" +
"=0-10(图片索引范围),R=5(匹配次数,默认为1),S=3(跳过匹配的次数,默认为0),T=*包含*;*尾匹配;首匹配*;全匹配(文本匹配)";
this.label29.AutoSize = true;
this.label29.Location = new System.Drawing.Point(13, 95);
this.label29.Name = "label29";
this.label29.Size = new System.Drawing.Size(53, 12);
this.label29.TabIndex = 1;
this.label29.Text = "服务路径";
//
// tbxServiceUrl
//
this.tbxServiceUrl.Location = new System.Drawing.Point(78, 92);
this.tbxServiceUrl.Name = "tbxServiceUrl";
this.tbxServiceUrl.Size = new System.Drawing.Size(308, 21);
this.tbxServiceUrl.TabIndex = 4;
//
// btnStampByService
//
this.btnStampByService.Location = new System.Drawing.Point(14, 128);
this.btnStampByService.Name = "btnStampByService";
this.btnStampByService.Size = new System.Drawing.Size(75, 23);
this.btnStampByService.TabIndex = 6;
this.btnStampByService.Text = "执行";
this.btnStampByService.UseVisualStyleBackColor = true;
this.btnStampByService.Click += new System.EventHandler(this.btnStampByService_Click);
//
// frmMain
//
......@@ -739,6 +771,9 @@
private System.Windows.Forms.Label label24;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.Label label28;
private System.Windows.Forms.Button btnStampByService;
private System.Windows.Forms.TextBox tbxServiceUrl;
private System.Windows.Forms.Label label29;
}
}
......@@ -185,6 +185,17 @@ namespace Kivii.Pdf.Test
//var stamper=new PdfStamper(reader,)
}
private void btnStampByService_Click(object sender, EventArgs e)
{
var setting = getSetting();
var client = new JsonServiceClient(tbxServiceUrl.Text);
var request = new StamperRequest();
request.Settings = new List<StampSetting>();
request.Settings.Add(setting);
var files = new List<UploadFile>();
files.Add(new UploadFile("A", new FileStream(tbxStampFilePath.Text,FileMode.Open), "StampFilePath"));
var rtns=client.PostFilesWithRequest<object>("/Pdf/Stamper",request, files);
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Kivii.Pdf" version="5.5.2020.6250" targetFramework="net40" />
<package id="Kivii.Common" version="5.5.2020.6060" targetFramework="net40" />
<package id="Kivii.Pdf" version="5.5.2020.6260" targetFramework="net40" />
</packages>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment