Beispiel #1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            SiteSetForm fm = new SiteSetForm(sites, null);

            if (DialogResult.OK == fm.ShowDialog())
            {
                sites.Add(fm.site);
                RefreshList();
            }
        }
Beispiel #2
0
        private void buttonModify_Click(object sender, EventArgs e)
        {
            if (listViewSites.SelectedItems.Count == 0)
            {
                return;
            }
            uint num = Convert.ToUInt32(listViewSites.SelectedItems[0].Text);
            Site st;

            if (sites.Get(num, out st))
            {
                SiteSetForm fm = new SiteSetForm(sites, st);
                if (DialogResult.OK == fm.ShowDialog())
                {
                    sites.Delete(num);
                    sites.Add(fm.site);
                    RefreshList();
                }
            }
        }