Ejemplo 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_MailingList frm = new wfrm_MailingList(m_pVirtualServer);
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             LoadMailingLists(frm.MailingListID);
         }
     }
     else if (taskID == "edit")
     {
         MailingList      mailingList = (MailingList)m_pMailingLists.SelectedItems[0].Tag;
         wfrm_MailingList frm         = new wfrm_MailingList(m_pVirtualServer, mailingList);
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             LoadMailingLists(frm.MailingListID);
         }
     }
     else if (taskID == "delete")
     {
         MailingList mailingList = (MailingList)m_pMailingLists.SelectedItems[0].Tag;
         if (MessageBox.Show(this, "Are you sure you want to delete Mailing List '" + mailingList.Name + "' !", "Confirm Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             mailingList.Owner.Remove(mailingList);
             m_pMailingLists.SelectedItems[0].Remove();
         }
     }
     else if (taskID == "refresh")
     {
         LoadMailingLists("");
     }
 }
Ejemplo n.º 2
0
 private void m_pMailingLists_DoubleClick(object sender, EventArgs e)
 {
     if (m_pMailingLists.SelectedItems.Count > 0)
     {
         MailingList      mailingList = (MailingList)m_pMailingLists.SelectedItems[0].Tag;
         wfrm_MailingList frm         = new wfrm_MailingList(m_pVirtualServer, mailingList);
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             LoadMailingLists(frm.MailingListID);
         }
     }
 }
Ejemplo 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_MailingList frm = new wfrm_MailingList(m_pVirtualServer);
				if(frm.ShowDialog(this) == DialogResult.OK){
                    LoadMailingLists(frm.MailingListID);
                }
            }
            else if(taskID == "edit"){
                MailingList mailingList = (MailingList)m_pMailingLists.SelectedItems[0].Tag;
                wfrm_MailingList frm = new wfrm_MailingList(m_pVirtualServer,mailingList);
				if(frm.ShowDialog(this) == DialogResult.OK){
                    LoadMailingLists(frm.MailingListID);
                }
            }
            else if(taskID == "delete"){
                MailingList mailingList = (MailingList)m_pMailingLists.SelectedItems[0].Tag;
                if(MessageBox.Show(this,"Are you sure you want to delete Mailing List '" + mailingList.Name + "' !","Confirm Delete",MessageBoxButtons.YesNo,MessageBoxIcon.Question,MessageBoxDefaultButton.Button2) == DialogResult.Yes){
                    mailingList.Owner.Remove(mailingList);
                    m_pMailingLists.SelectedItems[0].Remove();
                }
            }
            else if(taskID == "refresh"){                
                LoadMailingLists("");
            }
        }
Ejemplo n.º 4
0
        private void m_pMailingLists_DoubleClick(object sender, EventArgs e)
        {
            if(m_pMailingLists.SelectedItems.Count > 0){
                MailingList mailingList = (MailingList)m_pMailingLists.SelectedItems[0].Tag;
                wfrm_MailingList frm = new wfrm_MailingList(m_pVirtualServer,mailingList);
				if(frm.ShowDialog(this) == DialogResult.OK){
                    LoadMailingLists(frm.MailingListID);
                }
            }
        }