private void toolStripButtonNewFolder_Click(object sender, EventArgs e) { NewFileBox form = new NewFileBox("新建文件夹"); form.ShowDialog(); while (true) { if (cancled) { cancled = false; break; } else if (NewFileBox.newName != null) { string msg = "command,NewFile,directory," + toolStripTextBoxCurDir.Text + "," + NewFileBox.newName; form.Close(); Send_forFileOperation(msg); if (Clients.sr_op.ReadLine() == "success") { MessageBox.Show("创建成功!"); RefreshNode(toolStripTextBoxCurDir.Text); } else { MessageBox.Show("创建失败!"); } break; } } }
private void word文档ToolStripMenuItem_Click(object sender, EventArgs e) { NewFileBox form = new NewFileBox("新建文本文档"); form.ShowDialog(); while (true) { if (cancled) { cancled = false; break; } else if (NewFileBox.newName != null) { string msg = "command,NewFile,doc," + toolStripTextBoxCurDir.Text + "," + NewFileBox.newName; form.Close(); Send_forFileOperation(msg); if (Clients.sr_op.ReadLine() == "success") { MessageBox.Show("创建成功!"); RefreshNode(toolStripTextBoxCurDir.Text); } else { MessageBox.Show("创建失败!"); } break; } } }