Exemplo n.º 1
0
		public EmailForm(LicenseInfo licenseInfo)
		{
			InitializeComponent();

			EmailTextBox.Text = EmailTextBox.Text.Replace("%NAME%", licenseInfo.Name);
			EmailTextBox.Text = EmailTextBox.Text.Replace("%LICENSE%", licenseInfo.GetLicenseText());
		}
Exemplo n.º 2
0
		private void OkButton_Click(object sender, EventArgs e)
		{
			LicenseInfo newLicense = new LicenseInfo();
			newLicense.Name = NameTextBox.Text;
			newLicense.Email = EmailTextBox.Text;
			newLicense.NumUsers = int.Parse(NumUsersTextBox.Text);
			newLicense.EndDate = DateTime.Now.AddYears(1);
			newLicense.Floating = FloatingCheckBox.Checked;

			LicenseInfo.Licenses.Add(newLicense);

			this.Close();
		}