private void m_pDomains_DoubleClick(object sender, EventArgs e)
 {
     if (this.m_pDomains.SelectedItems.Count > 0)
     {
         Domain            domain            = (Domain)this.m_pDomains.SelectedItems[0].Tag;
         AddEditDomainForm addEditDomainForm = new AddEditDomainForm(this.m_pVirtualServer, domain);
         if (addEditDomainForm.ShowDialog(this) == DialogResult.OK)
         {
             this.LoadDomains();
         }
     }
 }
 private void SwitchToolBarTask(string taskID)
 {
     if (taskID == "add")
     {
         AddEditDomainForm addEditDomainForm = new AddEditDomainForm(this.m_pVirtualServer);
         if (addEditDomainForm.ShowDialog(this) == DialogResult.OK)
         {
             this.LoadDomains();
             return;
         }
     }
     else if (taskID == "edit")
     {
         Domain            domain             = (Domain)this.m_pDomains.SelectedItems[0].Tag;
         AddEditDomainForm addEditDomainForm2 = new AddEditDomainForm(this.m_pVirtualServer, domain);
         if (addEditDomainForm2.ShowDialog(this) == DialogResult.OK)
         {
             this.LoadDomains();
             return;
         }
     }
     else if (taskID == "delete")
     {
         Domain domain2 = (Domain)this.m_pDomains.SelectedItems[0].Tag;
         if (MessageBox.Show(this, "Warning: Deleting domain '" + domain2.DomainName + "', deletes all domain users and mailing lists,...!!!\nDo you want to continue?", "Delete confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             domain2.Owner.Remove(domain2);
             this.m_pDomains.SelectedItems[0].Remove();
             return;
         }
     }
     else if (taskID == "refresh")
     {
         this.LoadDomains();
     }
 }