Esempio n. 1
0
        private void AddWordList(int num)
        {
            int count = words.Count;
            int i     = 0;

            foreach (var str in words)
            {
                if (count != 0)
                {
                    num = 1 + i * 100 / count;
                }
                else
                {
                    num = 0;
                }
                string trans = AddTrans(str);
                if (trans.Trim() != "")
                {
                    if (WordDataHelper.GetProgress(str) < AppInfoHelper.GetReciteNumber())
                    {
                        wordList.Add(str);
                        transList.Add(trans);
                    }
                }
                Thread a = new Thread(AnotherProcess);
                a.IsBackground = true;
                a.Start(num);
                i++;
            }
        }
Esempio n. 2
0
        private Color SetColor(string word)
        {
            int   progress = WordDataHelper.GetProgress(word);
            Color color    = new Color();

            if (progress == AppInfoHelper.GetReciteNumber())
            {
                color = Color.FromArgb(34, 177, 76);
            }
            if (progress < 0)
            {
                color = Color.Red;
            }
            return(color);
        }