This commit is contained in:
2018-06-29 19:47:36 +00:00
commit be7f501333
3769 changed files with 1425961 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,58 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// 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("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// 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 Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]

View File

@@ -0,0 +1,660 @@
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Infragistics.Win;
using Infragistics.Win.UltraWinEditors;
using System.Text;
namespace GroundZero.KeyCodes
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TextBox edOut;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox edRegTo;
private System.Windows.Forms.CheckBox ckWebInterface;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox edSchedUsers;
private System.Windows.Forms.CheckBox ckQuickBooksInterface;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem mnGenerateKey;
private System.Windows.Forms.MenuItem mnuReadKey;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button btn31Days;
private Infragistics.Win.UltraWinEditors.UltraDateTimeEditor dtExpires;
private Infragistics.Win.UltraWinEditors.UltraOptionSet setType;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
Infragistics.Win.ValueListItem valueListItem1 = new Infragistics.Win.ValueListItem();
Infragistics.Win.ValueListItem valueListItem2 = new Infragistics.Win.ValueListItem();
Infragistics.Win.ValueListItem valueListItem3 = new Infragistics.Win.ValueListItem();
this.panel1 = new System.Windows.Forms.Panel();
this.setType = new Infragistics.Win.UltraWinEditors.UltraOptionSet();
this.btn31Days = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.dtExpires = new Infragistics.Win.UltraWinEditors.UltraDateTimeEditor();
this.ckQuickBooksInterface = new System.Windows.Forms.CheckBox();
this.edSchedUsers = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.ckWebInterface = new System.Windows.Forms.CheckBox();
this.edRegTo = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.edOut = new System.Windows.Forms.TextBox();
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.mnGenerateKey = new System.Windows.Forms.MenuItem();
this.mnuReadKey = new System.Windows.Forms.MenuItem();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.setType)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtExpires)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.setType);
this.panel1.Controls.Add(this.btn31Days);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.dtExpires);
this.panel1.Controls.Add(this.ckQuickBooksInterface);
this.panel1.Controls.Add(this.edSchedUsers);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.ckWebInterface);
this.panel1.Controls.Add(this.edRegTo);
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(704, 232);
this.panel1.TabIndex = 0;
//
// setType
//
this.setType.CheckedIndex = 0;
this.setType.FlatMode = true;
this.setType.ItemAppearance = appearance1;
valueListItem1.DataValue = "NEW";
valueListItem1.DisplayText = "New license";
valueListItem2.DataValue = "ADD";
valueListItem2.DisplayText = "Add on";
valueListItem3.DataValue = "LICENSETRIAL";
valueListItem3.DisplayText = "Licensed trial";
this.setType.Items.Add(valueListItem1);
this.setType.Items.Add(valueListItem2);
this.setType.Items.Add(valueListItem3);
this.setType.ItemSpacingVertical = 5;
this.setType.Location = new System.Drawing.Point(8, 16);
this.setType.Name = "setType";
this.setType.Size = new System.Drawing.Size(272, 56);
this.setType.TabIndex = 11;
this.setType.Text = "New license";
//
// btn31Days
//
this.btn31Days.Location = new System.Drawing.Point(176, 200);
this.btn31Days.Name = "btn31Days";
this.btn31Days.TabIndex = 10;
this.btn31Days.Text = "31 days";
this.btn31Days.Click += new System.EventHandler(this.btn31Days_Click);
//
// label4
//
this.label4.Location = new System.Drawing.Point(8, 184);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(312, 16);
this.label4.TabIndex = 9;
this.label4.Text = "Expires: (leave blank for no expiry)";
//
// dtExpires
//
this.dtExpires.Location = new System.Drawing.Point(8, 200);
this.dtExpires.Name = "dtExpires";
this.dtExpires.TabIndex = 8;
this.dtExpires.Value = null;
//
// ckQuickBooksInterface
//
this.ckQuickBooksInterface.Location = new System.Drawing.Point(456, 40);
this.ckQuickBooksInterface.Name = "ckQuickBooksInterface";
this.ckQuickBooksInterface.Size = new System.Drawing.Size(184, 24);
this.ckQuickBooksInterface.TabIndex = 6;
this.ckQuickBooksInterface.Text = "QuickBooks interface";
//
// edSchedUsers
//
this.edSchedUsers.Location = new System.Drawing.Point(8, 144);
this.edSchedUsers.Name = "edSchedUsers";
this.edSchedUsers.TabIndex = 5;
this.edSchedUsers.Text = "5";
//
// label3
//
this.label3.Location = new System.Drawing.Point(8, 128);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(312, 16);
this.label3.TabIndex = 4;
this.label3.Text = "Scheduleable users:";
//
// label2
//
this.label2.Location = new System.Drawing.Point(456, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(100, 16);
this.label2.TabIndex = 3;
this.label2.Text = "Options:";
//
// ckWebInterface
//
this.ckWebInterface.Location = new System.Drawing.Point(456, 16);
this.ckWebInterface.Name = "ckWebInterface";
this.ckWebInterface.Size = new System.Drawing.Size(184, 24);
this.ckWebInterface.TabIndex = 2;
this.ckWebInterface.Text = "Web interface";
//
// edRegTo
//
this.edRegTo.Location = new System.Drawing.Point(8, 96);
this.edRegTo.Name = "edRegTo";
this.edRegTo.Size = new System.Drawing.Size(360, 20);
this.edRegTo.TabIndex = 1;
this.edRegTo.Text = "Unregistered trial";
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 80);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(100, 16);
this.label1.TabIndex = 0;
this.label1.Text = "Registered to:";
//
// edOut
//
this.edOut.Dock = System.Windows.Forms.DockStyle.Fill;
this.edOut.Location = new System.Drawing.Point(0, 232);
this.edOut.Multiline = true;
this.edOut.Name = "edOut";
this.edOut.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.edOut.Size = new System.Drawing.Size(704, 321);
this.edOut.TabIndex = 1;
this.edOut.Text = "";
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.mnGenerateKey,
this.mnuReadKey});
//
// mnGenerateKey
//
this.mnGenerateKey.Index = 0;
this.mnGenerateKey.Text = "Generate key to clipboard";
this.mnGenerateKey.Click += new System.EventHandler(this.mnGenerateKey_Click);
//
// mnuReadKey
//
this.mnuReadKey.Index = 1;
this.mnuReadKey.Text = "Validate key";
this.mnuReadKey.Click += new System.EventHandler(this.mnuReadKey_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(704, 553);
this.Controls.Add(this.edOut);
this.Controls.Add(this.panel1);
this.Menu = this.mainMenu1;
this.Name = "Form1";
this.Text = "Keymaster (25-April-2006)";
this.Load += new System.EventHandler(this.Form1_Load);
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.setType)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dtExpires)).EndInit();
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void mnGenerateKey_Click(object sender, System.EventArgs e)
{
if(setType.CheckedItem==null)
{
MessageBox.Show("Select a license type to proceed");
return;
}
string SelectedLicenseType=setType.CheckedItem.DataValue.ToString();
KeyGen kg=new KeyGen();
kg.FeatureQuickBooksInterface=this.ckQuickBooksInterface.Checked;
kg.FeatureWebInterface=this.ckWebInterface.Checked;
kg.RegisteredTo=this.edRegTo.Text;
kg.ScheduleableUsers=System.Convert.ToInt32(this.edSchedUsers.Text);
bool bWillExpire=false;
if(dtExpires.Value!=null && dtExpires.Value!=DBNull.Value)
{
kg.Expires=dtExpires.DateTime;
bWillExpire=true;
}
else
kg.Expires=DateTime.Today;
string strKey="";
#region format message
if(SelectedLicenseType=="NEW")
{
#region New
strKey="Thank you for your purchase and welcome to the \r\n" +
"world-wide community of AyaNova users! \r\n" +
" \r\n" +
"Below is your activation key with instructions for entry into the \r\n" +
"trial of AyaNova v3 that you previously downloaded from our website, \r\n" +
"installed and tested for suitability. \r\n" +
" \r\n" +
"Reminder: no physical product will be shipped to you, this license key \r\n" +
"fulfills your order in full. \r\n" +
" \r\n" +
" \r\n" +
"HELP AND SUPPORT RESOURCES: \r\n" +
"AyaNova web site: \r\n" +
"http://www.ayanova.com \r\n" +
"Users manual: \r\n" +
"http://www.ayanova.com/download.htm \r\n" +
"Answers to frequently asked questions: \r\n" +
"http://www.ayanova.com/faqAnswers.htm \r\n" +
"Technical support forum: \r\n" +
"http://forum.ayanova.com \r\n" +
"Latest AyaNova version update information: \r\n" +
"http://forum.ayanova.com \r\n" +
" \r\n" +
" \r\n" +
LicenseInfo(kg,setType.Value.ToString())+
"HOW TO ENTER YOUR ACTIVATION KEY \r\n" +
" \r\n" +
"1. Copy only all the text from between the -=-=-=-=-=- below to the Windows clip board \r\n" +
"(highlight the text, right-click, select Copy) \r\n" +
" \r\n" +
"Do not edit any of the key text, AyaNova will not accept an altered key. \r\n" +
" \r\n" +
"2. Ensure no other users are accessing AyaNova v3 \r\n" +
" \r\n" +
"3. Log into the trial AyaNova v3 as the AyaNova Administrator \r\n" +
"(default is manager with password letmein ) \r\n" +
"(no quotation marks and in lowercase) \r\n" +
" \r\n" +
"4. Select Help->License from the main menu to bring up the keycode window. \r\n" +
" \r\n" +
"5. Select the menu option Paste license key \r\n" +
" \r\n" +
"6. Close AyaNova \r\n" +
" \r\n" +
"7. Log back into AyaNova v3 as manager with password letmein \r\n" +
"(no quotation marks and in lowercase) \r\n" +
" \r\n" +
"8. As the trial AyaNova v3 has 5 sample scheduleable users, if the number of licenses \r\n" +
"purchased are less than 5, you will receive a message that 5 are set to Active, and \r\n" +
"the number of licenses do not match the number set Active. \r\n" +
"If you receive this message and are not going to erase the trial data, you will need \r\n" +
"to manually delete or close all workorders where sample scheduleable users are \r\n" +
"selected. Then open the Administration pane, open the Users grid, \r\n" +
"and set the sample scheduleable users to In-active. \r\n" +
" \r\n" +
"9. To erase all trial entered data and users, select Help->License from the main menu \r\n" +
"to bring up the keycode window. Select the menu option to erase sample data. \r\n" +
" \r\n" +
"10. Refer to the AyaNova v3 Manual for details on all features, tutorials, tips on use, \r\n" +
"and for installing and configuring for a network environment \r\n" +
" \r\n" +
" =-=-=-=-=-=-< LICENSE KEYCODE >-=-=-=-=-=-=- \r\n" +
kg.Generate() + " \r\n" +
"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= \r\n" +
" \r\n" ;
#endregion new
}
else if(SelectedLicenseType=="ADD") //Add on
{
#region Add on
strKey="Thank you for your additional license purchase! \r\n" +
"\r\n" +
"Below is your replacement activation key with \r\n" +
"instructions for entering it. \r\n" +
"\r\n" +
"Your previous key is no longer licensed and is no \r\n" +
"longer required as this key supersedes all \r\n" +
"previous keys purchased. \r\n" +
"\r\n" +
"Reminder: no physical product will be shipped to you, this license key \r\n" +
"fulfills your order in full. \r\n" +
"\r\n" +
"\r\n" +
"HELP AND SUPPORT RESOURCES: \r\n" +
"AyaNova web site: \r\n" +
"http://www.ayanova.com \r\n" +
"Users manual: \r\n" +
"http://www.ayanova.com/download.htm \r\n" +
"Answers to frequently asked questions: \r\n" +
"http://www.ayanova.com/faqAnswers.htm \r\n" +
"Technical support forum: \r\n" +
"http://forum.ayanova.com \r\n" +
"\r\n" +
"\r\n " +
LicenseInfo(kg,setType.Value.ToString())+
"PURCHASING ADDITIONAL LICENSES \r\n" +
"If you wish to purchase additional licenses in future you must use the \r\n" +
"same registration name and registered email address used when you purchased this key. \r\n" +
" \r\n" +
" \r\n" +
"HOW TO ENTER YOUR ACTIVATION KEY \r\n" +
" \r\n" +
"1. Copy only all the text from between the -=-=-=-=-=- below to the Windows clip board \r\n" +
"(highlight the text, right-click, select Copy) \r\n" +
" \r\n" +
"Do not edit any of the key text, AyaNova will not accept an altered key. \r\n" +
" \r\n" +
"2. Ensure no other users are accessing AyaNova v3 \r\n" +
" \r\n" +
"3. Log into AyaNova v3 as the AyaNova Administrator \r\n" +
"(default is manager with password letmein ) \r\n" +
"(no quotation marks and in lowercase) \r\n" +
" \r\n" +
"4. Select Help->License from the main menu to bring up the keycode window. \r\n" +
" \r\n" +
"5. Select the menu option Paste license key \r\n" +
" \r\n" +
"6. Close AyaNova \r\n" +
" \r\n" +
" \r\n" +
" =-=-=-=-=-=-< LICENSE KEYCODE >-=-=-=-=-=-=- \r\n" +
kg.Generate() + " \r\n" +
"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= \r\n" +
" \r\n" ;
#endregion add on
}
else//Licensed trial
{
if(!bWillExpire)
MessageBox.Show("WARNING: A licensed trial should have an expiry date");
#region Licensed trial
strKey="Thank you for evaluating AyaNova \r\n" +
" \r\n" +
"Below is your temporary activation key with instructions for entry into the \r\n" +
"trial of AyaNova v3 that you previously downloaded from our website. \r\n" +
" \r\n" +
" \r\n" +
"HELP AND SUPPORT RESOURCES: \r\n" +
"AyaNova web site: \r\n" +
"http://www.ayanova.com \r\n" +
"Users manual: \r\n" +
"http://www.ayanova.com/download.htm \r\n" +
"Answers to frequently asked questions: \r\n" +
"http://www.ayanova.com/faqAnswers.htm \r\n" +
"Technical support forum: \r\n" +
"http://forum.ayanova.com \r\n" +
"Latest AyaNova version update information: \r\n" +
"http://forum.ayanova.com \r\n" +
" \r\n" +
" \r\n" +
LicenseInfo(kg,setType.Value.ToString())+
"HOW TO ENTER YOUR ACTIVATION KEY \r\n" +
" \r\n" +
"1. Copy only all the text from between the -=-=-=-=-=- below to the Windows clip board \r\n" +
"(highlight the text, right-click, select Copy) \r\n" +
" \r\n" +
"Do not edit any of the key text, AyaNova will not accept an altered key. \r\n" +
" \r\n" +
"2. Ensure no other users are accessing AyaNova v3 \r\n" +
" \r\n" +
"3. Log into the trial AyaNova v3 as the AyaNova Administrator \r\n" +
"(default is manager with password letmein ) \r\n" +
"(no quotation marks and in lowercase) \r\n" +
" \r\n" +
"4. Select Help->License from the main menu to bring up the keycode window. \r\n" +
" \r\n" +
"5. Select the menu option Paste license key \r\n" +
" \r\n" +
"6. Close AyaNova \r\n" +
" \r\n" +
"7. Log back into AyaNova v3 as manager with password letmein \r\n" +
"(no quotation marks and in lowercase) \r\n" +
" \r\n" +
"8. As the trial AyaNova v3 has 5 sample scheduleable users, if the number of licenses \r\n" +
"purchased are less than 5, you will receive a message that 5 are set to Active, and \r\n" +
"the number of licenses do not match the number set Active. \r\n" +
"If you receive this message and are not going to erase the trial data, you will need \r\n" +
"to manually delete or close all workorders where sample scheduleable users are \r\n" +
"selected. Then open the Administration pane, open the Users grid, \r\n" +
"and set the sample scheduleable users to In-active. \r\n" +
" \r\n" +
"9. To erase all trial entered data and users, select Help->License from the main menu \r\n" +
"to bring up the keycode window. Select the menu option to erase sample data. \r\n" +
" \r\n" +
"10. Refer to the AyaNova v3 Manual for details on all features, tutorials, tips on use, \r\n" +
"importing AyaNova CE 1.9.4.4 data, and for installing and configuring \r\n" +
"for a network environment \r\n" +
" \r\n"+
" =-=-=-=-=-=-< LICENSE KEYCODE >-=-=-=-=-=-=- \r\n" +
kg.Generate() + " \r\n" +
"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= \r\n" +
" \r\n" ;
//
// strKey="Thank you for evaluating AyaNova \r\n" +
// " \r\n" +
// "Below is your temporary activation key with instructions for entry into the\r\n" +
// "trial of AyaNova that you previously downloaded from our website. \r\n" +
// " \r\n" +
// " \r\n" +
// "HELP AND SUPPORT RESOURCES: \r\n" +
// "AyaNova web site: \r\n" +
// "http://www.ayanova.com \r\n" +
// "Users manual: \r\n" +
// "http://www.ayanova.com/download.htm \r\n" +
// "Answers to frequently asked questions: \r\n" +
// "http://www.ayanova.com/faqAnswers.htm \r\n" +
// "Technical support forum: \r\n" +
// "http://forum.ayanova.com \r\n" +
// " \r\n" +
// " \r\n" +
// LicenseInfo(kg,setType.Value.ToString())+
// "HOW TO ENTER YOUR ACTIVATION KEY \r\n" +
// " \r\n" +
// "1. Copy only all the text from between the -=-=-=-=-=- below to the Windows clip board \r\n" +
// "(highlight the text, right-click, select Copy) \r\n" +
// "\r\n" +
// "Do not edit any of the key text, AyaNova will not accept an altered key. " +
// " \r\n" +
// "2. Ensure no other users are accessing AyaNova v3 \r\n" +
// " \r\n" +
// "3. Log into the trial AyaNova v3 as \"manager\" with password \"letmein\" \r\n" +
// "(no quotation marks and in lowercase) \r\n" +
// " \r\n" +
// "4. Select Help->License from the main menu to bring up the keycode window. \r\n" +
// " \r\n" +
// "5. Select the menu option Paste license key \r\n" +
// " \r\n" +
// "6. Close AyaNova \r\n" +
// " \r\n" +
// "7. Log back into AyaNova v3 as \"manager\" with password \"letmein\" \r\n" +
// "(no quotation marks and in lowercase) \r\n" +
// " \r\n" +
// "8. As the trial AyaNova v3 has 5 sample scheduleable users, if the number of licenses provided are less than 5, \r\n" +
// "you will receive a message that 5 are set to Active, and the number of licenses do not match the number set Active. \r\n" +
// "If you receive this message and are not going to erase the trial data, open the Administration pane, open the Users \r\n" +
// "grid, and set the sample scheduleable users to In-active . \r\n" +
// " \r\n" +
// "9. Refer to the AyaNova v3 Manual Technical section for installing and configuring for a network environment, \r\n" +
// " importing your AyaNova CE 1.9.4.4 data and for erasing the trial sample data and users. \r\n" +
// " \r\n" +
// " \r\n" +
//
// " =-=-=-=-=-=-< LICENSE KEYCODE >-=-=-=-=-=-=- \r\n" +
// kg.Generate() + " \r\n" +
// "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= \r\n" +
// " \r\n" ;
#endregion licensed trial
}
#endregion
edOut.Text=strKey;
edOut.SelectAll();
edOut.Copy();
}
/// <summary>
/// Extra info to display about key at top of key message
/// </summary>
/// <param name="kg"></param>
/// <returns></returns>
private string LicenseInfo(KeyGen kg, string stype)
{
StringBuilder sb = new StringBuilder();
sb.Append("LICENSE DETAILS\r\n");
sb.Append("This key must be installed by: ");
sb.Append(System.DateTime.Today.AddDays(3).ToString());
sb.Append("\r\n");
if(!System.DateTime.Today.Date.Equals(kg.Expires.Date))
{
if(stype=="LICENSEDTRIAL")
{
sb.Append("*** This has been provided for temporary evaluation purposes only *** \r\n");
sb.Append("This key will stop working after: " + kg.Expires.ToString() + "\r\n");
}
else
{
sb.Append("This license key is provided for temporary use pending payment.\r\n");
sb.Append("The key will stop working after: " + kg.Expires.ToString() + "\r\n");
sb.Append("\r\n");
sb.Append("A permanent license key will be sent to you when payment \r\n" +
"has been received and processed. There will be no extensions or \r\n" +
"exceptions. Please send in payment early enough to allow for \r\n" +
"mail and processing time to ensure uninterrupted use of AyaNova. \r\n");
}
sb.Append("\r\n");
}
sb.Append("Registered to: ");
sb.Append(kg.RegisteredTo);
sb.Append("\r\n");
sb.Append("Schedulable users: ");
sb.Append(kg.ScheduleableUsers);
sb.Append("\r\n");
sb.Append("QuickBooks interface optional add on: ");
sb.Append(kg.FeatureQuickBooksInterface?"YES":" Not purchased");
sb.Append("\r\n");
sb.Append("Web interface optional add on: ");
sb.Append(kg.FeatureWebInterface?"YES":" Not purchased");
sb.Append("\r\n\r\n");
return sb.ToString();
}
private void mnuReadKey_Click(object sender, System.EventArgs e)
{
KeyReader kr=new KeyReader(edOut.Text);
if(!kr.IsValid)
MessageBox.Show(kr.Status);
else
{
string strExpiry="Expires: n/a";
if(kr.Expires!=null) strExpiry="Expires: " + ((DateTime)kr.Expires).ToString();
MessageBox.Show(
"Key is OK:\r\n" +
strExpiry + "\r\n" +
kr.RegisteredTo+"\r\n"+
kr.ScheduleableUsers.ToString() +
"\r\n" + kr.Generated.ToString()+
"\r\nInstallable: " +
kr.Installable.ToString());
}
}
private void btn31Days_Click(object sender, System.EventArgs e)
{
dtExpires.Value=System.DateTime.Now.AddDays(31);
}
private void Form1_Load(object sender, System.EventArgs e)
{
dtExpires.Value=DBNull.Value;
}
}
}

