private static ItemNode buildFtpServerListNode(AdminServer adminServer) { ItemNode ftpServerListNode = new ItemNode(); ftpServerListNode.Text = "FTP Server List"; ftpServerListNode.Name = "ftpServerList"; ftpServerListNode.ImageIndex = 3; ftpServerListNode.SelectedImageIndex = 3; ftpServerListNode.Description = "All FTP server that under the remote server administration."; return(ftpServerListNode); }
internal static ItemNode buildAdminServerNode(AdminServer adminServer) { ItemNode adminServerNode = new ItemNode(); string key = adminServer.serverName + ":" + adminServer.portNo; adminServerNode.Text = key; adminServerNode.Name = "adminServer"; adminServerNode.ImageIndex = 2; adminServerNode.SelectedImageIndex = 2; ContextMenuStrip adminTopMenu = new ContextMenuStrip(); adminServerNode.Nodes.Add(buildAdministrationNode(adminServer)); adminServerNode.Nodes.Add(buildFtpServerListNode(adminServer)); adminServerNode.ContextMenuStrip = adminTopMenu; return(adminServerNode); }
private static ItemNode buildAdministrationNode(AdminServer adminServer) { ItemNode administrationNode = new ItemNode(); administrationNode.Text = "Administration"; administrationNode.ImageIndex = 7; administrationNode.SelectedImageIndex = 7; administrationNode.Name = "administration"; administrationNode.Description = "Manage admin. server"; ItemNode adminUserListNode = new ItemNode(); adminUserListNode.Text = "Admin. Users"; adminUserListNode.ImageIndex = 6; adminUserListNode.SelectedImageIndex = 6; adminUserListNode.Name = "adminUser"; adminUserListNode.Description = "Manage admin. user"; administrationNode.Nodes.Add(adminUserListNode); return(administrationNode); }
private void disconnectServer(ItemNode adminServerNode) { ftpAdminClient.disconnectServer(adminServerNode.Text); Panel1Tree.SelectedNode = adminServerNode; rootNode.Nodes.Remove(adminServerNode); }