private void ParseMethods(XmlNodeList methods) { this.methods = new Dictionary <string, UmlMethodNode>(); foreach (XmlNode node in methods) { UmlMethodNode method = new UmlMethodNode(node); string methodName = method.Name; this.methods.Add(methodName, method); } }
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(); } }