View File

@@ -0,0 +1,277 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used forserialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="panel1.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="panel1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="panel1.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="panel1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="panel1.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="panel1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="setType.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="setType.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="setType.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btn31Days.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="btn31Days.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="btn31Days.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label4.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label4.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label4.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="dtExpires.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="dtExpires.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="dtExpires.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="ckQuickBooksInterface.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="ckQuickBooksInterface.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="ckQuickBooksInterface.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="edSchedUsers.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="edSchedUsers.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="edSchedUsers.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label3.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label3.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label3.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="ckWebInterface.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="ckWebInterface.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="ckWebInterface.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="edRegTo.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="edRegTo.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="edRegTo.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="edOut.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="edOut.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="edOut.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="mainMenu1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="mainMenu1.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</data>
<data name="mainMenu1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="mnGenerateKey.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="mnGenerateKey.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="mnuReadKey.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="mnuReadKey.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>(Default)</value>
</data>
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="$this.Name">
<value>Form1</value>
</data>
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>80</value>
</data>
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
</root>

View File

@@ -0,0 +1,37 @@
<VisualStudioProject>
<CSHARP ProjectType="Local" ProductVersion="7.10.3077" SchemaVersion="2.0" ProjectGuid="{D875D014-6185-404B-B5AF-09B61959DF2D}">
<Build>
<Settings ApplicationIcon="App.ico" AssemblyKeyContainerName="" AssemblyName="Generator" AssemblyOriginatorKeyFile="" DefaultClientScript="JScript" DefaultHTMLPageLayout="Grid" DefaultTargetSchema="IE50" DelaySign="false" OutputType="WinExe" PreBuildEvent="" PostBuildEvent="" RootNamespace="Generator" RunPostBuildEvent="OnBuildSuccess" StartupObject="">
<Config Name="Debug" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="DEBUG;TRACE" DocumentationFile="" DebugSymbols="true" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="" Optimize="false" OutputPath="bin\Debug\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="4" />
<Config Name="Release" AllowUnsafeBlocks="false" BaseAddress="285212672" CheckForOverflowUnderflow="false" ConfigurationOverrideFile="" DefineConstants="TRACE" DocumentationFile="" DebugSymbols="false" FileAlignment="4096" IncrementalBuild="false" NoStdLib="false" NoWarn="" Optimize="true" OutputPath="bin\Release\" RegisterForComInterop="false" RemoveIntegerChecks="false" TreatWarningsAsErrors="false" WarningLevel="4" />
</Settings>
<References>
<Reference Name="System" AssemblyName="System" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" />
<Reference Name="System.Data" AssemblyName="System.Data" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" />
<Reference Name="System.Drawing" AssemblyName="System.Drawing" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll" />
<Reference Name="System.Windows.Forms" AssemblyName="System.Windows.Forms" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll" />
<Reference Name="System.XML" AssemblyName="System.Xml" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" />
<Reference Name="System.Security" AssemblyName="System.Security" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Security.dll" />
<Reference Name="Infragistics.Win.UltraWinEditors.v5.3" AssemblyName="Infragistics.Win.UltraWinEditors.v5.3" HintPath="..\..\..\..\Program Files\Infragistics\NetAdvantage 2005 Volume 3 CLR 1.0\Windows Forms\Bin\Infragistics.Win.UltraWinEditors.v5.3.dll" AssemblyFolderKey="hklm\infragistics.winassemblies.20053" Private="False" />
<Reference Name="Infragistics.Win.v5.3" AssemblyName="Infragistics.Win.v5.3" HintPath="..\..\..\..\Program Files\Infragistics\NetAdvantage 2005 Volume 3 CLR 1.0\Windows Forms\Bin\Infragistics.Win.v5.3.dll" AssemblyFolderKey="hklm\infragistics.winassemblies.20053" Private="False" />
<Reference Name="Infragistics.Shared.v5.3" AssemblyName="Infragistics.Shared.v5.3" HintPath="..\..\..\..\Program Files\Infragistics\NetAdvantage 2005 Volume 3 CLR 1.0\Windows Forms\Bin\Infragistics.Shared.v5.3.dll" AssemblyFolderKey="hklm\infragistics.winassemblies.20053" Private="False" />
<Reference Name="System.Design" AssemblyName="System.Design" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Design.dll" />
<Reference Name="Microsoft.VisualBasic" AssemblyName="Microsoft.VisualBasic" HintPath="..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Microsoft.VisualBasic.dll" />
<Reference Name="Infragistics.Win.Misc.v5.3" AssemblyName="Infragistics.Win.Misc.v5.3" HintPath="..\..\..\..\Program Files\Infragistics\NetAdvantage 2005 Volume 3 CLR 1.0\Windows Forms\Bin\Infragistics.Win.Misc.v5.3.dll" AssemblyFolderKey="hklm\infragistics.winassemblies.20053" Private="False" />
</References>
</Build>
<Files>
<Include>
<File RelPath="App.ico" BuildAction="Content" />
<File RelPath="AssemblyInfo.cs" SubType="Code" BuildAction="Compile" />
<File RelPath="Form1.cs" SubType="Form" BuildAction="Compile" />
<File RelPath="Form1.resx" DependentUpon="Form1.cs" BuildAction="EmbeddedResource" />
<File RelPath="KeyGen.cs" SubType="Code" BuildAction="Compile" />
<File RelPath="KeyRead.cs" SubType="Code" BuildAction="Compile" />
<File RelPath="licenses.licx" BuildAction="EmbeddedResource" />
<File RelPath="pubkey.xml" BuildAction="EmbeddedResource" />
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

