コード例 #1
0
ファイル: UpdateForm.cs プロジェクト: mnazrii/klinik
 public static void UploadDownloadProgress(Object sender, FileDataTransferEventArgs e)
 {
     // print a dot
     Console.Write(".");
     // it's ok to go forward
     e.Cancel = false;
 }
コード例 #2
0
 static void UploadDownloadProgress(Object sender, FileDataTransferEventArgs e)
 {
     // print a dot
     System.Diagnostics.Debug.WriteLine(e.PercentageProgress);
     // Need to show this on a label or return to front end somehow
     ProgressInformer.Progress = e.PercentageProgress.ToString();
     e.Cancel = false;
 }
コード例 #3
0
        private void FileOperationProgressChangedAsyncHandler(object sender, FileDataTransferEventArgs e)
        {
            var ctx = e.CustomnContext as BaseFileEntryDataTransferAsyncContext;

            // define the thread
            ThreadPool.QueueUserWorkItem((object state) =>
            {
                // change the transferevent args
                var eAsync = e.Clone() as FileDataTransferEventArgs;
                ctx.ProgressCallback(sender, eAsync);
            });
        }
コード例 #4
0
        private void FileOperationProgressChangedAsyncHandler(object sender, FileDataTransferEventArgs e)
        {
            var ctx = e.CustomnContext as BaseFileEntryDataTransferAsyncContext;

            // define the thread
            ThreadPool.QueueUserWorkItem((object state) =>
                                             {
                                                 // change the transferevent args
                                                 var eAsync = e.Clone() as FileDataTransferEventArgs;
                                                 ctx.ProgressCallback(sender, eAsync);
                                             });
        }
        public void OnUploadProgressChanged(object sender, FileDataTransferEventArgs e)
        {
            UploadProgress = (byte)e.PercentageProgress;

            e.Cancel = Cancel;
        }