예제 #1
0
 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;
     }
 }
예제 #2
0
        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;
                }
            }
        }
예제 #3
0
        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;
        }
예제 #4
0
        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;
        }