View File

@@ -0,0 +1,149 @@
<?xml version="1.0" encoding="Windows-1252"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{D875D014-6185-404B-B5AF-09B61959DF2D}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon>App.ico</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>Generator</AssemblyName>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>WinExe</OutputType>
<RootNamespace>Generator</RootNamespace>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
<NoWarn>
</NoWarn>
<Optimize>false</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>false</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
<NoWarn>
</NoWarn>
<Optimize>true</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<DebugType>none</DebugType>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic">
<Name>Microsoft.VisualBasic</Name>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
<Reference Include="System.Data">
<Name>System.Data</Name>
</Reference>
<Reference Include="System.Design">
<Name>System.Design</Name>
</Reference>
<Reference Include="System.Drawing">
<Name>System.Drawing</Name>
</Reference>
<Reference Include="System.Security">
<Name>System.Security</Name>
</Reference>
<Reference Include="System.Windows.Forms">
<Name>System.Windows.Forms</Name>
</Reference>
<Reference Include="System.Xml">
<Name>System.XML</Name>
</Reference>
<Reference Include="Infragistics2.Shared.v6.2, Version=6.2.20062.1038, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb, processorArchitecture=MSIL">
<HintPath>C:\Program Files\Infragistics\NetAdvantage 2006 Volume 2 CLR 2.0\windows forms\bin\Infragistics2.Shared.v6.2.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="Infragistics2.Win.Misc.v6.2, Version=6.2.20062.1038, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb, processorArchitecture=MSIL">
<HintPath>C:\Program Files\Infragistics\NetAdvantage 2006 Volume 2 CLR 2.0\windows forms\bin\Infragistics2.Win.Misc.v6.2.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="Infragistics2.Win.UltraWinEditors.v6.2, Version=6.2.20062.1038, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb, processorArchitecture=MSIL">
<HintPath>C:\Program Files\Infragistics\NetAdvantage 2006 Volume 2 CLR 2.0\windows forms\bin\Infragistics2.Win.UltraWinEditors.v6.2.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="Infragistics2.Win.v6.2, Version=6.2.20062.1038, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb, processorArchitecture=MSIL">
<HintPath>C:\Program Files\Infragistics\NetAdvantage 2006 Volume 2 CLR 2.0\windows forms\bin\Infragistics2.Win.v6.2.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include="App.ico" />
<Compile Include="AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="KeyGen.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="KeyRead.cs">
<SubType>Code</SubType>
</Compile>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="licenses.licx" />
<EmbeddedResource Include="pubkey.xml" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,48 @@
<VisualStudioProject>
<CSHARP LastOpenVersion = "7.10.3077" >
<Build>
<Settings ReferencePath = "" >
<Config
Name = "Debug"
EnableASPDebugging = "false"
EnableASPXDebugging = "false"
EnableUnmanagedDebugging = "false"
EnableSQLServerDebugging = "false"
RemoteDebugEnabled = "false"
RemoteDebugMachine = ""
StartAction = "Project"
StartArguments = ""
StartPage = ""
StartProgram = ""
StartURL = ""
StartWorkingDirectory = ""
StartWithIE = "true"
/>
<Config
Name = "Release"
EnableASPDebugging = "false"
EnableASPXDebugging = "false"
EnableUnmanagedDebugging = "false"
EnableSQLServerDebugging = "false"
RemoteDebugEnabled = "false"
RemoteDebugMachine = ""
StartAction = "Project"
StartArguments = ""
StartPage = ""
StartProgram = ""
StartURL = ""
StartWorkingDirectory = ""
StartWithIE = "true"
/>
</Settings>
</Build>
<OtherProjectSettings
CopyProjectDestinationFolder = ""
CopyProjectUncPath = ""
CopyProjectOption = "0"
ProjectView = "ProjectFiles"
ProjectTrust = "0"
/>
</CSHARP>
</VisualStudioProject>

