private void panelText_Click(object sender, EventArgs e) { if (!_panelText.Enabled) { return; } var selection = new ThinSelection(_channelNames) { Location = PointToScreen(new Point(_panelText.Right, _panelText.Top)) }; if (selection.ShowDialog() != DialogResult.OK) { return; } if (selection.SelectedIndex != ResetIndex) { Text = _channelNames[_selectedTextIndex = selection.SelectedIndex].Name; _panelText.BackColor = _channelNames[_selectedTextIndex].Color; } else { ResetAssignment(); } }
private void panelText_Click(object sender, EventArgs e) { if (!_panelText.Enabled) { return; } var selection = new ThinSelection(_channelNames) {Location = PointToScreen(new Point(_panelText.Right, _panelText.Top))}; if (selection.ShowDialog() != DialogResult.OK) { return; } if (selection.SelectedIndex != ResetIndex) { Text = _channelNames[_selectedTextIndex = selection.SelectedIndex].Name; _panelText.BackColor = _channelNames[_selectedTextIndex].Color; } else { ResetAssignment(); } }