Exemplo n.º 1
0
        void fileHashMaker_HashBlockProcessed(object sender, HasherEventArgs e)
        {
            int koef;
            string format;
            if (e.StreamBytes > 1000000)
            {
                koef = 1000000;
                format = "{0} of {1}MB Progress";
            }
            else
            {
                koef = 1000;
                format = "{0} of {1}KB Progress";
            }

            Console.Title = string.Format(format, e.BytesProcessed / koef, e.StreamBytes / koef);
        }
Exemplo n.º 2
0
 protected void OnHashComputed(HasherEventArgs e)
 {
     if (HashComputed != null)
     {
         HashComputed(this, e);
     }
 }
Exemplo n.º 3
0
 protected virtual void OnHashBlockProcessed(HasherEventArgs e)
 {
     if (HashBlockProcessed != null)
     {
         HashBlockProcessed(this, e);
     }
 }