Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
        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();
            }
        }