Esempio n. 1
0
        private void Factorize(PrimesBigInteger value)
        {
            ClearInfoPanel();
            string inputvalue = m_Integer.ToString();

            if (lblInput.ToolTip == null)
            {
                lblInput.ToolTip = new ToolTip();
            }
            (lblInput.ToolTip as ToolTip).Content = StringFormat.FormatString(inputvalue, 80);

            if (inputvalue.Length > 7)
            {
                inputvalue = inputvalue.Substring(0, 6) + "...";
            }
            System.Windows.Documents.Underline ul = new Underline();

            if (CurrentFactorizer == _bruteforce)
            {
                BF.lblInput = inputvalue;
            }
            else
            {
                QS.lblInput = inputvalue;
            }

            UpdateMessages();

            CurrentFactorizer.Execute(value);
        }
Esempio n. 2
0
        public void OnFactorizationCancel()
        {
            CurrentFactorizer.CancelFactorization();

            if (CurrentFactorizer == _bruteforce)
            {
                BF.FactorizationInfo = string.Format(Primes.Resources.lang.WpfControls.Factorization.Factorization.fac_resultabortedtime, TimeString(_bruteforce.Needs));
            }
            else
            {
                QS.FactorizationInfo = Primes.Resources.lang.WpfControls.Factorization.Factorization.fac_resultaborted;
            }

            UpdateMessages();
        }