• 大小: 0.02M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-02-26
  • 语言: C#
  • 标签: ProgressBar  进度条  

资源简介

ProgressBar进度条

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ProgressBar
{
    class Program
    {
        static void Main(string[] args)
        {
            string filepath = @“E:\Adobe Photoshop CS6.zip“;
            string filename = Path.GetFileName(filepath);
            Console.WriteLine(“Start Reading : {0}“ filename);
            FileStream fs = new FileStream(filepath FileMode.Open);  //open file 
            long count = fs.Length;//文件长度  
            int start = 0;//开始读取
            int num = 0; //每次读取的长度
            long end = count;//剩余读取长度
            double prePercent = 0;
            ConsoleColor colorBack = Console.BackgroundColor;
            ConsoleColor colorFore = Console.ForegroundColor;
            if (count > 0)
            {
                //绘制读条背景界面
                Console.WriteLine(“********************* Loading *********************“);
                Console.BackgroundColo

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-03-22 08:18  ProgressBar\
     目录           0  2019-03-22 08:18  ProgressBar\ProgressBar\
     文件         187  2019-03-22 08:18  ProgressBar\ProgressBar\App.config
     目录           0  2019-03-22 08:18  ProgressBar\ProgressBar\bin\
     目录           0  2019-03-22 11:34  ProgressBar\ProgressBar\bin\Debug\
     目录           0  2019-03-22 08:18  ProgressBar\ProgressBar\obj\
     目录           0  2019-03-22 11:24  ProgressBar\ProgressBar\obj\Debug\
     文件        6553  2019-03-22 09:03  ProgressBar\ProgressBar\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件         430  2019-03-22 11:30  ProgressBar\ProgressBar\obj\Debug\ProgressBar.csproj.FileListAbsolute.txt
     文件        1753  2019-03-22 08:18  ProgressBar\ProgressBar\obj\Debug\ProgressBar.csprojResolveAssemblyReference.cache
     文件        6144  2019-03-22 11:24  ProgressBar\ProgressBar\obj\Debug\ProgressBar.exe
     文件       13824  2019-03-22 11:24  ProgressBar\ProgressBar\obj\Debug\ProgressBar.pdb
     文件           0  2019-03-22 08:18  ProgressBar\ProgressBar\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
     文件           0  2019-03-22 08:18  ProgressBar\ProgressBar\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
     文件           0  2019-03-22 08:18  ProgressBar\ProgressBar\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
     目录           0  2019-03-22 08:18  ProgressBar\ProgressBar\obj\Debug\TempPE\
     文件        3383  2019-03-22 11:25  ProgressBar\ProgressBar\Program.cs
     文件        2563  2019-03-22 08:18  ProgressBar\ProgressBar\ProgressBar.csproj
     目录           0  2019-03-22 08:18  ProgressBar\ProgressBar\Properties\
     文件        1360  2019-03-22 08:18  ProgressBar\ProgressBar\Properties\AssemblyInfo.cs
     文件         923  2019-03-22 08:18  ProgressBar\ProgressBar.sln
     文件       30208  2019-03-22 11:34  ProgressBar\ProgressBar.v11.suo

评论

共有 条评论