コード例 #1
0
        private void SelectBtn_Click(object sender, EventArgs e)
        {
            foreach (Panel p in Derma.GetPanels())
            {
                if (p.varname == this.TEntry.Text)
                {
                    Derma.SetSelected(p);
                    Derma.Repaint();
                    return;
                }
            }

            MessageBox.Show("No panel exists with the variable name '" + this.TEntry.Text + "'.", "Panel not found");
        }
コード例 #2
0
        private void PanelList_DoubleClick(object sender, EventArgs e)
        {
            if (this.PanelList.SelectedItem == null)
            {
                return;
            }

            foreach (Panel p in Derma.GetPanels())
            {
                if (p.varname == this.PanelList.SelectedItem.ToString())
                {
                    Derma.SetSelected(p);
                    Derma.Repaint();
                    return;
                }
            }

            MessageBox.Show("No panel exists with the variable name '" + this.TEntry.Text + "'.", "Panel not found");
        }
コード例 #3
0
        private void TEntry_KeyPress(object sender, KeyPressEventArgs e)
        {
            if ((int)e.KeyChar == 13)
            {
                foreach (Panel p in Derma.GetPanels())
                {
                    if (p.varname == this.TEntry.Text)
                    {
                        Derma.SetSelected(p);
                        Derma.Repaint();
                        e.Handled = true;
                        return;
                    }
                }

                MessageBox.Show("No panel exists with the variable name '" + this.TEntry.Text + "'.", "Panel not found");
                return;
            }
        }