Ignore:
Timestamp:
May 24, 2010, 12:19:44 AM (12 years ago)
Author:
Sven Rech
Message:

changed quadratic sieve presentation a litte bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/QuadraticSieve/QuadraticSieve.cs

    r1463 r1464  
    143143                    quadraticSieveQuickWatchPresentation.endTime.Text = endtime_message;
    144144                    quadraticSieveQuickWatchPresentation.timeLeft.Text = timeLeft_message;
     145                    quadraticSieveQuickWatchPresentation.factorList.Items.Clear();
     146                    quadraticSieveQuickWatchPresentation.factorInfo.Content = "Searching trivial factors!";                   
    145147                }
    146148                , null);   
     
    181183                        quadraticSieveQuickWatchPresentation.endTime.Text = endtime_message;
    182184                        quadraticSieveQuickWatchPresentation.timeLeft.Text = timeLeft_message;
     185                        quadraticSieveQuickWatchPresentation.factorInfo.Content = "";
    183186                    }
    184187                    , null);
     
    199202                        quadraticSieveQuickWatchPresentation.endTime.Text = endtime_message;
    200203                        quadraticSieveQuickWatchPresentation.timeLeft.Text = timeLeft_message;
     204                        quadraticSieveQuickWatchPresentation.factorInfo.Content = "";
    201205                    }
    202206                    , null);
     
    349353                ProgressChanged(0.9, 1.0);
    350354                GuiLogMessage("Sieving finished", NotificationLevel.Info);
     355                quadraticSieveQuickWatchPresentation.Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
     356                {                   
     357                    quadraticSieveQuickWatchPresentation.factorInfo.Content = "Found enough relations! Please wait...";
     358                }, null);
    351359                stopThreads();
    352360                yieldqueue.Clear();
     
    453461                //get one composite factor, which we want to sieve now:
    454462                BigInteger compositeFactor = factorManager.GetCompositeFactor();
     463                quadraticSieveQuickWatchPresentation.Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
     464                {
     465                    quadraticSieveQuickWatchPresentation.factorInfo.Content = "Now sieving first composite factor!";
     466                }, null);
    455467
    456468                //now start quadratic sieve on it:               
     
    485497                    MethodInfo serializeYield = msieve.GetMethod("serializeYield");
    486498                    byte[] serializedYield = (byte[])serializeYield.Invoke(null, new object[] { yield });
    487                     /*MethodInfo deserializeYield = msieve.GetMethod("deserializeYield");
    488                     yield = (IntPtr)deserializeYield.Invoke(null, new object[] { serializedYield });*/
     499                    MethodInfo deserializeYield = msieve.GetMethod("deserializeYield");
     500                    yield = (IntPtr)deserializeYield.Invoke(null, new object[] { serializedYield });
    489501
    490502                    yieldqueue.Enqueue(yield);
     
    536548        private void FactorsChanged(List<BigInteger> primeFactors, List<BigInteger> compositeFactors)
    537549        {
    538             GuiLogMessage("Factors Changed:", NotificationLevel.Debug);
    539 
    540             foreach (BigInteger pf in primeFactors)
    541                 GuiLogMessage("Prime Factor: " + pf.ToString(), NotificationLevel.Debug);
    542 
    543             foreach (BigInteger cf in compositeFactors)
    544                 GuiLogMessage("Composite Factor: " + cf.ToString(), NotificationLevel.Debug);
     550            quadraticSieveQuickWatchPresentation.Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
     551            {
     552                quadraticSieveQuickWatchPresentation.factorList.Items.Clear();
     553
     554                foreach (BigInteger pf in primeFactors)         
     555                    quadraticSieveQuickWatchPresentation.factorList.Items.Add("Prime Factor: " + pf.ToString());           
     556
     557                foreach (BigInteger cf in compositeFactors)
     558                    quadraticSieveQuickWatchPresentation.factorList.Items.Add("Composite Factor: " + cf.ToString());
     559            }, null);
    545560        }
    546561
Note: See TracChangeset for help on using the changeset viewer.