Esempio n. 1
0
        private void cmdAdd_Click(object sender, EventArgs e)
        {
            frmEditDataSource oEdit = new frmEditDataSource();

            oEdit.oDS      = new DataSource();
            oEdit.Location = Cursor.Position;
            if (oEdit.ShowDialog() == DialogResult.OK)
            {
                ListViewItem oLvwEdit = DatasourceToLVI(oEdit.oDS);
                lvwDS.Items.Add(oLvwEdit);
            }
        }
Esempio n. 2
0
        private void EditListviewItem(ListViewItem oItem)
        {
            frmEditDataSource oEdit = new frmEditDataSource();

            oEdit.oDS      = (DataSource)oItem.Tag;
            oEdit.Location = Cursor.Position;
            if (oEdit.ShowDialog() == DialogResult.OK)
            {
                ListViewItem oLvwEdit = DatasourceToLVI(oEdit.oDS);
                lvwDS.Items.Remove(oItem);
                lvwDS.Items.Add(oLvwEdit);
            }
        }