Ignore:
Timestamp:
May 20, 2010, 12:35:16 PM (12 years ago)
Author:
Sven Rech
Message:

replaced all BigInteger stuff with the new BigInteger class from .net 4.0

But there are still problems with some plugins (Keysearcher, BigInteger Operations...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/PeerToPeerManager_NEW/P2PManager_KeyPattern.cs

    r1434 r1448  
    3131using System.Windows.Media;
    3232using Cryptool.Plugins.PeerToPeer.Internal;
     33using System.Numerics;
    3334
    3435/*TODO:
     
    306307                    ((P2PManagerPresentation)QuickWatchPresentation).txtTotal.Text = "" + jobsTotalAmount.ToString();
    307308                    ((P2PManagerPresentation)QuickWatchPresentation).txtInProgress.Text = "" + jobsInProgress.ToString();
    308                     ((P2PManagerPresentation)QuickWatchPresentation).txtLeft.Text = "" + new BigInteger((jobsTotalAmount - jobsInProgress - jobsFinished)).ToString();
     309                    ((P2PManagerPresentation)QuickWatchPresentation).txtLeft.Text = "" + (jobsTotalAmount - jobsInProgress - jobsFinished).ToString();
    309310                    ((P2PManagerPresentation)QuickWatchPresentation).txtFinished.Text = "" + jobsFinished.ToString();
    310311
     
    353354        {
    354355            // new Progress Chunk - Arnold 2010.02.23
    355             if (jobId.LongValue() <= Int32.MaxValue)
    356             {
    357                 int iJobId = (int)jobId.LongValue();
     356            if ((long)jobId <= Int32.MaxValue)
     357            {
     358                int iJobId = (int)jobId;
    358359                if (QuickWatchPresentation.IsVisible)
    359360                {
     
    377378        private void SetProgressChunkJobCount(BigInteger bigInteger)
    378379        {
    379             if (bigInteger.LongValue() <= Int32.MaxValue)
    380             {
    381                 int count = (int)bigInteger.LongValue();
     380            if ((long)bigInteger <= Int32.MaxValue)
     381            {
     382                int count = (int)bigInteger;
    382383                if (QuickWatchPresentation.IsVisible)
    383384                {
Note: See TracChangeset for help on using the changeset viewer.