AEMManager.AemInstance.Delete C# (CSharp) Method

Delete() public method

public Delete ( ) : void
return void
        public void Delete()
        {
            RegistryKey instancesKey = RegistryUtil.GetUserKey("Instances");
              instancesKey.DeleteSubKeyTree(mId);
        }

Usage Example

Example #1
0
        private void removeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AemInstance instance = this.SelectedInstanceInListview;

            if (instance == null)
            {
                return;
            }
            if (MessageBox.Show(this, "Instance '" + instance.Name + "' will be removed.", "Remove intance", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK)
            {
                instance.NotifyIcon.Visible = false;
                instance.NotifyIcon.Dispose();
                instance.NotifyIcon = null;
                instance.Delete();
                Program.InstanceList.Remove(instance);
                Program.UpdateInstanceListInViews();
            }
        }