Exemplo n.º 1
0
        private void deleteCheckedToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (ListViewItem item in profile_list.CheckedItems)
            {
                Utils.NetworkProfile profile = new Utils.NetworkProfile();
                profile.Name        = item.Text;
                profile.Description = item.SubItems[1].Text;
                switch (item.SubItems[2].Text)
                {
                case "Public":
                    profile.Category = 0;
                    break;

                case "Private":
                    profile.Category = 1;
                    break;

                case "Domain":
                    profile.Category = 2;
                    break;
                }
                profile.Managed         = item.SubItems[3].Text == "True" ? true : false;
                profile.SubKey          = item.SubItems[4].Text;
                profile.SignatureSubKey = item.SubItems[5].Text;
                profile.Delete();
            }
            ListProfiles();
        }