Commit 8e952a00 by leo

1

parent 6680007f
......@@ -38,13 +38,18 @@
this.btnPrint = new System.Windows.Forms.Button();
this.cbxPrinter = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.btnRun = new System.Windows.Forms.Button();
this.rtbArguments = new System.Windows.Forms.RichTextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// btnExportImage
//
this.btnExportImage.Location = new System.Drawing.Point(12, 143);
this.btnExportImage.Location = new System.Drawing.Point(424, 110);
this.btnExportImage.Name = "btnExportImage";
this.btnExportImage.Size = new System.Drawing.Size(84, 23);
this.btnExportImage.Size = new System.Drawing.Size(114, 23);
this.btnExportImage.TabIndex = 0;
this.btnExportImage.Text = "导出图片";
this.btnExportImage.UseVisualStyleBackColor = true;
......@@ -129,14 +134,55 @@
this.label3.TabIndex = 4;
this.label3.Text = "选择打印机";
//
// btnRun
//
this.btnRun.Location = new System.Drawing.Point(465, 179);
this.btnRun.Name = "btnRun";
this.btnRun.Size = new System.Drawing.Size(75, 63);
this.btnRun.TabIndex = 9;
this.btnRun.Text = "执行(RUN)";
this.btnRun.UseVisualStyleBackColor = true;
this.btnRun.Click += new System.EventHandler(this.btnRun_Click);
//
// rtbArguments
//
this.rtbArguments.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.rtbArguments.Dock = System.Windows.Forms.DockStyle.Fill;
this.rtbArguments.Location = new System.Drawing.Point(3, 17);
this.rtbArguments.Name = "rtbArguments";
this.rtbArguments.Size = new System.Drawing.Size(420, 300);
this.rtbArguments.TabIndex = 10;
this.rtbArguments.Text = "-dQUIET\n-dPARANOIDSAFER\n-dBATCH\n-dNOPAUSE\n-dNOPROMPT\n-sDEVICE=";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.rtbArguments);
this.groupBox1.Location = new System.Drawing.Point(14, 162);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(426, 320);
this.groupBox1.TabIndex = 11;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "通过参数执行GhostScript";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(17, 139);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(340, 21);
this.textBox1.TabIndex = 5;
this.textBox1.Text = "https://www.ghostscript.com/documentation.html";
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(553, 300);
this.ClientSize = new System.Drawing.Size(548, 494);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btnRun);
this.Controls.Add(this.cbxPrinter);
this.Controls.Add(this.btnPrint);
this.Controls.Add(this.btnSelectSaveFolder);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.tbxSaveFolder);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
......@@ -147,6 +193,7 @@
this.Name = "Form1";
this.Text = "PDF文件扩展功能";
this.Load += new System.EventHandler(this.Form1_Load);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
......@@ -164,6 +211,10 @@
private System.Windows.Forms.Button btnPrint;
private System.Windows.Forms.ComboBox cbxPrinter;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button btnRun;
private System.Windows.Forms.RichTextBox rtbArguments;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox textBox1;
}
}
......@@ -50,5 +50,10 @@ namespace Test
//Kivii.GhostScript.Tools.ToPrinter(@"C:\Test\1.pdf", cbxPrinter.SelectedItem.ToString());
Kivii.GhostScript.Tools.ToPrinter(tbxFileSource.Text, cbxPrinter.SelectedItem.ToString());
}
private void btnRun_Click(object sender, EventArgs e)
{
Kivii.GhostScript.Tools.Run(rtbArguments.Lines);
}
}
}
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