Ejemplo n.º 1
0
        private void btnSelect_Click(object sender, EventArgs e)
        {
            if (rbLoadJSON.Checked)
            {
                DialogResult dr = openFileDialog1.ShowDialog();
                if (dr == DialogResult.OK)
                {
                    List <ListViewItem> items = new List <ListViewItem>();
                    foreach (string file in openFileDialog1.FileNames)
                    {
                        ListViewItem item = new ListViewItem(file);
                        items.Add(item);
                    }

                    lvSelection.BeginUpdate();
                    lvSelection.Items.AddRange(items.ToArray());
                    lvSelection.Sort();
                    lvSelection.EndUpdate();
                }
            }
            else if (rbRunQueries.Checked)
            {
                fmQuerySelect       prompt = new fmQuerySelect(lvSelection.Items);
                List <ListViewItem> items  = (prompt.ShowDialog());
                foreach (ListViewItem i in items)
                {
                    lvSelection.Items.Add(i);
                }
            }
        }
Ejemplo n.º 2
0
        private void btnSelect_Click(object sender, EventArgs e)
        {
            if (rbLoadJSON.Checked)
            {
                DialogResult dr = openFileDialog1.ShowDialog();
                if (dr == DialogResult.OK)
                {
                    List<ListViewItem> items = new List<ListViewItem>();
                    foreach (string file in openFileDialog1.FileNames)
                    {
                        ListViewItem item = new ListViewItem(file);
                        items.Add(item);
                    }

                    lvSelection.BeginUpdate();
                    lvSelection.Items.AddRange(items.ToArray());
                    lvSelection.Sort();
                    lvSelection.EndUpdate();
                }
            }
            else if (rbRunQueries.Checked)
            {
                fmQuerySelect prompt = new fmQuerySelect(lvSelection.Items);
                List<ListViewItem> items = (prompt.ShowDialog());
                foreach (ListViewItem i in items)
                {
                    lvSelection.Items.Add(i);
                }
            }
        }