private void m_pServers_DoubleClick(object sender, EventArgs e) { if (m_pServers.SelectedItems.Count > 0) { VirtualServer server = (VirtualServer)m_pServers.SelectedItems[0].Tag; wfrm_VirtualServers_VirtualServer frm = new wfrm_VirtualServers_VirtualServer(m_pServer, server); if (frm.ShowDialog(this) == DialogResult.OK) { LoadVirtualServers(); // Refresh Tree "Virtual Servers" node. m_pFrmMain.LoadVirtualServers(m_pVirtualServersNode, m_pServer); } } }
private void m_pToolbar_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { if (e.ClickedItem.Tag == null) { return; } if (e.ClickedItem.Tag.ToString() == "add") { wfrm_VirtualServers_VirtualServer frm = new wfrm_VirtualServers_VirtualServer(m_pServer); if (frm.ShowDialog(this) == DialogResult.OK) { LoadVirtualServers(); // Refresh Tree "Virtual Servers" node. m_pFrmMain.LoadVirtualServers(m_pVirtualServersNode, m_pServer); } } else if (e.ClickedItem.Tag.ToString() == "edit") { VirtualServer server = (VirtualServer)m_pServers.SelectedItems[0].Tag; wfrm_VirtualServers_VirtualServer frm = new wfrm_VirtualServers_VirtualServer(m_pServer, server); if (frm.ShowDialog(this) == DialogResult.OK) { LoadVirtualServers(); // Refresh Tree "Virtual Servers" node. m_pFrmMain.LoadVirtualServers(m_pVirtualServersNode, m_pServer); } } else if (e.ClickedItem.Tag.ToString() == "delete") { VirtualServer server = (VirtualServer)m_pServers.SelectedItems[0].Tag; if (MessageBox.Show(this, "Are you sure you want to delete Virtual server '" + server.Name + "' !", "Confirm Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes) { server.Owner.Remove(server); LoadVirtualServers(); // Refresh Tree "Virtual Servers" node. m_pFrmMain.LoadVirtualServers(m_pVirtualServersNode, m_pServer); } } }
private void m_pToolbar_ItemClicked(object sender,ToolStripItemClickedEventArgs e) { if(e.ClickedItem.Tag == null){ return; } if(e.ClickedItem.Tag.ToString() == "add"){ wfrm_VirtualServers_VirtualServer frm = new wfrm_VirtualServers_VirtualServer(m_pServer); if(frm.ShowDialog(this) == DialogResult.OK){ LoadVirtualServers(); // Refresh Tree "Virtual Servers" node. m_pFrmMain.LoadVirtualServers(m_pVirtualServersNode,m_pServer); } } else if(e.ClickedItem.Tag.ToString() == "edit"){ VirtualServer server = (VirtualServer)m_pServers.SelectedItems[0].Tag; wfrm_VirtualServers_VirtualServer frm = new wfrm_VirtualServers_VirtualServer(m_pServer,server); if(frm.ShowDialog(this) == DialogResult.OK){ LoadVirtualServers(); // Refresh Tree "Virtual Servers" node. m_pFrmMain.LoadVirtualServers(m_pVirtualServersNode,m_pServer); } } else if(e.ClickedItem.Tag.ToString() == "delete"){ VirtualServer server = (VirtualServer)m_pServers.SelectedItems[0].Tag; if(MessageBox.Show(this,"Are you sure you want to delete Virtual server '" + server.Name + "' !","Confirm Delete",MessageBoxButtons.YesNo,MessageBoxIcon.Question,MessageBoxDefaultButton.Button2) == DialogResult.Yes){ server.Owner.Remove(server); LoadVirtualServers(); // Refresh Tree "Virtual Servers" node. m_pFrmMain.LoadVirtualServers(m_pVirtualServersNode,m_pServer); } } }
private void m_pServers_DoubleClick(object sender, EventArgs e) { if(m_pServers.SelectedItems.Count > 0){ VirtualServer server = (VirtualServer)m_pServers.SelectedItems[0].Tag; wfrm_VirtualServers_VirtualServer frm = new wfrm_VirtualServers_VirtualServer(m_pServer,server); if(frm.ShowDialog(this) == DialogResult.OK){ LoadVirtualServers(); } } }