private void confValueBox_TextChanged(object sender, EventArgs e) { if (this.configComboBox.Text == "" || this.configComboBox.SelectedItem == null || this.configList == null) { return; } string configName = this.configComboBox.SelectedItem.ToString(); if (configName != "") { int configIndex; for (configIndex = 0; configIndex < this.configList.Count; configIndex++) { if (this.configList[configIndex].name == configName) { break; } } if (configIndex < this.configList.Count) { if (this.configList[configIndex].value == this.confValueBox.Text) { return; } this.configList[configIndex].value = this.confValueBox.Text; } else { QScriptEditor.conftype config = new QScriptEditor.conftype(configName, this.confValueBox.Text); this.configList.Add(config); } isConfigChanged = true; } }
private void configComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (this.configComboBox.SelectedIndex == -1) { this.confValueBox.Text = ""; return; } if (QScriptEditor.configList != null) { QScriptEditor.conftype conf = this.configList.Find(c => c.name == this.configComboBox.SelectedItem.ToString()); if (conf != null) { this.confValueBox.Text = conf.value; } } }