コード例 #1
0
        private void btnDeleteWorkspace_Click(object sender, EventArgs e)
        {
            string path = @"E:\数字工厂数据\workspace.smwu";
            FTPControllerForWorkspacceForWorkspace ftp = new FTPControllerForWorkspacceForWorkspace();

            if (ftp.Exist(path))
            {
                lblResult.Text = ftp.Delete(path).ToString();
            }
        }
コード例 #2
0
        private void btnCommitWorkspace_Click(object sender, EventArgs e)
        {
            string path = @"E:\数字工厂数据\workspace.smwu";
            FTPControllerForWorkspacceForWorkspace ftp = new FTPControllerForWorkspacceForWorkspace();

            ftp.OnCommitCompleted += Ftp_OnCommitCompleted;
            ftp.OnCommitProcess   += Ftp_OnCommitProcess;
            if (!ftp.Exist(path))
            {
                ftp.Commit(path);
            }
            else
            {
                ftp.Delete(path);
                ftp.Commit(path);
            }
        }