public void AddTextGetResult(TextGetResult result) { if (built) { if (textBox != null) { textBox.TextChanged -= TextBox_TextChanged; textBox.Text = result.Value; textBox.TextChanged += TextBox_TextChanged; } if (comboBox != null) { comboBox.SelectionChanged -= ComboBox_SelectionChanged; comboBox.SelectedItem = result.Value; comboBox.SelectionChanged += ComboBox_SelectionChanged; } } textGetResult = result; }
bool GetResponse_ChildIsTextValue(XmlNode xmlNode, TreeViewItem tvNode, Object request) { String requestString = request as String; if (xmlNode.HasChildNodes) { if (xmlNode.ChildNodes.Count == 1 && xmlNode.ChildNodes[0].NodeType == XmlNodeType.Text) { TextGetResult command = new TextGetResult(); command.Value = xmlNode.FirstChild.Value; ControlBuilder controlBuilder = CreateOrModifyControlBuilder(tvNode); controlBuilder.AddTextGetResult(command); controlBuilder.getCommand = requestString; return(true); } } return(false); }