private void OnSystemDiscovered(DiscoveredSystem newSystem) { RemoteSystemEntry newEntry = new RemoteSystemEntry(); newEntry.RemoteSystem = newSystem; remoteClientList.Items.Add(newEntry); }
private void remoteClientList_SelectionChanged(object sender, SelectionChangedEventArgs e) { RemoteSystemEntry selectedItem = remoteClientList.SelectedItem as RemoteSystemEntry; addressBox.Text = selectedItem.RemoteSystem.GetName(); Array systemRoleValues = Enum.GetValues(typeof(SystemRole)); for (int i = 0; i < systemRoleValues.Length; ++i) { if ((SystemRole)systemRoleValues.GetValue(i) == selectedItem.RemoteSystem.GetRole()) { roleComboBox.SelectedIndex = i; break; } } }