private void BtnRegister_Click(object sender, EventArgs e) { try { bool show = false; if(string.IsNullOrEmpty(this.txtFullName.Text.Trim())) { show = true; } if(string.IsNullOrEmpty(this.txtCompanyName.Text.Trim())) { show = true; } if (string.IsNullOrEmpty(this.txtEmail.Text.Trim())) { show = true; } if (show) { MessageBox.Show("Ensure you entered all needed data. " + Environment.NewLine + "Company name, your name and your Email address is must.", "Missing Information", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } this.Cursor = System.Windows.Forms.Cursors.WaitCursor; Registration.Registration srv = new SharedCache.Registration.Registration.Registration(); srv.Url = "http://sharedcache.indexus.net/Registration.asmx"; srv.SetInstallRegistration( Environment.MachineName, this.txtFullName.Text.Trim(), this.txtCompanyName.Text.Trim(), this.txtEmail.Text.Trim(), this.cmbUsage.SelectedItem != null ? this.cmbUsage.SelectedItem.ToString() : string.Empty , this.cmbInfo.SelectedItem != null ? this.cmbInfo.SelectedItem.ToString() : string.Empty, this.ckbUpdate.Checked ); this.SetRegistryValue(); MessageBox.Show("Thank you for registration." + Environment.NewLine + "You able now to use our notifier without any limitations.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { } this.Close(); this.Cursor = System.Windows.Forms.Cursors.Default; }
private void BtnRegister_Click(object sender, EventArgs e) { try { bool show = false; if (string.IsNullOrEmpty(this.txtFullName.Text.Trim())) { show = true; } if (string.IsNullOrEmpty(this.txtCompanyName.Text.Trim())) { show = true; } if (string.IsNullOrEmpty(this.txtEmail.Text.Trim())) { show = true; } if (show) { MessageBox.Show("Ensure you entered all needed data. " + Environment.NewLine + "Company name, your name and your Email address is must.", "Missing Information", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } this.Cursor = System.Windows.Forms.Cursors.WaitCursor; Registration.Registration srv = new SharedCache.Registration.Registration.Registration(); srv.Url = "http://sharedcache.indexus.net/Registration.asmx"; srv.SetInstallRegistration( Environment.MachineName, this.txtFullName.Text.Trim(), this.txtCompanyName.Text.Trim(), this.txtEmail.Text.Trim(), this.cmbUsage.SelectedItem != null ? this.cmbUsage.SelectedItem.ToString() : string.Empty, this.cmbInfo.SelectedItem != null ? this.cmbInfo.SelectedItem.ToString() : string.Empty, this.ckbUpdate.Checked ); this.SetRegistryValue(); MessageBox.Show("Thank you for registration." + Environment.NewLine + "You able now to use our notifier without any limitations.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { } this.Close(); this.Cursor = System.Windows.Forms.Cursors.Default; }