diff -r 1bbff175f8dd58bee66dbf493e80fdcf8dbf2bf1 -r a629cd533b240945a67fb7a8bbea175ec91fa381 QRWin/Form1.Designer.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QRWin/Form1.Designer.cs Sat Jan 26 16:40:55 2013 -0600 @@ -0,0 +1,130 @@ +namespace QRWin +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.txtName = new System.Windows.Forms.TextBox(); + this.txtKey = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.btnGenerate = new System.Windows.Forms.Button(); + this.btnMakeQR = new System.Windows.Forms.Button(); + this.qrCon1 = new Gma.QrCodeNet.Encoding.Windows.Controls.QrCodeControl(); + this.SuspendLayout(); + // + // txtName + // + this.txtName.Location = new System.Drawing.Point(110, 9); + this.txtName.Name = "txtName"; + this.txtName.Size = new System.Drawing.Size(310, 20); + this.txtName.TabIndex = 0; + // + // txtKey + // + this.txtKey.Location = new System.Drawing.Point(110, 35); + this.txtKey.Name = "txtKey"; + this.txtKey.Size = new System.Drawing.Size(310, 20); + this.txtKey.TabIndex = 1; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(66, 13); + this.label1.TabIndex = 2; + this.label1.Text = "Name/Label"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(19, 35); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(59, 13); + this.label2.TabIndex = 3; + this.label2.Text = "Secret Key"; + // + // btnGenerate + // + this.btnGenerate.Location = new System.Drawing.Point(426, 35); + this.btnGenerate.Name = "btnGenerate"; + this.btnGenerate.Size = new System.Drawing.Size(75, 23); + this.btnGenerate.TabIndex = 4; + this.btnGenerate.Text = "Generate"; + this.btnGenerate.UseVisualStyleBackColor = true; + this.btnGenerate.Click += new System.EventHandler(this.btnGenerate_Click); + // + // btnMakeQR + // + this.btnMakeQR.Location = new System.Drawing.Point(22, 67); + this.btnMakeQR.Name = "btnMakeQR"; + this.btnMakeQR.Size = new System.Drawing.Size(479, 35); + this.btnMakeQR.TabIndex = 6; + this.btnMakeQR.Text = "Make QR Code"; + this.btnMakeQR.UseVisualStyleBackColor = true; + this.btnMakeQR.Click += new System.EventHandler(this.btnMakeQR_Click); + // + // qrCon1 + // + this.qrCon1.AutoSize = true; + this.qrCon1.Location = new System.Drawing.Point(22, 108); + this.qrCon1.Name = "qrCon1"; + this.qrCon1.Size = new System.Drawing.Size(204, 204); + this.qrCon1.TabIndex = 7; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(606, 539); + this.Controls.Add(this.qrCon1); + this.Controls.Add(this.btnMakeQR); + this.Controls.Add(this.btnGenerate); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.txtKey); + this.Controls.Add(this.txtName); + this.Name = "Form1"; + this.Text = "QRWin"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox txtName; + private System.Windows.Forms.TextBox txtKey; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button btnGenerate; + private System.Windows.Forms.Button btnMakeQR; + private Gma.QrCodeNet.Encoding.Windows.Controls.QrCodeControl qrCon1; + } +} + diff -r 1bbff175f8dd58bee66dbf493e80fdcf8dbf2bf1 -r a629cd533b240945a67fb7a8bbea175ec91fa381 QRWin/Form1.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QRWin/Form1.cs Sat Jan 26 16:40:55 2013 -0600 @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using Gma.QrCodeNet.Encoding; +using Gma.QrCodeNet.Encoding.Windows.Controls; + +namespace QRWin +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + private void btnGenerate_Click(object sender, EventArgs e) + { + string b32digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; + int b32diglng = b32digits.Length; + StringBuilder b = new StringBuilder(); + Random rand = new Random(); + for (int i = 0; i < 32; i++) + { + b.Append(b32digits[rand.Next(0, b32diglng - 1)]); + } + txtKey.Text = b.ToString(); + } + + private void btnMakeQR_Click(object sender, EventArgs e) + { + qrCon1.Text = String.Format("otpauth://totp/{0}?secret={1}", txtName.Text, txtKey.Text); + } + } +} diff -r 1bbff175f8dd58bee66dbf493e80fdcf8dbf2bf1 -r a629cd533b240945a67fb7a8bbea175ec91fa381 QRWin/Form1.resx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QRWin/Form1.resx Sat Jan 26 16:40:55 2013 -0600 @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff -r 1bbff175f8dd58bee66dbf493e80fdcf8dbf2bf1 -r a629cd533b240945a67fb7a8bbea175ec91fa381 QRWin/Gma.QrCodeNet.Encoding.dll Binary file QRWin/Gma.QrCodeNet.Encoding.dll has changed diff -r 1bbff175f8dd58bee66dbf493e80fdcf8dbf2bf1 -r a629cd533b240945a67fb7a8bbea175ec91fa381 QRWin/Program.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QRWin/Program.cs Sat Jan 26 16:40:55 2013 -0600 @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace QRWin +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff -r 1bbff175f8dd58bee66dbf493e80fdcf8dbf2bf1 -r a629cd533b240945a67fb7a8bbea175ec91fa381 QRWin/Properties/AssemblyInfo.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QRWin/Properties/AssemblyInfo.cs Sat Jan 26 16:40:55 2013 -0600 @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("QRWin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("QRWin")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("022ed19b-6a1b-406b-a60b-e4e491a3dd75")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff -r 1bbff175f8dd58bee66dbf493e80fdcf8dbf2bf1 -r a629cd533b240945a67fb7a8bbea175ec91fa381 QRWin/Properties/Resources.Designer.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QRWin/Properties/Resources.Designer.cs Sat Jan 26 16:40:55 2013 -0600 @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace QRWin.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("QRWin.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff -r 1bbff175f8dd58bee66dbf493e80fdcf8dbf2bf1 -r a629cd533b240945a67fb7a8bbea175ec91fa381 QRWin/Properties/Resources.resx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QRWin/Properties/Resources.resx Sat Jan 26 16:40:55 2013 -0600 @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff -r 1bbff175f8dd58bee66dbf493e80fdcf8dbf2bf1 -r a629cd533b240945a67fb7a8bbea175ec91fa381 QRWin/Properties/Settings.Designer.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QRWin/Properties/Settings.Designer.cs Sat Jan 26 16:40:55 2013 -0600 @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace QRWin.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff -r 1bbff175f8dd58bee66dbf493e80fdcf8dbf2bf1 -r a629cd533b240945a67fb7a8bbea175ec91fa381 QRWin/Properties/Settings.settings --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QRWin/Properties/Settings.settings Sat Jan 26 16:40:55 2013 -0600 @@ -0,0 +1,7 @@ + + + + + + + diff -r 1bbff175f8dd58bee66dbf493e80fdcf8dbf2bf1 -r a629cd533b240945a67fb7a8bbea175ec91fa381 QRWin/QRWin.csproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QRWin/QRWin.csproj Sat Jan 26 16:40:55 2013 -0600 @@ -0,0 +1,90 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {0A00EDBF-C250-4565-B012-ECBAD0E1824C} + WinExe + Properties + QRWin + QRWin + v4.0 + Client + 512 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + .\Gma.QrCodeNet.Encoding.dll + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + \ No newline at end of file diff -r 1bbff175f8dd58bee66dbf493e80fdcf8dbf2bf1 -r a629cd533b240945a67fb7a8bbea175ec91fa381 QRWin/QRWin.sln --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/QRWin/QRWin.sln Sat Jan 26 16:40:55 2013 -0600 @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QRWin", "QRWin.csproj", "{0A00EDBF-C250-4565-B012-ECBAD0E1824C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0A00EDBF-C250-4565-B012-ECBAD0E1824C}.Debug|x86.ActiveCfg = Debug|x86 + {0A00EDBF-C250-4565-B012-ECBAD0E1824C}.Debug|x86.Build.0 = Debug|x86 + {0A00EDBF-C250-4565-B012-ECBAD0E1824C}.Release|x86.ActiveCfg = Release|x86 + {0A00EDBF-C250-4565-B012-ECBAD0E1824C}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal