示例#1
0
        public static List <Sentence> GetSentencesForTutor(string fileName)
        {
            string[] sentenses =
                FileManager.GetStringFrоmFile(fileName).Split(
                    new string[] { SentenceParser.Delimeter }, StringSplitOptions.None);

            List <Sentence> sents = new List <Sentence>(5)
            {
            };
            int i = 0;

            foreach (string line in sentenses)
            {
                if (i > 5)
                {
                    DialogResult dr = MessageBox.Show("You are using trial version of 'Easy-Learn'." + Environment.NewLine +
                                                      "You can't open more than five sentences." + Environment.NewLine + Environment.NewLine +
                                                      "To give a more information?",
                                                      Application.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                    if (dr == DialogResult.Yes)
                    {
                        SentenceListWithVideo.ShowLearnWordsArticle();
                    }
                    break;
                }

                if (!string.IsNullOrEmpty(line.Trim('\n')))
                {
                    sents.Add(new SentenceForTutor(line, sents));
                }
                ++i;
            }
            return(sents);
        }
示例#2
0
 void btGetEasyLearn_Click(object sender, EventArgs e)
 {
     SentenceListWithVideo.ShowLearnWordsArticle();
 }