public EmailForm(LicenseInfo licenseInfo) { InitializeComponent(); EmailTextBox.Text = EmailTextBox.Text.Replace("%NAME%", licenseInfo.Name); EmailTextBox.Text = EmailTextBox.Text.Replace("%LICENSE%", licenseInfo.GetLicenseText()); }
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(); }