View File

@@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator", "Generator.csproj", "{D875D014-6185-404B-B5AF-09B61959DF2D}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{D875D014-6185-404B-B5AF-09B61959DF2D}.Debug.ActiveCfg = Debug|.NET
{D875D014-6185-404B-B5AF-09B61959DF2D}.Debug.Build.0 = Debug|.NET
{D875D014-6185-404B-B5AF-09B61959DF2D}.Release.ActiveCfg = Release|.NET
{D875D014-6185-404B-B5AF-09B61959DF2D}.Release.Build.0 = Release|.NET
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

Binary file not shown.

View File

@@ -0,0 +1,212 @@
using System;
using System.IO;
using System.Xml;
using System.Security;
using System.Security.Cryptography;
using System.Security.Cryptography.Xml;
namespace GroundZero.KeyCodes
{
/// <summary>
/// AyaNova .net key generator
/// </summary>
public class KeyGen
{
private string _RegisteredTo;
private int _ScheduleableUsers;
private bool _FeatureWebInterface;
System.DateTime _Expires;
private bool _FeatureQuickBooksInterface;
public KeyGen()
{
_FeatureWebInterface=false;
_FeatureQuickBooksInterface=false;
_Expires=System.DateTime.Today;
}
public string RegisteredTo
{
get
{
return _RegisteredTo;
}
set
{
_RegisteredTo=value;
}
}
public int ScheduleableUsers
{
get
{
return _ScheduleableUsers;
}
set
{
_ScheduleableUsers=value;
}
}
public bool FeatureWebInterface
{
get
{
return _FeatureWebInterface;
}
set
{
_FeatureWebInterface=value;
}
}
public DateTime Expires
{
get
{
return _Expires;
}
set
{
_Expires=value;
}
}
public bool FeatureQuickBooksInterface
{
get
{
return _FeatureQuickBooksInterface;
}
set
{
_FeatureQuickBooksInterface=value;
}
}
/// <summary>
/// Generate keycode based on passed in data
/// </summary>
/// <returns></returns>
public string Generate()
{
if(_RegisteredTo==null || _RegisteredTo=="")
throw new ArgumentException("RegisteredTo is required","RegisteredTo");
System.Text.StringBuilder sb = new System.Text.StringBuilder();
System.Xml.XmlTextWriter w = new System.Xml.XmlTextWriter(new StringWriter(sb));
w.Formatting = System.Xml.Formatting.Indented;
w.WriteStartDocument(true);
//w.WriteDocType("KeyDocument",null,null,null);
double dSchemaVersion=1.1;
w.WriteStartElement("AyaNovaLicenseKey");
w.WriteElementString("SchemaVersion",XmlConvert.ToString(dSchemaVersion));
w.WriteElementString("Created",XmlConvert.ToString(System.DateTime.Now));
w.WriteElementString("RegisteredTo",_RegisteredTo);
w.WriteElementString("InstallableUntil",XmlConvert.ToString(System.DateTime.Today.AddDays(7)));
w.WriteElementString("TotalScheduleableUsers",XmlConvert.ToString(_ScheduleableUsers));
if(!System.DateTime.Today.Date.Equals(_Expires.Date))
w.WriteElementString("Expires",XmlConvert.ToString(_Expires.Date));
//w.WriteElementString("PermanentKey",XmlConvert.ToString(_TemporaryKey));
w.WriteElementString("FeatureWebBrowserInterface",XmlConvert.ToString(_FeatureWebInterface));
w.WriteElementString("FeatureQuickBooksInterface",XmlConvert.ToString(_FeatureQuickBooksInterface));
w.WriteEndElement();
w.WriteEndDocument();
w.Flush();
w.Close();
// Load the license request file.
XmlDocument xmldoc = new XmlDocument();
try
{
xmldoc.LoadXml(sb.ToString());
}
catch(Exception ex)
{
return (ex.Message + ":\r\n\r\n" + sb.ToString());
}
// Get the key pair from the key store.
CspParameters parms = new CspParameters(1); // PROV_RSA_FULL
parms.Flags = CspProviderFlags.UseMachineKeyStore; // Use Machine store
parms.KeyContainerName = "AyaNovaLicenseContainer"; // "CodeProject" container
parms.KeyNumber = 2; // AT_SIGNATURE
try{
RSACryptoServiceProvider csp = new RSACryptoServiceProvider(parms);
// Creating the XML signing object.
SignedXml sxml = new SignedXml(xmldoc);
sxml.SigningKey = csp;
// Set the canonicalization method for the document.
sxml.SignedInfo.CanonicalizationMethod =
SignedXml.XmlDsigCanonicalizationUrl; // No comments.
// Create an empty reference (not enveloped) for the XPath
// transformation.
Reference r = new Reference("");
// Create the XPath transform and add it to the reference list.
r.AddTransform(new XmlDsigEnvelopedSignatureTransform(false));
// Add the reference to the SignedXml object.
sxml.AddReference(r);
// Compute the signature.
sxml.ComputeSignature();
// Get the signature XML and add it to the document element.
XmlElement sig = sxml.GetXml();
xmldoc.DocumentElement.AppendChild(sig);
// Write-out formatted signed XML to console (allow for redirection).
System.Text.StringBuilder sbFinal = new System.Text.StringBuilder();
XmlTextWriter writer = new XmlTextWriter(new StringWriter(sbFinal));
writer.Formatting = Formatting.Indented;
try
{
xmldoc.WriteTo(writer);
}
finally
{
writer.Flush();
writer.Close();
}
return sbFinal.ToString();
}
catch(Exception ex)
{
return (ex.Message + ":\r\n\r\n" + sb.ToString());
}
}
}
}

