private void servicesListBox_SelectedIndexChanged(object sender, EventArgs e) { var ss = ServiceRegistry.Default[servicesListBox.SelectedIndex]; serviceUiPanel.Controls.Clear(); var ssv = new ServiceSettingsView(ss); ssv.Dock = DockStyle.Fill; serviceUiPanel.Controls.Add(ssv); }
private void servicesListBox_SelectedIndexChanged(object sender, EventArgs e) { selectedInstance = services[servicesListBox.SelectedIndex]; selectedService = selectedInstance.Service; serviceUiPanel.Controls.Clear(); var ssv = new ServiceSettingsView(selectedInstance) { Dock = DockStyle.Fill }; serviceUiPanel.Controls.Add(ssv); serviceNameLabel.Text = selectedService.Info.Name; serviceDescriptionLabel.Text = selectedService.Info.Description; serviceAuthorLabel.Text = selectedService.Info.Author; serviceWebsiteLabel.Text = selectedService.Info.Website.ToString(); serviceVersionLabel.Text = selectedInstance.Assembly.GetName().Version.ToString(); }
private void servicesListBox_SelectedIndexChanged(object sender, EventArgs e) { selectedInstance = services[servicesListBox.SelectedIndex]; selectedService = selectedInstance.Service; serviceUiPanel.Controls.Clear(); if (selectedService.AsAuthenticatable() != null) { var ssv = new ServiceSettingsView(selectedInstance) { Dock = DockStyle.Fill }; serviceUiPanel.Controls.Add(ssv); } else { serviceUiPanel.Controls.Add(selectedService.GetSettingsControl()); } serviceNameLabel.Text = selectedService.Info.Name; serviceDescriptionLabel.Text = selectedService.Info.Description; serviceAuthorLabel.Text = selectedService.Info.Author; serviceWebsiteLabel.Text = selectedService.Info.Website.ToString(); }