Exemplo n.º 1
0
 /// <summary>
 /// Executes specified tool bar task.
 /// </summary>
 /// <param name="taskID">Task ID.</param>
 private void SwitchToolBarTask(string taskID)
 {
     if (taskID == "add")
     {
         wfrm_Domains_Domain frm = new wfrm_Domains_Domain(m_pVirtualServer);
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             LoadDomains();
         }
     }
     else if (taskID == "edit")
     {
         Domain domain           = (Domain)m_pDomains.SelectedItems[0].Tag;
         wfrm_Domains_Domain frm = new wfrm_Domains_Domain(m_pVirtualServer, domain);
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             LoadDomains();
         }
     }
     else if (taskID == "delete")
     {
         Domain domain = (Domain)m_pDomains.SelectedItems[0].Tag;
         if (MessageBox.Show(this, "Warning: Deleting domain '" + domain.DomainName + "', deletes all domain users and mailing lists,...!!!\nDo you want to continue?", "Delete confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             domain.Owner.Remove(domain);
             m_pDomains.SelectedItems[0].Remove();
         }
     }
     else if (taskID == "refresh")
     {
         LoadDomains();
     }
 }
Exemplo n.º 2
0
        private void m_pDomains_DoubleClick(object sender, EventArgs e)
        {
            if (m_pDomains.SelectedItems.Count > 0)
            {
                Domain domain = (Domain)m_pDomains.SelectedItems[0].Tag;

                wfrm_Domains_Domain frm = new wfrm_Domains_Domain(m_pVirtualServer, domain);
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    LoadDomains();
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Executes specified tool bar task.
        /// </summary>
        /// <param name="taskID">Task ID.</param>
        private void SwitchToolBarTask(string taskID)
        {
            if(taskID == "add"){
                wfrm_Domains_Domain frm = new wfrm_Domains_Domain(m_pVirtualServer);
                if(frm.ShowDialog(this) == DialogResult.OK){
                    LoadDomains();
                }
            }
            else if(taskID == "edit"){
                Domain domain = (Domain)m_pDomains.SelectedItems[0].Tag;
                wfrm_Domains_Domain frm = new wfrm_Domains_Domain(m_pVirtualServer,domain);
                if(frm.ShowDialog(this) == DialogResult.OK){
                    LoadDomains();
                }
            }
            else if(taskID == "delete"){
                Domain domain = (Domain)m_pDomains.SelectedItems[0].Tag;
                if(MessageBox.Show(this,"Warning: Deleting domain '" + domain.DomainName + "', deletes all domain users and mailing lists,...!!!\nDo you want to continue?","Delete confirmation",MessageBoxButtons.YesNo,MessageBoxIcon.Warning,MessageBoxDefaultButton.Button2) == DialogResult.Yes){
                    domain.Owner.Remove(domain);
                    m_pDomains.SelectedItems[0].Remove();
				}
            }
            else if(taskID == "refresh"){                
                LoadDomains();
            }
        }
Exemplo n.º 4
0
        private void m_pDomains_DoubleClick(object sender, EventArgs e)
        {
            if(m_pDomains.SelectedItems.Count > 0){
                Domain domain = (Domain)m_pDomains.SelectedItems[0].Tag;

                wfrm_Domains_Domain frm = new wfrm_Domains_Domain(m_pVirtualServer,domain);
                if(frm.ShowDialog(this) == DialogResult.OK){
                    LoadDomains();
                }
            }
        }