private void m_pToolbar_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            if (e.ClickedItem.Tag == null)
            {
                return;
            }

            if (e.ClickedItem.Tag.ToString() == "add")
            {
                wfrm_SharedFolders_RootFolder frm = new wfrm_SharedFolders_RootFolder(m_pVirtualServer);
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    LoadRoots(frm.RootID);
                }
            }
            else if (e.ClickedItem.Tag.ToString() == "edit")
            {
                SharedRootFolder root             = (SharedRootFolder)m_pRootFolders.SelectedItems[0].Tag;
                wfrm_SharedFolders_RootFolder frm = new wfrm_SharedFolders_RootFolder(m_pVirtualServer, root);
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    LoadRoots(root.ID);
                }
            }
            else if (e.ClickedItem.Tag.ToString() == "delete")
            {
                SharedRootFolder root = (SharedRootFolder)m_pRootFolders.SelectedItems[0].Tag;
                if (MessageBox.Show(this, "Are you sure you want to delete Root folder '" + root.Name + "' !", "Confirm Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                {
                    root.Owner.Remove(root);
                    LoadRoots("");
                }
            }
        }
 private void m_pRootFolders_DoubleClick(object sender, EventArgs e)
 {
     if (m_pRootFolders.SelectedItems.Count > 0)
     {
         SharedRootFolder root             = (SharedRootFolder)m_pRootFolders.SelectedItems[0].Tag;
         wfrm_SharedFolders_RootFolder frm = new wfrm_SharedFolders_RootFolder(m_pVirtualServer, root);
         if (frm.ShowDialog(this) == DialogResult.OK)
         {
             LoadRoots(root.ID);
         }
     }
 }
Пример #3
0
 private void m_pRootFolders_DoubleClick(object sender, EventArgs e)
 {
     if(m_pRootFolders.SelectedItems.Count > 0){
         SharedRootFolder root = (SharedRootFolder)m_pRootFolders.SelectedItems[0].Tag;
         wfrm_SharedFolders_RootFolder frm = new wfrm_SharedFolders_RootFolder(m_pVirtualServer,root);
         if(frm.ShowDialog(this) == DialogResult.OK){
             LoadRoots(root.ID);
         }
     }
 }
Пример #4
0
        private void m_pToolbar_ItemClicked(object sender,ToolStripItemClickedEventArgs e)
        {
            if(e.ClickedItem.Tag == null){
                return;
            }

            if(e.ClickedItem.Tag.ToString() == "add"){
                wfrm_SharedFolders_RootFolder frm = new wfrm_SharedFolders_RootFolder(m_pVirtualServer);
                if(frm.ShowDialog(this) == DialogResult.OK){
                    LoadRoots(frm.RootID);
                }
            }
            else if(e.ClickedItem.Tag.ToString() == "edit"){
                SharedRootFolder root = (SharedRootFolder)m_pRootFolders.SelectedItems[0].Tag;
                wfrm_SharedFolders_RootFolder frm = new wfrm_SharedFolders_RootFolder(m_pVirtualServer,root);
                if(frm.ShowDialog(this) == DialogResult.OK){
                    LoadRoots(root.ID);
                }
            }
            else if(e.ClickedItem.Tag.ToString() == "delete"){
                SharedRootFolder root = (SharedRootFolder)m_pRootFolders.SelectedItems[0].Tag;
                if(MessageBox.Show(this,"Are you sure you want to delete Root folder '" + root.Name + "' !","Confirm Delete",MessageBoxButtons.YesNo,MessageBoxIcon.Question,MessageBoxDefaultButton.Button2) == DialogResult.Yes){
                    root.Owner.Remove(root);
                    LoadRoots("");
                }
            }
        }