Пример #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
 internal void Initialize(SentenceListWithVideo sentenceList,
                          SentenceListWithIndent sentenceListWithIndent, IWaitingUIObject waitingUiObject)
 {
     //m_WaitingUiObject = waitingUiObject;
     m_EnList     = sentenceList;
     m_NativeList = sentenceListWithIndent;
     //   new DebugMonitor() { WatchObject = this }.Show();
 }
Пример #3
0
 public void OpenLessonUnit(String folder)
 {
     //     Host.Invoke((Action)(() =>
     //     {
     try
     {
         VideoUnit vu = VideoUnit.GetUnit(folder.Replace(@"/", @"\"));     // for exammple System.IO.DirectoryNotFoundException когда удалили директорию
         if (!string.IsNullOrEmpty(vu.lesson))
         {
             SentenceListWithVideo.RunLessson(vu.path + vu.lesson);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(Application.ProductName, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     //    }));
 }
Пример #4
0
 void btGetEasyLearn_Click(object sender, EventArgs e)
 {
     SentenceListWithVideo.ShowLearnWordsArticle();
 }