示例#1
0
        private void AddExeBtn_Click(object sender, EventArgs e)
        {
            AddExecutableForm form = new AddExecutableForm();

            DialogResult dr = form.ShowDialog();

            if (dr == DialogResult.OK)
            {
                string[] arr = new string[3];
                arr[0] = form.Name;
                arr[1] = form.Path;
                arr[2] = form.Arguments;
                ListViewItem itm = new ListViewItem(arr);
                ExecutablesList.Items.Add(itm);
            }
        }
示例#2
0
        private void ExecutablesList_DoubleClick(object sender, EventArgs e)
        {
            AddExecutableForm form = new AddExecutableForm();

            form.Name      = ExecutablesList.SelectedItems[0].SubItems[0].Text;
            form.Path      = ExecutablesList.SelectedItems[0].SubItems[1].Text;
            form.Arguments = ExecutablesList.SelectedItems[0].SubItems[2].Text;

            DialogResult dr = form.ShowDialog();

            if (dr == DialogResult.OK)
            {
                ExecutablesList.SelectedItems[0].SubItems[0].Text = form.Name;
                ExecutablesList.SelectedItems[0].SubItems[1].Text = form.Path;
                ExecutablesList.SelectedItems[0].SubItems[2].Text = form.Arguments;
            }
        }