View File

@@ -0,0 +1,296 @@
using System;
using System.IO;
using System.Xml;
using System.Security;
using System.Security.Cryptography;
using System.Security.Cryptography.Xml;
namespace GroundZero.KeyCodes
{
/// <summary>
/// AyaNova .net key reader and validator
/// </summary>
public class KeyReader
{
private bool _IsValid;
private string _RegisteredTo;
private int _ScheduleableUsers;
private bool _FeatureWebInterface;
private object _Expires;
private bool _FeatureQuickBooksInterface;
private string _status;
private DateTime _Generated;
private DateTime _InstallableUntil;
private bool _Installable;
private double _SchemaVersion;
public string RegisteredTo
{
get
{
return _RegisteredTo;
}
}
public string Status
{
get
{
return _status;
}
}
public int ScheduleableUsers
{
get
{
return _ScheduleableUsers;
}
}
public bool FeatureWebInterface
{
get
{
return _FeatureWebInterface;
}
}
public bool FeatureQuickBooksInterface
{
get
{
return _FeatureQuickBooksInterface;
}
}
public bool IsValid
{
get
{
return _IsValid;
}
}
public DateTime Generated
{
get
{
return _Generated;
}
}
public object Expires
{
get
{
return _Expires;
}
}
public DateTime InstallableUntil
{
get
{
return _InstallableUntil;
}
}
public bool Installable
{
get
{
return _Installable;
}
}
public double SchemaVersion
{
get
{
return _SchemaVersion;
}
}
public KeyReader(string Key)
{
_IsValid=false;
_FeatureWebInterface=false;
_FeatureQuickBooksInterface=false;
_Installable=false;
//Ensure we have a key and strip out any unnecessary text
int nStart=Key.IndexOf("<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?>");
int nEnd=Key.IndexOf("</AyaNovaLicenseKey>");
if(nEnd==-1 || nStart==-1 || nEnd<nStart)
{
_IsValid=false;
_status="Error: could not find license XML in text.";
return;
}
Key=Key.Substring(nStart,(nEnd+("</AyaNovaLicenseKey>".Length))-nStart);
//validate key signature then get settings within key
// Get the XML content from the embedded XML public key.
Stream s = null;
string xmlkey = string.Empty;
try
{
// System.Reflection.Assembly ass=System.Reflection.Assembly.GetExecutingAssembly();
// string [] items=ass.GetManifestResourceNames();
// foreach(string ss in items)
// {
// string xy=ss;
// string ab=xy;
//
// }
s = typeof(KeyReader).Assembly.GetManifestResourceStream(
"Generator.pubkey.xml");
// Read-in the XML content.
StreamReader reader = new StreamReader(s);
xmlkey = reader.ReadToEnd();
reader.Close();
}
catch (Exception ex)
{
_IsValid=false;
_status="Error: could not import public key. " + ex.Message + "\r\n" + ex.InnerException;
return;
}
// Create an RSA crypto service provider from the embedded
// XML document resource (the public key).
RSACryptoServiceProvider csp = new RSACryptoServiceProvider();
csp.FromXmlString(xmlkey);
// Load the signed XML license file.
XmlDocument xmldoc = new XmlDocument();
try
{
xmldoc.LoadXml(Key);
}
catch(Exception ex)
{
_IsValid=false;
_status="Error: exception in LoadXml:\r\n." + ex.Message + "\r\n" + ex.InnerException;
return;
}
// Create the signed XML object.
SignedXml sxml = new SignedXml(xmldoc);
try
{
// Get the XML Signature node and load it into the signed XML object.
XmlNode dsig = xmldoc.GetElementsByTagName("Signature",
SignedXml.XmlDsigNamespaceUrl)[0];
sxml.LoadXml((XmlElement)dsig);
}
catch(Exception ex)
{
_IsValid=false;
_status="Error: no signature found." + ex.Message + "\r\n" + ex.InnerException;
return;
}
// Verify the signature.
if (!sxml.CheckSignature(csp))
{
_IsValid=false;
_status="Error: Signature not valid, key has been tampered with.";
return;
}
_IsValid=true;
try
{
_SchemaVersion=XmlConvert.ToDouble(xmldoc.SelectSingleNode("/AyaNovaLicenseKey/SchemaVersion").InnerText);
_RegisteredTo=xmldoc.SelectSingleNode("/AyaNovaLicenseKey/RegisteredTo").InnerText;
_ScheduleableUsers=XmlConvert.ToInt32(xmldoc.SelectSingleNode("/AyaNovaLicenseKey/TotalScheduleableUsers").InnerText);
_Generated=XmlConvert.ToDateTime(xmldoc.SelectSingleNode("/AyaNovaLicenseKey/Created").InnerText);
_InstallableUntil=XmlConvert.ToDateTime(xmldoc.SelectSingleNode("/AyaNovaLicenseKey/InstallableUntil").InnerText);
if(xmldoc.SelectSingleNode("/AyaNovaLicenseKey/Expires")!=null)
_Expires=XmlConvert.ToDateTime(xmldoc.SelectSingleNode("/AyaNovaLicenseKey/Expires").InnerText);
else
_Expires=null;
_FeatureQuickBooksInterface=XmlConvert.ToBoolean(xmldoc.SelectSingleNode("/AyaNovaLicenseKey/FeatureQuickBooksInterface").InnerText);
_FeatureWebInterface=XmlConvert.ToBoolean(xmldoc.SelectSingleNode("/AyaNovaLicenseKey/FeatureWebBrowserInterface").InnerText);
if(System.DateTime.Now > _InstallableUntil)
{
_Installable=false;
_status="Error: Installation key has expired.";
return;
}
_Installable=true;
//FUTURE: Here is an example of new items in a hypothetical future schema version...
// if(_SchemaVersion>1.1)
// {
// _FeatureNew=XmlConvert.ToBoolean(xmldoc.SelectSingleNode("/AyaNovaLicenseKey/FeatureNew").InnerText);
// }
//
// if(_SchemaVersion>1.2)
// {
// }
// ETC
}
catch(Exception ex)
{
_IsValid=false;
_status="Error: Signature not valid - exception processing fields:\r\n." + ex.Message + "\r\n" + ex.InnerException;
return;
}
}
}
}

View File

@@ -0,0 +1,2 @@
Infragistics.Win.UltraWinEditors.UltraDateTimeEditor, Infragistics.Win.UltraWinEditors.v5.3, Version=5.3.20053.50, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb
Infragistics.Win.UltraWinEditors.UltraOptionSet, Infragistics.Win.UltraWinEditors.v5.3, Version=5.3.20053.50, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb

View File

@@ -0,0 +1,2 @@
Infragistics.Win.UltraWinEditors.UltraOptionSet, Infragistics2.Win.UltraWinEditors.v6.2, Version=6.2.20062.1038, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb
Infragistics.Win.UltraWinEditors.UltraDateTimeEditor, Infragistics2.Win.UltraWinEditors.v6.2, Version=6.2.20062.1038, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb

View File

@@ -0,0 +1 @@
<RSAKeyValue><Modulus>vyqf5yWWe1xguhmNbxqrMQi5xdPVsFkEg5N8v2o027rcd8ciU8ZWsNDnxDO1pXqDZFDG74B+HiAbFzLxfl7goyASItWAENnGOMgebJqpqX3JLlTt20spyDGsI4K4zSsdELhT3Q2nRt34MdWu1gMN6NIcUWrYMfoiz6UEzyBczHM=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>