Commit 918db417 LN

1

1 个父辈 9b0cfda5
......@@ -53,9 +53,9 @@
this.chbUseParam = new System.Windows.Forms.CheckBox();
this.txtParamPath = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.btnLight = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.chbZxing = new System.Windows.Forms.CheckBox();
this.btnCopyN = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
......@@ -140,7 +140,7 @@
// btnbarCode
//
this.btnbarCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnbarCode.Location = new System.Drawing.Point(896, 50);
this.btnbarCode.Location = new System.Drawing.Point(905, 50);
this.btnbarCode.Name = "btnbarCode";
this.btnbarCode.Size = new System.Drawing.Size(167, 33);
this.btnbarCode.TabIndex = 9;
......@@ -152,7 +152,7 @@
//
this.btnLearn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLearn.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLearn.Location = new System.Drawing.Point(1066, 12);
this.btnLearn.Location = new System.Drawing.Point(1074, 12);
this.btnLearn.Name = "btnLearn";
this.btnLearn.Size = new System.Drawing.Size(109, 33);
this.btnLearn.TabIndex = 10;
......@@ -163,7 +163,7 @@
// btnDCode
//
this.btnDCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDCode.Location = new System.Drawing.Point(896, 12);
this.btnDCode.Location = new System.Drawing.Point(905, 12);
this.btnDCode.Name = "btnDCode";
this.btnDCode.Size = new System.Drawing.Size(167, 33);
this.btnDCode.TabIndex = 11;
......@@ -174,7 +174,7 @@
// btnClearLog
//
this.btnClearLog.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClearLog.Location = new System.Drawing.Point(691, 50);
this.btnClearLog.Location = new System.Drawing.Point(785, 50);
this.btnClearLog.Name = "btnClearLog";
this.btnClearLog.Size = new System.Drawing.Size(116, 33);
this.btnClearLog.TabIndex = 12;
......@@ -239,7 +239,7 @@
//
this.btnExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnExit.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExit.Location = new System.Drawing.Point(1066, 50);
this.btnExit.Location = new System.Drawing.Point(1074, 50);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(109, 33);
this.btnExit.TabIndex = 18;
......@@ -344,18 +344,6 @@
this.label4.Text = "参数路径";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// btnLight
//
this.btnLight.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLight.Location = new System.Drawing.Point(768, 517);
this.btnLight.Name = "btnLight";
this.btnLight.Size = new System.Drawing.Size(59, 33);
this.btnLight.TabIndex = 24;
this.btnLight.Text = "提亮";
this.btnLight.UseVisualStyleBackColor = true;
this.btnLight.Visible = false;
this.btnLight.Click += new System.EventHandler(this.btnLigth_Click);
//
// button1
//
this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
......@@ -379,18 +367,29 @@
this.chbZxing.Text = "ZXing";
this.chbZxing.UseVisualStyleBackColor = true;
//
// btnCopyN
//
this.btnCopyN.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCopyN.Location = new System.Drawing.Point(666, 50);
this.btnCopyN.Name = "btnCopyN";
this.btnCopyN.Size = new System.Drawing.Size(116, 33);
this.btnCopyN.TabIndex = 31;
this.btnCopyN.Text = "复制名称";
this.btnCopyN.UseVisualStyleBackColor = true;
this.btnCopyN.Click += new System.EventHandler(this.btnCopyN_Click);
//
// FrmCodeDecode
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1192, 729);
this.Controls.Add(this.btnCopyN);
this.Controls.Add(this.chbZxing);
this.Controls.Add(this.button1);
this.Controls.Add(this.txtParamPath);
this.Controls.Add(this.label4);
this.Controls.Add(this.chbUseParam);
this.Controls.Add(this.btnAn);
this.Controls.Add(this.btnLight);
this.Controls.Add(this.cmbCodeType);
this.Controls.Add(this.cmbCamera);
this.Controls.Add(this.label2);
......@@ -449,9 +448,9 @@
private System.Windows.Forms.CheckBox chbUseParam;
private System.Windows.Forms.TextBox txtParamPath;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button btnLight;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.CheckBox chbZxing;
private System.Windows.Forms.Button btnCopyN;
}
}
......@@ -220,11 +220,11 @@ namespace CodeLibrary
codeList = HDCodeHelper.DecodeCode(ho_image, count, codeParamPath, cmbCodeType.Text);
}
if (codeList.Count <= 0)
{
zxingDecode(map, cmbCodeType.Text);
}
else
//if (codeList.Count <= 0)
//{
// zxingDecode(map, cmbCodeType.Text);
//}
//else
{
ShowCode(codeList);
txtResult.Text += "\r\n elapsed time:" + stopwatch.Elapsed.ToString();
......@@ -387,5 +387,11 @@ namespace CodeLibrary
HDLogUtil.error(ex.ToString());
}
}
private void btnCopyN_Click(object sender, EventArgs e)
{
string text = cmbCamera.Text;
Clipboard.SetDataObject(text);
}
}
}
......@@ -3,6 +3,7 @@ FrmCodeDecode_label4_Text,参数路径,Parameters of the path
FrmCodeDecode_chbUseParam_Text,使用参数,operation parameter
FrmCodeDecode_btnAn_Text,变暗,darken
FrmCodeDecode_btnLight_Text,提亮,brighten
FrmCodeDecode_btnCopyN_Text,复制名称,Copy Name
FrmCodeDecode_label3_Text,条码类型:,Bar code type:
FrmCodeDecode_label2_Text,相机列表:,Camera list:
FrmCodeDecode_btnExit_Text,退出,Exit
......
......@@ -23,10 +23,11 @@ namespace CodeTest
{
Directory.CreateDirectory(targetFilePath);
}
for (int i = 100000; i <= 100000 + count; i++)
for (int i = 1; i <= count; i++)
{
string name = "pn;A" + i.ToString().PadLeft(6, '0') + ";1000";
Bitmap map = ZXingCode(name, 400, BarcodeFormat.CODE_128);
string name = i.ToString().PadLeft(8,'0');
//string name = "Line;A" + i.ToString().PadLeft(6, '0') + ";1000";
Bitmap map = ZXingCode(name, 400, BarcodeFormat.QR_CODE);
// Bitmap map = DataMatrix(name, 200);
if (map != null)
{
......
......@@ -18,8 +18,8 @@ namespace CodeTest
[STAThread]
static void Main()
{
// CodeCreater.CreateCode(10);
// return;
//CodeCreater.CreateCode(20);
//return;
Application.EnableVisualStyles();
......@@ -30,7 +30,7 @@ namespace CodeTest
//Application.Run(new FrmTest());
//string filename = @"C:/Users/WORK/Desktop/西安二维码/IMG_20190730_165612.jpg";
//Bitmap img = (Bitmap)Image.FromFile(filename).Clone();
//string text= CodeCreater.DecodeQRCode(img);
//string text = CodeCreater.DecodeQRCode(img);
//Console.WriteLine(text);
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!