private void Server_DataReceived(object sender, SimpleTCP.Message e)
{
/*textBox3.Invoke((MethodInvoker)delegate () {
* textBox3.Text += e.MessageString;
* e.Reply(string.Format("You said: {0}" , e.MessageString));
* }
* );*/
//Корень сервера
textBox3.Invoke((MethodInvoker) delegate() {
textBox3.Text += e.MessageString;
string g = e.MessageString;
g = g.Substring(0, g.Length - 1);
string gh = "", d = "";
DirectoryInfo dir = new DirectoryInfo(g);
foreach (var item in dir.GetDirectories())
{
gh += item.Name + " ";
foreach (var it in item.GetDirectories())
{
d += it.Name + "";
}
}
e.Reply(string.Format(gh + d, e.MessageString));
}
);
}