private void btnUploadFile_Click(object sender, EventArgs e)
        {
            string filepath = this.txtFilePath.Text.Trim();
            if (filepath == "")
            {
                MessageBox.Show("请选择需要上传的文件!!");
                return;
            }
            //调用上传文件socke客户端的核心部分
            try
            {
              //  UpLoadFileSocketClient sock = new UpLoadFileSocketClient(filepath);
                UpLoadFileSocketClient sock = new UpLoadFileSocketClient(filepath, @"E:\\PDM文件服务器根目录");

               // sock.startUpLoadFile(filepath);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Exemple #2
0
        private void btnUploadFile_Click(object sender, EventArgs e)
        {
            string filepath = this.txtFilePath.Text.Trim();

            if (filepath == "")
            {
                MessageBox.Show("请选择需要上传的文件!!");
                return;
            }
            //调用上传文件socke客户端的核心部分
            try
            {
                //  UpLoadFileSocketClient sock = new UpLoadFileSocketClient(filepath);
                UpLoadFileSocketClient sock = new UpLoadFileSocketClient(filepath, @"E:\\PDM文件服务器根目录");

                // sock.startUpLoadFile(filepath);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }