void OnTextChanged(object sender, EventArgs e) { if (m_InnerFlag) { return; } Control box = sender as Control; TempAddon tempAdd = CurrentAddon; if (box.Name == "textBoxName") { tempAdd.Name = box.Text; } else if (box.Name == "textBoxPath") { tempAdd.Path = box.Text; } else if (box.Name == "comboBoxFunction") { tempAdd.Function = box.Text; } if (box.Name == "textBoxName") { m_InnerFlag = true; listBoxAddon.Items[listBoxAddon.SelectedIndex] = tempAdd; box.Focus(); m_InnerFlag = false; } }
void comboBoxType_SelectedIndexChanged(object sender, EventArgs e) { if (m_InnerFlag) { return; } TempAddon tempAdd = CurrentAddon; tempAdd.Type = (comboBoxType.SelectedItem as WrapAddonType).Type; }
void comboBoxFunction_SelectedIndexChanged(object sender, EventArgs e) { if (m_InnerFlag) { return; } TempAddon tempAdd = CurrentAddon; tempAdd.Function = comboBoxFunction.Text; }