Aggiunto URL link con copy x simulare auth

This commit is contained in:
Samuele E. Locatelli
2019-04-17 22:49:29 +02:00
parent 61d646e867
commit bfa62b78ca
2 changed files with 46 additions and 36 deletions
+37 -36
View File
@@ -33,13 +33,14 @@
this.toolStripProgressBar1 = new System.Windows.Forms.ToolStripProgressBar();
this.lblClock = new System.Windows.Forms.ToolStripStatusLabel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnFakeQR = new System.Windows.Forms.Button();
this.lblUrl = new System.Windows.Forms.Label();
this.txtUploadFile = new System.Windows.Forms.TextBox();
this.btnUploadFile = new System.Windows.Forms.Button();
this.lblUserCode = new System.Windows.Forms.Label();
this.txtConfFile = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.chkGetImg = new System.Windows.Forms.CheckBox();
this.btnTryEnroll = new System.Windows.Forms.Button();
this.btnDeleteUserCloud = new System.Windows.Forms.Button();
this.btnDeleteUserHMI = new System.Windows.Forms.Button();
@@ -66,7 +67,6 @@
this.pictBox = new System.Windows.Forms.PictureBox();
this.label6 = new System.Windows.Forms.Label();
this.lblConsole = new System.Windows.Forms.Label();
this.chkGetImg = new System.Windows.Forms.CheckBox();
this.statusStrip1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
@@ -83,7 +83,7 @@
this.lblClock});
this.statusStrip1.Location = new System.Drawing.Point(0, 736);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(1088, 25);
this.statusStrip1.Size = new System.Drawing.Size(1215, 25);
this.statusStrip1.TabIndex = 7;
this.statusStrip1.Text = "statusStrip1";
//
@@ -110,7 +110,7 @@
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.AutoSize = true;
this.groupBox1.Controls.Add(this.btnFakeQR);
this.groupBox1.Controls.Add(this.lblUrl);
this.groupBox1.Controls.Add(this.txtUploadFile);
this.groupBox1.Controls.Add(this.btnUploadFile);
this.groupBox1.Controls.Add(this.lblUserCode);
@@ -118,20 +118,21 @@
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Location = new System.Drawing.Point(13, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(1063, 78);
this.groupBox1.Size = new System.Drawing.Size(1190, 91);
this.groupBox1.TabIndex = 11;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Connection Parameters";
//
// btnFakeQR
// lblUrl
//
this.btnFakeQR.Location = new System.Drawing.Point(932, 23);
this.btnFakeQR.Name = "btnFakeQR";
this.btnFakeQR.Size = new System.Drawing.Size(111, 32);
this.btnFakeQR.TabIndex = 33;
this.btnFakeQR.Text = "fake QR";
this.btnFakeQR.UseVisualStyleBackColor = true;
this.btnFakeQR.Click += new System.EventHandler(this.btnFakeQR_Click);
this.lblUrl.AutoSize = true;
this.lblUrl.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.lblUrl.Location = new System.Drawing.Point(675, 56);
this.lblUrl.Name = "lblUrl";
this.lblUrl.Size = new System.Drawing.Size(36, 17);
this.lblUrl.TabIndex = 34;
this.lblUrl.Text = "URL";
this.lblUrl.Click += new System.EventHandler(this.lblUrl_Click);
//
// txtUploadFile
//
@@ -155,7 +156,7 @@
this.lblUserCode.AutoSize = true;
this.lblUserCode.BackColor = System.Drawing.SystemColors.Info;
this.lblUserCode.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblUserCode.Location = new System.Drawing.Point(718, 34);
this.lblUserCode.Location = new System.Drawing.Point(675, 21);
this.lblUserCode.Name = "lblUserCode";
this.lblUserCode.Size = new System.Drawing.Size(87, 18);
this.lblUserCode.TabIndex = 28;
@@ -202,11 +203,21 @@
this.groupBox2.Controls.Add(this.btnResetParam);
this.groupBox2.Location = new System.Drawing.Point(13, 88);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(1063, 100);
this.groupBox2.Size = new System.Drawing.Size(1190, 100);
this.groupBox2.TabIndex = 14;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Metodi";
//
// chkGetImg
//
this.chkGetImg.AutoSize = true;
this.chkGetImg.Location = new System.Drawing.Point(645, 29);
this.chkGetImg.Name = "chkGetImg";
this.chkGetImg.Size = new System.Drawing.Size(52, 21);
this.chkGetImg.TabIndex = 31;
this.chkGetImg.Text = "img";
this.chkGetImg.UseVisualStyleBackColor = true;
//
// btnTryEnroll
//
this.btnTryEnroll.Location = new System.Drawing.Point(256, 59);
@@ -393,7 +404,7 @@
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.90909F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 89.09091F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1064, 542);
this.tableLayoutPanel1.Size = new System.Drawing.Size(1191, 542);
this.tableLayoutPanel1.TabIndex = 15;
//
// label1
@@ -408,7 +419,7 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(215, 0);
this.label2.Location = new System.Drawing.Point(241, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(85, 17);
this.label2.TabIndex = 1;
@@ -417,7 +428,7 @@
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(427, 0);
this.label5.Location = new System.Drawing.Point(479, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(64, 17);
this.label5.TabIndex = 2;
@@ -435,7 +446,7 @@
// lblRetData
//
this.lblRetData.AutoSize = true;
this.lblRetData.Location = new System.Drawing.Point(215, 59);
this.lblRetData.Location = new System.Drawing.Point(241, 59);
this.lblRetData.Name = "lblRetData";
this.lblRetData.Size = new System.Drawing.Size(20, 17);
this.lblRetData.TabIndex = 4;
@@ -444,16 +455,16 @@
// pictBox
//
this.pictBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictBox.Location = new System.Drawing.Point(427, 62);
this.pictBox.Location = new System.Drawing.Point(479, 62);
this.pictBox.Name = "pictBox";
this.pictBox.Size = new System.Drawing.Size(313, 477);
this.pictBox.Size = new System.Drawing.Size(351, 477);
this.pictBox.TabIndex = 5;
this.pictBox.TabStop = false;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(746, 0);
this.label6.Location = new System.Drawing.Point(836, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(38, 17);
this.label6.TabIndex = 6;
@@ -465,27 +476,17 @@
this.lblConsole.BackColor = System.Drawing.SystemColors.Desktop;
this.lblConsole.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblConsole.ForeColor = System.Drawing.Color.Lime;
this.lblConsole.Location = new System.Drawing.Point(746, 59);
this.lblConsole.Location = new System.Drawing.Point(836, 59);
this.lblConsole.Name = "lblConsole";
this.lblConsole.Size = new System.Drawing.Size(315, 483);
this.lblConsole.Size = new System.Drawing.Size(352, 483);
this.lblConsole.TabIndex = 7;
this.lblConsole.Text = "...";
//
// chkGetImg
//
this.chkGetImg.AutoSize = true;
this.chkGetImg.Location = new System.Drawing.Point(645, 29);
this.chkGetImg.Name = "chkGetImg";
this.chkGetImg.Size = new System.Drawing.Size(52, 21);
this.chkGetImg.TabIndex = 31;
this.chkGetImg.Text = "img";
this.chkGetImg.UseVisualStyleBackColor = true;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1088, 761);
this.ClientSize = new System.Drawing.Size(1215, 761);
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
@@ -544,8 +545,8 @@
private System.Windows.Forms.Button btnTryEnroll;
private System.Windows.Forms.Button btnUploadFile;
private System.Windows.Forms.TextBox txtUploadFile;
private System.Windows.Forms.Button btnFakeQR;
private System.Windows.Forms.CheckBox chkGetImg;
private System.Windows.Forms.Label lblUrl;
}
}
+9
View File
@@ -222,6 +222,9 @@ namespace TestClient
QRCode qrCode = new QRCode(qrCodeData);
Bitmap qrCodeImage = qrCode.GetGraphic(5);
pictBox.Image = qrCodeImage;
// aggiungo link!
lblUrl.Text = authData.QrCode;
}
}
}
@@ -869,5 +872,11 @@ namespace TestClient
pictBox.Image = qrCodeImage;
}
private void lblUrl_Click(object sender, EventArgs e)
{
Clipboard.SetText(lblUrl.Text);
MessageBox.Show("COPIED current AUTH URL to Clipboard!\r\n" + lblUrl.Text, "AUTH URL ACQUIRED", MessageBoxButtons.OK);
}
}
}