angefangen qr code Adresse
This commit is contained in:
Generated
+32
-3
@@ -37,8 +37,11 @@
|
||||
pb_QRC = new PictureBox();
|
||||
button1 = new Button();
|
||||
pb_icon = new PictureBox();
|
||||
bt_clear_Icon = new Button();
|
||||
bt_createQRAdress = new Button();
|
||||
tabControl1.SuspendLayout();
|
||||
tabPage1.SuspendLayout();
|
||||
tabPage2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pb_QRC).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)pb_icon).BeginInit();
|
||||
SuspendLayout();
|
||||
@@ -95,10 +98,11 @@
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
tabPage2.Controls.Add(bt_createQRAdress);
|
||||
tabPage2.Location = new Point(4, 24);
|
||||
tabPage2.Name = "tabPage2";
|
||||
tabPage2.Padding = new Padding(3);
|
||||
tabPage2.Size = new Size(412, 294);
|
||||
tabPage2.Size = new Size(412, 172);
|
||||
tabPage2.TabIndex = 1;
|
||||
tabPage2.Text = "tabPage2";
|
||||
tabPage2.UseVisualStyleBackColor = true;
|
||||
@@ -116,7 +120,7 @@
|
||||
//
|
||||
button1.Location = new Point(434, 36);
|
||||
button1.Name = "button1";
|
||||
button1.Size = new Size(75, 23);
|
||||
button1.Size = new Size(96, 23);
|
||||
button1.TabIndex = 2;
|
||||
button1.Text = "Icon?";
|
||||
button1.UseVisualStyleBackColor = true;
|
||||
@@ -124,18 +128,40 @@
|
||||
//
|
||||
// pb_icon
|
||||
//
|
||||
pb_icon.Location = new Point(625, 40);
|
||||
pb_icon.BorderStyle = BorderStyle.FixedSingle;
|
||||
pb_icon.Location = new Point(536, 36);
|
||||
pb_icon.Name = "pb_icon";
|
||||
pb_icon.Size = new Size(184, 168);
|
||||
pb_icon.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
pb_icon.TabIndex = 3;
|
||||
pb_icon.TabStop = false;
|
||||
//
|
||||
// bt_clear_Icon
|
||||
//
|
||||
bt_clear_Icon.Location = new Point(433, 65);
|
||||
bt_clear_Icon.Name = "bt_clear_Icon";
|
||||
bt_clear_Icon.Size = new Size(97, 23);
|
||||
bt_clear_Icon.TabIndex = 4;
|
||||
bt_clear_Icon.Text = "Icon löschen";
|
||||
bt_clear_Icon.UseVisualStyleBackColor = true;
|
||||
bt_clear_Icon.Click += bt_clear_Icon_Click;
|
||||
//
|
||||
// bt_createQRAdress
|
||||
//
|
||||
bt_createQRAdress.Location = new Point(6, 143);
|
||||
bt_createQRAdress.Name = "bt_createQRAdress";
|
||||
bt_createQRAdress.Size = new Size(164, 23);
|
||||
bt_createQRAdress.TabIndex = 0;
|
||||
bt_createQRAdress.Text = "generiere QR";
|
||||
bt_createQRAdress.UseVisualStyleBackColor = true;
|
||||
bt_createQRAdress.Click += bt_createQRAdress_Click;
|
||||
//
|
||||
// Main
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(929, 633);
|
||||
Controls.Add(bt_clear_Icon);
|
||||
Controls.Add(pb_icon);
|
||||
Controls.Add(button1);
|
||||
Controls.Add(pb_QRC);
|
||||
@@ -145,6 +171,7 @@
|
||||
tabControl1.ResumeLayout(false);
|
||||
tabPage1.ResumeLayout(false);
|
||||
tabPage1.PerformLayout();
|
||||
tabPage2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)pb_QRC).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)pb_icon).EndInit();
|
||||
ResumeLayout(false);
|
||||
@@ -161,5 +188,7 @@
|
||||
private PictureBox pb_QRC;
|
||||
private Button button1;
|
||||
private PictureBox pb_icon;
|
||||
private Button bt_clear_Icon;
|
||||
private Button bt_createQRAdress;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ namespace QR_Code_Generator
|
||||
|
||||
void generateQR(QRCodeData qrCodeData)
|
||||
{
|
||||
Bitmap icon = null;
|
||||
Bitmap? icon = null;
|
||||
if (pb_icon.Image != null)
|
||||
{
|
||||
icon = (Bitmap)pb_icon.Image;
|
||||
icon = (Bitmap)pb_icon.Image;
|
||||
}
|
||||
using (QRCode qrCode = new QRCode(qrCodeData))
|
||||
{
|
||||
@@ -41,7 +41,7 @@ namespace QR_Code_Generator
|
||||
{
|
||||
pb_icon.Image = SelectImage();
|
||||
}
|
||||
private Image SelectImage()
|
||||
private Image? SelectImage()
|
||||
{
|
||||
using (OpenFileDialog openFileDialog = new OpenFileDialog())
|
||||
{
|
||||
@@ -62,5 +62,18 @@ namespace QR_Code_Generator
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void bt_clear_Icon_Click(object sender, EventArgs e)
|
||||
{
|
||||
pb_icon.Image = null;
|
||||
}
|
||||
|
||||
private void bt_createQRAdress_Click(object sender, EventArgs e)
|
||||
{
|
||||
string name = string.Empty;
|
||||
string nachname = string.Empty;
|
||||
string strasse = string.Empty;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user