private void PrepareBugData() { bugServiceWse = ServiceManager.GetService <BugService>(); comboBoxSeverity.Clear(); comboBoxPriority.Clear(); try { severities = bugServiceWse.GetSeverities(); priorities = bugServiceWse.GetPriorities(); } catch (SoapException) { Messenger.ShowIncorrectVersionError(); severities = new SeverityDTO[] {}; priorities = new PriorityDTO[] {}; } foreach (SeverityDTO severity in severities) { comboBoxSeverity.AddItem(severity.Name); } comboBoxSeverity.SelectedIndex = comboBoxSeverity.Items.Count / 2; foreach (PriorityDTO property in priorities) { comboBoxPriority.AddItem(property.Name); } comboBoxPriority.SelectedIndex = comboBoxPriority.Items.Count / 2; }