private void comboBoxClass_SelectionChanged(object sender, SelectionChangedEventArgs e) { string selectedClass = comboBoxClass.SelectedValue.ToString(); UmlClassNode node = classes[selectedClass]; this.comboBoxMethod.ItemsSource = node.Methods.Keys; this.listBoxPreconditions.Items.Refresh(); this.listBoxPreconditions.ItemsSource = null; this.comboBoxComparator.SelectedIndex = -1; this.textBoxArgumentLeft.Text = ""; this.textBoxArgumentRight.Text = ""; }
private void comboBoxMethod_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (comboBoxClass.SelectedIndex >= 0 && comboBoxMethod.SelectedIndex >= 0) { string selectedClass = comboBoxClass.SelectedValue.ToString(); string selectedMethod = comboBoxMethod.SelectedValue.ToString(); UmlClassNode classNode = classes[selectedClass]; UmlMethodNode methodNode = classNode.Methods[selectedMethod]; this.selectedMethod = methodNode; this.selectedCondition = null; this.selectedPrecondition = null; this.selectedPostcondition = null; this.listBoxPreconditions.ItemsSource = this.selectedMethod.Preconditions; this.listBoxPreconditions.Items.Refresh(); this.listBoxPostconditions.ItemsSource = this.selectedMethod.Postconditions; this.listBoxPostconditions.Items.Refresh(); this.listBoxLinkedPreconditions.ItemsSource = this.selectedMethod.Preconditions; this.listBoxLinkedPreconditions.Items.Refresh(); } }