예제 #1
0
        private void addNGMemberButton_Click(object sender, EventArgs e)
        {
            ListViewItem           lvi   = new ListViewItem(new string[] { "", "" });
            int                    count = listView1.Items.Count;
            NGCollectionEditDialog ngced = new NGCollectionEditDialog();

            ngced.ComboBoxSet = lvi.SubItems[0].Text;
            ngced.Conditions  = lvi.SubItems[1].Text;
            ngced.Owner       = this;
            ngced.ShowDialog(this);
            lvi.SubItems[0].Text = ngced.Type.ToString();
            lvi.SubItems[1].Text = ngced.Conditions;
            listView1.Items.Add(lvi);
        }
예제 #2
0
        private void listView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count <= 0)
            {
                return;
            }
            ListViewItem           lvi   = this.listView1.SelectedItems[0];
            NGCollectionEditDialog ngced = new NGCollectionEditDialog();

            ngced.ComboBoxSet = lvi.SubItems[0].Text;
            ngced.Conditions  = lvi.SubItems[1].Text;
            ngced.Owner       = this;
            ngced.ShowDialog(this);
            listView1.SelectedItems[0].SubItems[0].Text = ngced.Type.ToString();
            listView1.SelectedItems[0].SubItems[1].Text = ngced.Conditions;
            return;
        }