예제 #1
0
        public PrimitivRootControl()
        {
            InitializeComponent();
            this.OnStart    += new VoidDelegate(PrimitivRootControl_OnStart);
            this.OnStop     += new VoidDelegate(PrimitivRootControl_OnStop);
            validator        = new BigIntegerMinValueMaxValueValidator(null, MIN, MAX);
            log.OverrideText = true;
            int mersenneexp = mersenneseed[new Random().Next(mersenneseed.Length - 1)];

            tbInput.Text  = PrimesBigInteger.Random(2).Add(PrimesBigInteger.Three).NextProbablePrime().ToString();
            tbInput.Text += ", 2^" + mersenneexp + "-1";
            PrimesBigInteger rangeval = PrimesBigInteger.Random(2).Add(PrimesBigInteger.Three);

            tbInput.Text += ", " + rangeval.ToString() + ":" + rangeval.Add(PrimesBigInteger.Ten).ToString();

            rndGenerate      = new Random((int)(DateTime.Now.Ticks % int.MaxValue));
            m_JumpLockObject = new object();
        }