Пример #1
0
        private void button1_Click(Object sender, EventArgs e)
        {
            //
            ourNum = new List <double>();
            MyMath ourOperation = new MyMath();

            double[] a = ourNumber.Split(' ').
                         Where(x => !string.IsNullOrWhiteSpace(x)).
                         Select(x => double.Parse(x)).ToArray();
            List <double> ourNumbers = a.ToList();

            ourNumbers.Sort();
            List <double> waitTill = new List <double> {
            };
            String ourNumberfing   = ourNumber;

            if (doWeNeedToChangeAnomData == true)
            {
                waitTill = ourOperation.deleteAnomData(ourNumbers);
            }

            if (ourChoiseToChange == 0) // Без преобразование
            {
            }
            else if (ourChoiseToChange == 1)//log
            {
                waitTill = ourOperation.Change_OurNum(ourNumbers, 1);
            }
            else if (ourChoiseToChange == 2)//Стандартизация
            {
                waitTill = ourOperation.Change_OurNum(ourNumbers, 2);
            }
            else if (ourChoiseToChange == 3)//Зсув
            {
                waitTill = ourOperation.Change_OurNum(ourNumbers, 3);
            }
            List <double> ourNum1 = null;
            List <double> ourn    = null;

            if (waitTill.Count > 0)
            {
                String ourTemp = "";
                foreach (var el in waitTill)
                {
                    ourTemp += el.ToString();
                    ourTemp += " ";
                }
                ourNum1   = ourOperation.ourNumber_ourP(ourTemp);
                ourNumber = ourTemp;
                ourn      = ourOperation.ourN_Find(ourTemp, ourNum1);
            }
            else
            {
                ourNumber = ourTemp1;
                ourNum1   = ourOperation.ourNumber_ourP(ourNumber);
                ourn      = ourOperation.ourN_Find(ourNumber, ourNum1);
            }
            List <double> ourp = ourOperation.ourP_Find(ourNum1, ourn);

            if (ourNum1 == null)
            {
            }
            else
            {
                if (ourChise == 0)
                {
                    pervunuu_Analyze(ourNum1, ourn, ourp);
                    if (ourChoice != 0)
                    {
                        dataGreedViewCreate(ourNum1);
                        dataGreedViewCreate2(ourNum1);
                    }
                }
                else if (ourChise == 1)
                {
                }
                else if (ourChise == 2)
                {
                }
                else if (ourChise == 3)
                {
                }
                else if (ourChise == 4)
                {
                }
            }
        }