Beispiel #1
0
        private void GormimFinal(int FindGormimFromTempNumber)
        {
            int  IndexOfRisonimList = 0;
            bool Rishoni            = false;

            do
            {
                try
                {
                    if (FindGormimFromTempNumber % ListOfRisonimNumbersUntilSqrtNumberFromUser[IndexOfRisonimList] == 0)
                    {
                        FinalListOfGormim.Add(ListOfRisonimNumbersUntilSqrtNumberFromUser[IndexOfRisonimList]);
                        FindGormimFromTempNumber = FindGormimFromTempNumber / ListOfRisonimNumbersUntilSqrtNumberFromUser[IndexOfRisonimList];
                        Rishoni = Calc.CheckingRishoni(FindGormimFromTempNumber);
                    }
                    else
                    {
                        IndexOfRisonimList++;
                    }
                }
                catch (Exception ex)
                {
                    WriteLogsForStatistics.WriteLog("Exception : " + ex.Message);
                }
            }while (!Rishoni);
            FinalListOfGormim.Add(FindGormimFromTempNumber);
        }
Beispiel #2
0
        private static string ConvertListToString(List <int> GormimRishoniim)
        {
            string s = "";

            for (int i = 0; i < GormimRishoniim.Count; i++)
            {
                s += Convert.ToString(GormimRishoniim[i]) + " ";
            }
            //  log.Infoformat ("There are: " + GormimRishoniim.Count + " Gormim");
            WriteLogsForStatistics.WriteLog("The Gormim are: " + s);
            return(s);
        }
Beispiel #3
0
        private void FillRishonim(double SqrtNumberFromUser)
        {
            for (int IndexUntilSqrtNumberFromUser = 2; IndexUntilSqrtNumberFromUser <= SqrtNumberFromUser; IndexUntilSqrtNumberFromUser++)
            {
                bool NumberIsRishoni = Calc.CheckingRishoni(IndexUntilSqrtNumberFromUser);

                if (NumberIsRishoni)
                {
                    ListOfRisonimNumbersUntilSqrtNumberFromUser.Add(IndexUntilSqrtNumberFromUser);// Risonim numbers until the sqer (NumberFromUser)
                }
            }
            WriteLogsForStatistics.WriteLog(String.Format("The list till squre {0} has {1} arguments", SqrtNumberFromUser, ListOfRisonimNumbersUntilSqrtNumberFromUser.Count));
        }
Beispiel #4
0
 private void button1_Click(object sender, EventArgs e)
 {
     //  var settins = Application.p;
     //long a = Properties.Settings.Default.max2;
     log.InfoFormat("david's applilication started step {0}", stepIndex++);
     if (inputValidation())
     {
         ResultOfExercise();
         WriteLogsForStatistics.WriteLog("User search:" + textBox1.Text);
     }
     else
     {
         label2.Text = ("You didn't enter valid number.");
     }
 }