Esempio n. 1
0
        void UpdateWordList()
        {
            AllWords = DB_Access.LoadWords();

            foreach (Word word in AllWords)
            {
                word.DT_DateAdded = Convert.ToDateTime(word.DateAdded);
            }

            if (AllWords.Count == 0)
            {
                PagesCount = 1;
                return;
            }
            else
            {
                double val = (double)AllWords.Count / (double)PageLength;
                val        = Math.Ceiling(val);
                PagesCount = (int)val;

                AllWords = AllWords.OrderBy(item => item.Weight).ToList();
                if (AllWords.Count != 0)
                {
                    MinWeight = AllWords[0].Weight;
                    MaxWeight = AllWords[AllWords.Count - 1].Weight;
                }
            }

            SortWords();
        }