namespace pdfbt { /// OCR 设置对话框:引擎选择(百度/智谱GLM) + 对应 Key(存 exe 旁 baidu_ocr.json)。 public partial class OcrSettingsForm : System.Windows.Forms.Form { /// 必需的设计器变量。 private System.ComponentModel.IContainer components = null; /// 清理正在使用的资源。 protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows 窗体设计器生成的代码 private void InitializeComponent() { this.lblEngine = new System.Windows.Forms.Label(); this.cboEngine = new System.Windows.Forms.ComboBox(); this.lblApiKey = new System.Windows.Forms.Label(); this.txtApiKey = new System.Windows.Forms.TextBox(); this.lblSecretKey = new System.Windows.Forms.Label(); this.txtSecretKey = new System.Windows.Forms.TextBox(); this.lblGlmKey = new System.Windows.Forms.Label(); this.txtGlmKey = new System.Windows.Forms.TextBox(); this.lblQianfanKey = new System.Windows.Forms.Label(); this.txtQianfanKey = new System.Windows.Forms.TextBox(); this.lblUapisKey = new System.Windows.Forms.Label(); this.txtUapisKey = new System.Windows.Forms.TextBox(); this.lblUmiUrl = new System.Windows.Forms.Label(); this.txtUmiUrl = new System.Windows.Forms.TextBox(); this.btnUmi下载 = new System.Windows.Forms.Button(); this.btnUmi检测 = new System.Windows.Forms.Button(); this.lblUmi状态 = new System.Windows.Forms.Label(); this.btn帮助 = new System.Windows.Forms.Button(); this.lbl说明 = new System.Windows.Forms.Label(); this.btn确定 = new System.Windows.Forms.Button(); this.btn取消 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // lblEngine // this.lblEngine.AutoSize = true; this.lblEngine.Location = new System.Drawing.Point(12, 18); this.lblEngine.Name = "lblEngine"; this.lblEngine.Size = new System.Drawing.Size(89, 18); this.lblEngine.TabIndex = 0; this.lblEngine.Text = "识别引擎:"; // // cboEngine // this.cboEngine.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cboEngine.Items.AddRange(new object[] { "百度 OCR 高精度(含位置)", "智谱 GLM-OCR(版面解析/手写强)", "百度 PaddleOCR-VL(千帆版面解析)", "UApiPro 通用OCR(免费积分/带位置)", "Umi-OCR 本地引擎(离线免费,需先运行Umi-OCR)"}); this.cboEngine.Location = new System.Drawing.Point(139, 15); this.cboEngine.Name = "cboEngine"; this.cboEngine.Size = new System.Drawing.Size(389, 26); this.cboEngine.TabIndex = 1; this.cboEngine.SelectedIndexChanged += new System.EventHandler(this.cboEngine_SelectedIndexChanged); // // lblApiKey // this.lblApiKey.AutoSize = true; this.lblApiKey.Location = new System.Drawing.Point(12, 55); this.lblApiKey.Name = "lblApiKey"; this.lblApiKey.Size = new System.Drawing.Size(80, 18); this.lblApiKey.TabIndex = 2; this.lblApiKey.Text = "API Key:"; // // txtApiKey // this.txtApiKey.Location = new System.Drawing.Point(139, 52); this.txtApiKey.Name = "txtApiKey"; this.txtApiKey.Size = new System.Drawing.Size(389, 28); this.txtApiKey.TabIndex = 3; this.txtApiKey.Text = "GHcn5qFbKpnScsrdyHWS8w0A"; this.txtApiKey.UseSystemPasswordChar = true; // // lblSecretKey // this.lblSecretKey.AutoSize = true; this.lblSecretKey.Location = new System.Drawing.Point(12, 89); this.lblSecretKey.Name = "lblSecretKey"; this.lblSecretKey.Size = new System.Drawing.Size(107, 18); this.lblSecretKey.TabIndex = 4; this.lblSecretKey.Text = "Secret Key:"; // // txtSecretKey // this.txtSecretKey.Location = new System.Drawing.Point(139, 89); this.txtSecretKey.Name = "txtSecretKey"; this.txtSecretKey.Size = new System.Drawing.Size(389, 28); this.txtSecretKey.TabIndex = 5; this.txtSecretKey.Text = "VC1UU6Eyq7o0pdK4IBgP8fsaZ22Cte1c"; this.txtSecretKey.UseSystemPasswordChar = true; // // lblGlmKey // this.lblGlmKey.AutoSize = true; this.lblGlmKey.Location = new System.Drawing.Point(12, 55); this.lblGlmKey.Name = "lblGlmKey"; this.lblGlmKey.Size = new System.Drawing.Size(125, 18); this.lblGlmKey.TabIndex = 2; this.lblGlmKey.Text = "智谱 API Key:"; // // txtGlmKey // this.txtGlmKey.Location = new System.Drawing.Point(139, 52); this.txtGlmKey.Name = "txtGlmKey"; this.txtGlmKey.Size = new System.Drawing.Size(389, 28); this.txtGlmKey.TabIndex = 3; this.txtGlmKey.UseSystemPasswordChar = true; // // lblQianfanKey // this.lblQianfanKey.AutoSize = true; this.lblQianfanKey.Location = new System.Drawing.Point(12, 55); this.lblQianfanKey.Name = "lblQianfanKey"; this.lblQianfanKey.Size = new System.Drawing.Size(125, 18); this.lblQianfanKey.TabIndex = 2; this.lblQianfanKey.Text = "千帆 API Key:"; // // txtQianfanKey // this.txtQianfanKey.Location = new System.Drawing.Point(139, 52); this.txtQianfanKey.Name = "txtQianfanKey"; this.txtQianfanKey.Size = new System.Drawing.Size(389, 28); this.txtQianfanKey.TabIndex = 3; this.txtQianfanKey.UseSystemPasswordChar = true; // // lblUapisKey // this.lblUapisKey.AutoSize = true; this.lblUapisKey.Location = new System.Drawing.Point(12, 55); this.lblUapisKey.Name = "lblUapisKey"; this.lblUapisKey.Size = new System.Drawing.Size(116, 18); this.lblUapisKey.TabIndex = 2; this.lblUapisKey.Text = "UApiPro Key:"; // // txtUapisKey // this.txtUapisKey.Location = new System.Drawing.Point(139, 52); this.txtUapisKey.Name = "txtUapisKey"; this.txtUapisKey.Size = new System.Drawing.Size(389, 28); this.txtUapisKey.TabIndex = 3; this.txtUapisKey.UseSystemPasswordChar = true; // // lblUmiUrl // this.lblUmiUrl.AutoSize = true; this.lblUmiUrl.Location = new System.Drawing.Point(12, 55); this.lblUmiUrl.Name = "lblUmiUrl"; this.lblUmiUrl.Size = new System.Drawing.Size(89, 18); this.lblUmiUrl.TabIndex = 2; this.lblUmiUrl.Text = "服务地址:"; // // txtUmiUrl // this.txtUmiUrl.Location = new System.Drawing.Point(139, 52); this.txtUmiUrl.Name = "txtUmiUrl"; this.txtUmiUrl.Size = new System.Drawing.Size(389, 28); this.txtUmiUrl.TabIndex = 3; this.txtUmiUrl.Text = "http://127.0.0.1:1224"; // // btnUmi下载 // this.btnUmi下载.Location = new System.Drawing.Point(139, 86); this.btnUmi下载.Name = "btnUmi下载"; this.btnUmi下载.Size = new System.Drawing.Size(139, 28); this.btnUmi下载.TabIndex = 4; this.btnUmi下载.Text = "下载 OCR 本体"; this.btnUmi下载.UseVisualStyleBackColor = true; this.btnUmi下载.Click += new System.EventHandler(this.btnUmi下载_Click); // // btnUmi检测 // this.btnUmi检测.Location = new System.Drawing.Point(304, 86); this.btnUmi检测.Name = "btnUmi检测"; this.btnUmi检测.Size = new System.Drawing.Size(138, 28); this.btnUmi检测.TabIndex = 5; this.btnUmi检测.Text = "检测 OCR 本体"; this.btnUmi检测.UseVisualStyleBackColor = true; this.btnUmi检测.Click += new System.EventHandler(this.btnUmi检测_Click); // // lblUmi状态 // this.lblUmi状态.ForeColor = System.Drawing.SystemColors.GrayText; this.lblUmi状态.Location = new System.Drawing.Point(12, 118); this.lblUmi状态.Name = "lblUmi状态"; this.lblUmi状态.Size = new System.Drawing.Size(506, 20); this.lblUmi状态.TabIndex = 6; // // btn帮助 // this.btn帮助.Location = new System.Drawing.Point(12, 200); this.btn帮助.Name = "btn帮助"; this.btn帮助.Size = new System.Drawing.Size(90, 28); this.btn帮助.TabIndex = 10; this.btn帮助.Text = "帮助"; this.btn帮助.UseVisualStyleBackColor = true; // // lbl说明 // this.lbl说明.ForeColor = System.Drawing.SystemColors.GrayText; this.lbl说明.Location = new System.Drawing.Point(12, 142); this.lbl说明.Name = "lbl说明"; this.lbl说明.Size = new System.Drawing.Size(506, 46); this.lbl说明.TabIndex = 7; this.lbl说明.Text = "百度引擎已内置默认 Key,可直接使用;换自己的 Key 更稳。\r\n智谱 GLM-OCR(手写字/版面强)需到 open.bigmodel.cn 获取 API K" + "ey,约 0.2 元/百万 tokens。\r\nUmi-OCR 为本机离线引擎(免费无限次):本体将从网盘自动下载到程序目录,识别时自动启动、关窗自动关闭。"; // // btn确定 // this.btn确定.DialogResult = System.Windows.Forms.DialogResult.OK; this.btn确定.Location = new System.Drawing.Point(367, 200); this.btn确定.Name = "btn确定"; this.btn确定.Size = new System.Drawing.Size(75, 28); this.btn确定.TabIndex = 8; this.btn确定.Text = "保存"; this.btn确定.UseVisualStyleBackColor = true; this.btn确定.Click += new System.EventHandler(this.btn确定_Click); // // btn取消 // this.btn取消.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btn取消.Location = new System.Drawing.Point(449, 200); this.btn取消.Name = "btn取消"; this.btn取消.Size = new System.Drawing.Size(75, 28); this.btn取消.TabIndex = 9; this.btn取消.Text = "取消"; this.btn取消.UseVisualStyleBackColor = true; // // OcrSettingsForm // this.AcceptButton = this.btn确定; this.CancelButton = this.btn取消; this.ClientSize = new System.Drawing.Size(539, 244); this.Controls.Add(this.lblEngine); this.Controls.Add(this.cboEngine); this.Controls.Add(this.lblApiKey); this.Controls.Add(this.txtApiKey); this.Controls.Add(this.lblSecretKey); this.Controls.Add(this.txtSecretKey); this.Controls.Add(this.lblGlmKey); this.Controls.Add(this.txtGlmKey); this.Controls.Add(this.lblQianfanKey); this.Controls.Add(this.txtQianfanKey); this.Controls.Add(this.lblUapisKey); this.Controls.Add(this.txtUapisKey); this.Controls.Add(this.lblUmiUrl); this.Controls.Add(this.txtUmiUrl); this.Controls.Add(this.btnUmi下载); this.Controls.Add(this.btnUmi检测); this.Controls.Add(this.lblUmi状态); this.Controls.Add(this.lbl说明); this.Controls.Add(this.btn帮助); this.Controls.Add(this.btn确定); this.Controls.Add(this.btn取消); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "OcrSettingsForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "OCR 设置"; this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Label lblEngine; private System.Windows.Forms.ComboBox cboEngine; private System.Windows.Forms.Label lblApiKey; private System.Windows.Forms.TextBox txtApiKey; private System.Windows.Forms.Label lblSecretKey; private System.Windows.Forms.TextBox txtSecretKey; private System.Windows.Forms.Label lblGlmKey; private System.Windows.Forms.TextBox txtGlmKey; private System.Windows.Forms.Label lblQianfanKey; private System.Windows.Forms.TextBox txtQianfanKey; private System.Windows.Forms.Label lblUapisKey; private System.Windows.Forms.TextBox txtUapisKey; private System.Windows.Forms.Label lblUmiUrl; private System.Windows.Forms.TextBox txtUmiUrl; private System.Windows.Forms.Button btnUmi下载; private System.Windows.Forms.Button btnUmi检测; private System.Windows.Forms.Label lblUmi状态; private System.Windows.Forms.Button btn帮助; private System.Windows.Forms.Label lbl说明; private System.Windows.Forms.Button btn确定; private System.Windows.Forms.Button btn取消; } }