public void Setup() { try { m_TNTClient = new TNTServicesClient("BasicHttpBinding_ITNTServicesContracts"); Assert.IsNotNull(m_TNTClient); Assert.IsTrue(m_TNTClient.TestConnectivity()); } catch (Exception ex) { Assert.Fail(ex.Message); } }
private void RegistrationButton_Click(object sender, EventArgs e) { TNTServicesClient client = new TNTServicesClient("BasicHttpBinding_ITNTServicesContracts"); User user = new Objects.User() { Address = StreetAddressTextBox.Text, City = CityTextBox.Text, EmailAddress = EmailAddressTextBox.Text, Name = NameTextBox.Text, PhoneNumber = PhoneNumberTextBox.Text, State = StateTextBox.Text, Zip = ZipTextBox.Text }; Objects.License license = client.RequestLicense(user, new Guid(ApplicationIDComboBox.SelectedItem.ToString())); Clipboard.SetText(license.Key); MessageBox.Show(this, string.Format("{0}\n\nAlso copied to clipboard.", license.Key), "License Key"); }