Ejemplo n.º 1
0
        private void textEn_KeyDown(object sender, KeyEventArgs e)
        {
            SentenceList currentlist = this.EnList;

            if (sender == this.textNative)
            {
                currentlist = this.NativeList;
            }
            if (currentlist == null)
            {
                return;
            }

            if (currentlist.ReadOnly)
            {
                if (e.KeyData == (Keys.A | Keys.Alt))
                {
                    AddToLesson();
                }
                else if (e.KeyData == (Keys.D | Keys.Alt))
                {
                    //OpenInDictionaryBlend();
                }
                else if (e.KeyData == (Keys.F1))
                {
                    this.MenuForSelected.OpenInLast();
                }
            }
        }
Ejemplo n.º 2
0
 void ListEn_TextOrVideoReloaded(SentenceList sender, EventArgs e)
 {
     UpdateTitle();
     if (VideoForm.IsVideoControlAccesible)
     {
         VideoForm.CurrentVideoContrl.mainMenu1.CheckButtonsState();
     }
 }
Ejemplo n.º 3
0
 void List_TextReloaded(SentenceList sender, EventArgs e)
 {
     //TODO:
     // попутно всегда обнуляем паралельный текст
     if (sender is SentenceListWithIndent)
     {
         this.TwinList.ListNative.SafeSelectedIndex = this.TwinList.ListEn.SafeSelectedIndex;
     }
 }
Ejemplo n.º 4
0
        void ApplayChangedTextToSentence(RichTextBox textBox)
        {
            SentenceList sl = this.m_EnList;

            if (textBox == textNative)
            {
                sl = this.m_NativeList;
            }
            sl.CurrentSentence.TextValue = textBox.Text;
            sl.List.Refresh();
        }
Ejemplo n.º 5
0
 void tutorList1_TextReloaded(SentenceList sender, EventArgs e)
 {
     if (IsHaveLessonFile)
     {
         OpenScore();
     }
     else
     {
         this.scoreCurrent.ResetProgress();
         this.scoreProgressForAllSentences.ResetProgress();
     }
 }
Ejemplo n.º 6
0
        private void R_DragDrop(object sender, DragEventArgs e)
        {
            SentenceList currentList = this.FocusedList;

            object obj = e.Data.GetData("FileNameW");

            if (obj != null)
            {
                string fileName = obj is Array ? ((Array)obj).GetValue(0).ToString() : null;
                if (!string.IsNullOrEmpty(fileName) && System.IO.File.Exists(fileName))
                {
                    if (currentList is SentenceListWithVideo)
                    {
                        ((SentenceListWithVideo)currentList).CheckAndAssignFileNameFormUI(fileName);
                    }
                    // другие файлы автоматом назначатся
                    else
                    {
                        currentList.FileName = fileName;
                        currentList.SuggestLessonFile();
                    }
                }
            }
            else
            {
                // by default all methods executed  this.GetData(format, true);

                if (Array.IndexOf(e.Data.GetFormats(), "UnicodeText") != -1)
                {
                    obj = e.Data.GetData("UnicodeText");
                }
                else
                {
                    obj = e.Data.GetData("Text");
                }
                currentList.FileName = "";
                currentList.FullText = (string)obj;
            }
        }
Ejemplo n.º 7
0
 void LessonReloaded(SentenceList sender, EventArgs e)
 {
     UpdateTitle();
     //CheckButtonsForNavigation();
 }
Ejemplo n.º 8
0
 void ListEn_TextReloaded(SentenceList sender, EventArgs e)
 {
     InitScroller();
 }