Exemplo n.º 1
0
        protected override void DoExecute()
        {
            FireOnStart();

            List <PrimesBigInteger> divisors = (m_Factors != null) ? PrimesBigInteger.Divisors(m_Factors) : m_Value.Divisors();

            divisors.Sort(PrimesBigInteger.Compare);

            ControlHandler.SetPropertyValue(m_tbCalcInfo, "Visibility", Visibility.Visible);
            SetCalcInfo(string.Format(Primes.Resources.lang.WpfControls.Distribution.Distribution.numberline_tauinfo, divisors.Count, m_Value));

            foreach (var d in divisors)
            {
                m_Log.Info(d + "   ");
            }

            FireOnStop();
        }
Exemplo n.º 2
0
        protected override void DoExecute()
        {
            FireOnStart();

            ControlHandler.SetPropertyValue(m_tbCalcInfo, "Visibility", Visibility.Visible);

            List <PrimesBigInteger> divisors = (m_Factors != null) ? PrimesBigInteger.Divisors(m_Factors) : m_Value.Divisors();

            divisors.Sort(PrimesBigInteger.Compare);

            PrimesBigInteger sum = PrimesBigInteger.Zero;

            foreach (var d in divisors)
            {
                sum = sum.Add(d);
            }

            String s = String.Join(" + ", divisors.Select(i => i.ToString()).ToArray());

            m_Log.Info(s + " = " + sum);
            SetCalcInfo(string.Format(Primes.Resources.lang.WpfControls.Distribution.Distribution.numberline_rhoinfo, m_Value, sum));

            FireOnStop();
        }