private void OnAdd_Click(object sender, EventArgs e) { using (PkAddKiteForm addKite = new PkAddKiteForm()) { Dictionary <string, string[]> domains = PkService.GetAvailableDomains(this.data.ServiceInfo.AccountId, this.data.ServiceInfo.Credentials); addKite.SetComboBox(domains); var result = addKite.ShowDialog(); if (result == DialogResult.OK) { if (PkService.AddKite(this.data.ServiceInfo.AccountId, this.data.ServiceInfo.Credentials, addKite.Kitename)) { PkKite kite = new PkKite(); kite.Domain = addKite.Kitename; kite.Secret = this.data.ServiceInfo.Secret; this.data.Kites.Add(kite.Domain, kite); this.kitePanel.AddKite(kite); this.data.Save(); } } } }
private void OnAdd_Click(object sender, EventArgs e) { using (PkAddKiteForm addKite = new PkAddKiteForm()) { Dictionary<string, string[]> domains = PkService.GetAvailableDomains(this.data.ServiceInfo.AccountId, this.data.ServiceInfo.Credentials); addKite.SetComboBox(domains); var result = addKite.ShowDialog(); if (result == DialogResult.OK) { if (PkService.AddKite(this.data.ServiceInfo.AccountId, this.data.ServiceInfo.Credentials, addKite.Kitename)) { PkKite kite = new PkKite(); kite.Domain = addKite.Kitename; kite.Secret = this.data.ServiceInfo.Secret; this.data.Kites.Add(kite.Domain, kite); this.kitePanel.AddKite(kite); this.data.Save(); } } } }