public async Task <List <VikingLottoNumbers> > GetNumbers(int pageNum)
        {
            List <VikingLottoNumbers> vikingLottoNumbersCollection = new List <VikingLottoNumbers>();

            HtmlWeb web = new HtmlWeb();

            HtmlDocument doc;

            try
            {
                if (pageNum == 1)
                {
                    doc = await web.LoadFromWebAsync("https://www.latloto.lv/lv/arhivs/viking-lotto");
                }
                else
                {
                    doc = await web.LoadFromWebAsync("https://www.latloto.lv/lv/arhivs/viking-lotto" + "/" + pageNum.ToString());
                }

                var num1          = doc.DocumentNode.SelectNodes("/html/body/main/div/section//div/div/div//div//table//tr//td//div/span[1]");
                var num2          = doc.DocumentNode.SelectNodes("/html/body/main/div/section//div/div/div//div//table//tr//td//div/span[2]");
                var num3          = doc.DocumentNode.SelectNodes("/html/body/main/div/section//div/div/div//div//table//tr//td//div/span[3]");
                var num4          = doc.DocumentNode.SelectNodes("/html/body/main/div/section//div/div/div//div//table//tr//td//div/span[4]");
                var num5          = doc.DocumentNode.SelectNodes("/html/body/main/div/section//div/div/div//div//table//tr//td//div/span[5]");
                var num6          = doc.DocumentNode.SelectNodes("/html/body/main/div/section//div/div/div//div//table//tr//td//div/span[6]");
                var additionalNum = doc.DocumentNode.SelectNodes("/html/body/main/div/section//div/div/div//div//table//tr//td//div/span[8]");

                int drawRowCounter = 0;

                while (num1.Count > drawRowCounter)
                {
                    VikingLottoNumbers vikingLottoNumbers = new VikingLottoNumbers();
                    vikingLottoNumbers.AddDrawNumbers(Convert.ToInt16(num1[drawRowCounter].InnerText),
                                                      Convert.ToInt16(num2[drawRowCounter].InnerText),
                                                      Convert.ToInt16(num3[drawRowCounter].InnerText),
                                                      Convert.ToInt16(num4[drawRowCounter].InnerText),
                                                      Convert.ToInt16(num5[drawRowCounter].InnerText),
                                                      Convert.ToInt16(num6[drawRowCounter].InnerText),
                                                      Convert.ToInt16(additionalNum[drawRowCounter].InnerText),
                                                      false, false, false, false, false, false, false);

                    vikingLottoNumbersCollection.Add(vikingLottoNumbers);

                    drawRowCounter++;
                }
            }
            catch (Exception)
            {
                ConnectionFail = true;
                CachConnectionFail?.Invoke(this, ConnectionFail);
            }

            return(vikingLottoNumbersCollection);
        }
        /// <summary>
        /// Find similarities in two numbers
        /// </summary>
        /// <param name="lotteryTicketNumbers"></param>
        /// <param name="vikingLottoNumbers"></param>
        /// <param name="similarityCount"></param>
        private static void CheckSimilarities(VikingLottoNumbers lotteryTicketNumbers, VikingLottoNumbers vikingLottoNumbers, int similarityCount)
        {
            int counterForBool = 0;

            List <int> numbers = new List <int>();

            int endCounter  = 0;
            int endCounter2 = 0;

            foreach (var ticketNum in lotteryTicketNumbers.NumCollection)
            {
                endCounter++;
                endCounter2 = 0;
                foreach (var lottoNum in vikingLottoNumbers.NumCollection)
                {
                    endCounter2++;
                    if (ticketNum == lottoNum)
                    {
                        counterForBool++;

                        numbers.Add(ticketNum);
                    }
                }
            }

            if (counterForBool > 1)
            {
                foreach (var item in GetAllCobinations(numbers))
                {
                    if (item.Count >= similarityCount)
                    {
                        if (!SimilarityHolder.CheckIfNumberExist(item))
                        {
                            SimilarityHolder.AddNumbers(item);
                        }
                    }
                }
            }
        }
        private static async Task <WinNumbersList> WinNumbersTask(int counter, VikingLottoNumbers item)
        {
            WinNumbersList winNumbersList = new WinNumbersList();

            await Task.Run(() =>
            {
                winNumbersList.Num1          = item.Num1;
                winNumbersList.Num2          = item.Num2;
                winNumbersList.Num3          = item.Num3;
                winNumbersList.Num4          = item.Num4;
                winNumbersList.Num5          = item.Num5;
                winNumbersList.Num6          = item.Num6;
                winNumbersList.AdditionalNum = item.AdditionalNum;

                if (counter == 0)
                {
                    winNumbersList.ColorNum1          = "#0f3e0f";
                    winNumbersList.ColorNum2          = "#0f3e0f";
                    winNumbersList.ColorNum3          = "#0f3e0f";
                    winNumbersList.ColorNum4          = "#0f3e0f";
                    winNumbersList.ColorNum5          = "#0f3e0f";
                    winNumbersList.ColorNum6          = "#0f3e0f";
                    winNumbersList.ColorAdditionalNum = "#0f3e0f";
                }
                else if (counter == 1)
                {
                    winNumbersList.ColorNum1          = "#145214";
                    winNumbersList.ColorNum2          = "#145214";
                    winNumbersList.ColorNum3          = "#145214";
                    winNumbersList.ColorNum4          = "#145214";
                    winNumbersList.ColorNum5          = "#145214";
                    winNumbersList.ColorNum6          = "#145214";
                    winNumbersList.ColorAdditionalNum = "#145214";
                }
                else if (counter == 2)
                {
                    winNumbersList.ColorNum1          = "#196719";
                    winNumbersList.ColorNum2          = "#196719";
                    winNumbersList.ColorNum3          = "#196719";
                    winNumbersList.ColorNum4          = "#196719";
                    winNumbersList.ColorNum5          = "#196719";
                    winNumbersList.ColorNum6          = "#196719";
                    winNumbersList.ColorAdditionalNum = "#196719";
                }
                else if (counter == 3)
                {
                    winNumbersList.ColorNum1          = "#239023";
                    winNumbersList.ColorNum2          = "#239023";
                    winNumbersList.ColorNum3          = "#239023";
                    winNumbersList.ColorNum4          = "#239023";
                    winNumbersList.ColorNum5          = "#239023";
                    winNumbersList.ColorNum6          = "#239023";
                    winNumbersList.ColorAdditionalNum = "#239023";
                }
                else if (counter == 4)
                {
                    winNumbersList.ColorNum1          = "#2db92d";
                    winNumbersList.ColorNum2          = "#2db92d";
                    winNumbersList.ColorNum3          = "#2db92d";
                    winNumbersList.ColorNum4          = "#2db92d";
                    winNumbersList.ColorNum5          = "#2db92d";
                    winNumbersList.ColorNum6          = "#2db92d";
                    winNumbersList.ColorAdditionalNum = "#2db92d";
                }
                else if (counter == 5)
                {
                    winNumbersList.ColorNum1          = "#46d246";
                    winNumbersList.ColorNum2          = "#46d246";
                    winNumbersList.ColorNum3          = "#46d246";
                    winNumbersList.ColorNum4          = "#46d246";
                    winNumbersList.ColorNum5          = "#46d246";
                    winNumbersList.ColorNum6          = "#46d246";
                    winNumbersList.ColorAdditionalNum = "#46d246";
                }
                else
                {
                    winNumbersList.ColorNum1          = "#FF3333F3";
                    winNumbersList.ColorNum2          = "#FF3333F3";
                    winNumbersList.ColorNum3          = "#FF3333F3";
                    winNumbersList.ColorNum4          = "#FF3333F3";
                    winNumbersList.ColorNum5          = "#FF3333F3";
                    winNumbersList.ColorNum6          = "#FF3333F3";
                    winNumbersList.ColorAdditionalNum = "#FF640096";
                }
            });

            return(winNumbersList);
        }
        public static ObservableCollection <VikingLottoNumbers> GetSimilarities(int lotoNum1,
                                                                                int lotoNum2,
                                                                                int lotoNum3,
                                                                                int lotoNum4,
                                                                                int lotoNum5,
                                                                                int lotoNum6,
                                                                                int lotoAdditionalNum,
                                                                                ObservableCollection <VikingLottoNumbers> vikingLottoNumbers, int similarityCount)
        {
            ObservableCollection <VikingLottoNumbers> results = new ObservableCollection <VikingLottoNumbers>();


            RessetAllBools(vikingLottoNumbers);


            VikingLottoNumbers lotteryTicketNumbers = new VikingLottoNumbers();

            lotteryTicketNumbers.AddDrawNumbers(lotoNum1, lotoNum2, lotoNum3, lotoNum4, lotoNum5, lotoNum6, lotoAdditionalNum,
                                                false, false, false, false, false, false, false);

            int counter        = 0;
            int counterForBool = 0;

            foreach (var item in vikingLottoNumbers)
            {
                counter        = 0;
                counterForBool = 0;

                VikingLottoNumbers lottoSimilarNumbers = new VikingLottoNumbers();
                foreach (var CollectionItem in item.NumCollection)
                {
                    if (lotteryTicketNumbers.AdditionalNum == item.AdditionalNum && counter == 0)
                    {
                        counterForBool++;
                        item.BoolCollection[6]  = true;
                        item.ColorAdditionalNum = ColorCode.IsSimilarAdditionalNum;
                    }
                    else if (lotteryTicketNumbers.AdditionalNum != item.AdditionalNum && counter == 0)
                    {
                        item.ColorAdditionalNum = ColorCode.NotSimilarAdditionalNum;
                    }

                    foreach (var ticketItem in lotteryTicketNumbers.NumCollection)
                    {
                        if (CollectionItem == ticketItem)
                        {
                            counterForBool++;
                            item.BoolCollection[counter] = true;
                        }
                    }
                    counter++;
                }

                if (counterForBool < similarityCount)
                {
                    for (int i = 0; i < item.BoolCollection.Count; i++)
                    {
                        item.BoolCollection[i] = false;
                    }
                }
                else
                {
                    item.GetColorForNum();

                    results.Add(item);
                }
            }

            return(results);
        }