private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e) { RenameForm rform = new RenameForm(listBox1.Items[listBox1.SelectedIndex].ToString()); Rectangle r = listBox1.GetItemRectangle(listBox1.SelectedIndex); if (r.Contains(e.Location)) { if (rform.ShowDialog() == DialogResult.OK) listBox1.Items[listBox1.SelectedIndex] = rform.NewName; } }
private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e) { RenameForm rform = new RenameForm(listBox1.Items[listBox1.SelectedIndex].ToString()); Rectangle r = listBox1.GetItemRectangle(listBox1.SelectedIndex); if (r.Contains(e.Location)) { if (rform.ShowDialog() == DialogResult.OK) { listBox1.Items[listBox1.SelectedIndex] = rform.NewName; } } }
private void renameToolStripMenuItem_Click(object sender, EventArgs e) { if (listBox2.SelectedItem == null) { return; } RenameForm f = new RenameForm(listBox2.SelectedItem.ToString()); f.ShowDialog(); curDef.ParamSyntax[listBox2.SelectedIndex] = f.NewName; listBox2.Items[listBox2.SelectedIndex] = f.NewName; }
private void renameToolStripMenuItem_Click(object sender, EventArgs e) { if (listBox2.SelectedItem == null) return; RenameForm f = new RenameForm(listBox2.SelectedItem.ToString()); f.ShowDialog(); curDef.ParamSyntax[listBox2.SelectedIndex] = f.NewName; listBox2.Items[listBox2.SelectedIndex] = f.NewName; }