Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

kiasta

@kiasta
About
Posts
5
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Progress Bar makes copying painfully slow, a little help please?
    K kiasta

    Ah OK I see now what you mean, thanks for the clarification!

    C# design help question

  • Progress Bar makes copying painfully slow, a little help please?
    K kiasta

    The main objective is to compress the files into a container, but I want to at least be able to copy files with some type of progress notification at the very least first before I start making an algorithm for compression. Thanks for the source I'll study it and try to make something work.

    C# design help question

  • Progress Bar makes copying painfully slow, a little help please?
    K kiasta

    Hmm OK that makes some sense, but why would copying it inside the UI make any difference? Without the progress bar the files copy very fast, almost instantly. I don't really understand, I guess. Is the progress bar really that resource intensive?

    C# design help question

  • Progress Bar makes copying painfully slow, a little help please?
    K kiasta

    Thanks for the reply! I will definitely look into that.

    C# design help question

  • Progress Bar makes copying painfully slow, a little help please?
    K kiasta

    I've implemented a progress bar to my application but it makes the file copy process painfully slow whereas without the progress bar the copy is very fast. I know without the progress bar it only takes a few seconds to copy a 10 megabyte file but with the progress bar it takes more than a minute. What am I doing wrong?

    namespace Compression_Util
    {
    class DropBox
    {
    private object sender;
    private EventArgs e;
    private DragEventArgs de;
    private Design zip;
    private string hover;
    private string[] files;
    private string filetype;

        public DropBox(object sender, DragEventArgs de, Design zip, string hover)
        {
            this.sender = sender;
            this.de = de;
            this.zip = zip;
            this.hover = hover;
            this.Hover();
        }
    
        public DropBox(object sender, EventArgs e, Design zip, string hover)
        {
            this.sender = sender;
            this.e = e;
            this.zip = zip;
            this.hover = hover;
            this.Hover();
        }
    
        private void InitializeProgressBar(int fileSize)
        {
            zip.DropProgress.Visible = true;
            zip.DropProgress.Minimum = sizeof(Byte);
            zip.DropProgress.Step = sizeof(Byte);
            zip.DropProgress.Maximum = fileSize;
        }
    
        private void DeInitializeProgressBar()
        {
            zip.DropProgress.Invalidate();
            zip.DropProgress.Visible = false;
        }
    
        private void IncrementProgressBar()
        {
            zip.DropProgress.PerformStep();
        }
    
        private void CreateFile(string read, string write)
        {
            try
            {
                FileStream fileStreamReader = new FileStream(read, FileMode.Open, FileAccess.Read);
                FileStream fileStreamWriter = new FileStream(write, FileMode.Create, FileAccess.ReadWrite);
                BinaryReader binaryReader = new BinaryReader(fileStreamReader);
                BinaryWriter binaryWriter = new BinaryWriter(fileStreamWriter);
                int position = 0;
                int length = (int)binaryReader.BaseStream.Length;
                InitializeProgressBar(length);
                while (position < length)
                {
                    Byte line = binaryReader.ReadByte();
                    binaryWriter.Write(line);
                    position += sizeof(Byte);
                    Increm
    
    C# design help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups