public string commandHandle(string command, string node)
        {
            if (node.Length < 1)
            {
                mainWindow.appendConsole("Nie wybrano docelowego punktu końcowego", null, null);
                return null;
            }
            switch (command)
            {
                // do klienta
                case "resource-location":
                    string portresponse = sendCommand(node, "get-ports|", false);
                    string con_response = sendCommand(node, "get-resource-list|", false);
                    ResourceRelocationWindow relocationwindow = new ResourceRelocationWindow(this, node,portresponse,con_response,availableModules,availableConteners);
                    relocationwindow.ShowDialog();
                    return "DONE";
                // do klienta
                case "get-resource-list":
                    return sendCommand(node, command + "|", true);
                // do klienta
                case "delete-resource":
                    string conresponse = sendCommand(node, "get-resource-list|", false);
                    DropConnectionWindow deleteWindow = new DropConnectionWindow(this, conresponse, node, mainWindow, "client");
                    deleteWindow.ShowDialog();
                    return "DONE";
                // do krosownicy
                case "disable-node":
                    return sendCommand(node, command+"|",true);
                // do krosownicy
                case "close-connection":
                    string connresponse = sendCommand(node, "get-connection-list|",false);
                    DropConnectionWindow dropWindow = new DropConnectionWindow(this,connresponse,node,mainWindow,"router");
                    dropWindow.ShowDialog();
                    return "DONE";
                // do krosownicy
                case "sub-connection-HPC":
                    string port_response = sendCommand(node, "get-ports|",false);
                    string connectionresponse = sendCommand(node, "get-connection-list|",false);
                    AddConnectionWindow window = new AddConnectionWindow(this,port_response,connectionresponse,node,availableModules,availableConteners);
                    window.ShowDialog();
                    return "DONE";
                // do krosownicy
                case "get-connection-list":
                    return sendCommand(node, command + "|",true);
                // do klienta i krosownicy
                case "get-ports":
                    return sendCommand(node, command + "|",true);
                case "load-config":
                    LoadConfig(node);
                    return "DONE";
                default:
                    mainWindow.appendConsole("Stało się niemożliwe",null,null);
                    return "ERROR";

            }
        }
        public string commandHandle(string command, string node)
        {
            if (node.Length < 1)
            {
                mainWindow.appendConsole("Nie wybrano docelowego punktu końcowego", null, null);
                return null;
            }
            switch (command)
            {
                case "resource-location":
                    string portresponse = sendCommand(node, "get-ports|", false);
                    ResourceRelocationWindow relocationwindow = new ResourceRelocationWindow(this, node,portresponse);
                    relocationwindow.ShowDialog();
                    return "DONE";
                case "disable-node":
                    return sendCommand(node, command+"|",true);

                case "close-connection":
                    string connresponse = sendCommand(node, "get-connection-list|",false);

                    DropConnectionWindow dropWindow = new DropConnectionWindow(this,connresponse,node,mainWindow);
                    dropWindow.ShowDialog();
                    return "DONE";

                case "sub-connection-HPC":
                    string port_response = sendCommand(node, "get-ports|",false);
                    string connectionresponse = sendCommand(node, "get-connection-list|",false);
                    AddConnectionWindow window = new AddConnectionWindow(this,port_response,connectionresponse,node);
                    window.ShowDialog();
                    return "DONE";

                case "get-connection-list":
                    return sendCommand(node, command + "|",true);

                case "get-ports":
                    return sendCommand(node, command + "|",true);

                default:
                    mainWindow.appendConsole("Stało się niemożliwe",null,null);
                    return "ERROR";

            }
        }