示例#1
0
        protected override void DoExecute()
        {
            FireOnStart();

            try
            {
                PrimesBigInteger modulus = m_SecondParameter;

                PrimesBigInteger from = m_From;

                while (from.CompareTo(m_To) <= 0)
                {
                    string msg;
                    try
                    {
                        PrimesBigInteger result = from.ModInverse(modulus);
                        msg = result.ToString("D");
                    }
                    catch (Exception ex)
                    {
                        msg = "-";
                    }
                    FireOnMessage(this, from, msg);
                    from = from.Add(PrimesBigInteger.One);
                }
            }
            catch (Exception ex)
            {
            }

            FireOnStop();
        }