Exemple #1
0
 private void ProgressCallback(CompressEventArgs obj)
 {
     this.Invoke(delegate(){
         this.progressBar1.Value = (int)(obj.Progress * 100);
         this.label1.Text        = $"正在压缩:{obj.Msg}";
     });
 }
Exemple #2
0
        private static void ProgressCallback(CompressEventArgs obj)
        {
            var p     = Console.WindowWidth - 30;
            int jindu = (int)(obj.Progress * p);

            Console.WriteLine($"压缩:{obj.Msg}");
            //Console.Write($"\r压缩进度:[{"".PadLeft(jindu, '=')}{"".PadLeft(p - jindu, '_')}]({(obj.Progress * 100).ToString("0.0")}%)");
        }