Esempio n. 1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            FormInputConfig finput = new FormInputConfig();

            if (finput.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            string[] add_item = { finput.type, finput.path };
            listViewInput.Items.Add(new ListViewItem(add_item));
            listViewInput.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
        }
Esempio n. 2
0
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            if (listViewInput.SelectedIndices.Count == 0)
            {
                return;
            }
            FormInputConfig finput = new FormInputConfig();

            finput.SetConfig(listViewInput.SelectedItems[0].SubItems[0].Text, listViewInput.SelectedItems[0].SubItems[1].Text);
            if (finput.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            listViewInput.SelectedItems[0].SubItems[0].Text = finput.type;
            listViewInput.SelectedItems[0].SubItems[1].Text = finput.path;
            listViewInput.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
        }