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"); }
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"); }
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; } }