- Updated algorithm, more readable
This commit is contained in:
Vichingo455 2023-04-03 21:04:27 +02:00 committed by GitHub
parent 0634dfa030
commit b1a264b023
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 17 deletions

View File

@ -86,7 +86,6 @@
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Windows 95 Key Generator";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);

View File

@ -45,20 +45,9 @@ namespace Win95Keygen
public static string RandomDivisibleBy7()
{
Random rand = new Random();
int i = rand.Next(1,3);
string output = "31584"; //By fallback or else VS 2008 errors out
if (i == 1)
{
output = "31584";
}
else if (i == 2)
{
output = "39207";
}
else if (i == 3)
{
output = "77777";
}
string[] yeararray = { "31584", "39207", "77777", "13811", "97408", "65908", "34421", "96526", "82121" };
int index = rand.Next(yeararray.Length);
string output = yeararray[index];
return output;
}
}

View File

@ -33,6 +33,6 @@ using System.Resources;
// 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.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.3.0.0")]
[assembly: NeutralResourcesLanguageAttribute("en")]