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(); } } }
void ListEn_TextOrVideoReloaded(SentenceList sender, EventArgs e) { UpdateTitle(); if (VideoForm.IsVideoControlAccesible) { VideoForm.CurrentVideoContrl.mainMenu1.CheckButtonsState(); } }
void List_TextReloaded(SentenceList sender, EventArgs e) { //TODO: // попутно всегда обнуляем паралельный текст if (sender is SentenceListWithIndent) { this.TwinList.ListNative.SafeSelectedIndex = this.TwinList.ListEn.SafeSelectedIndex; } }
void ApplayChangedTextToSentence(RichTextBox textBox) { SentenceList sl = this.m_EnList; if (textBox == textNative) { sl = this.m_NativeList; } sl.CurrentSentence.TextValue = textBox.Text; sl.List.Refresh(); }
void tutorList1_TextReloaded(SentenceList sender, EventArgs e) { if (IsHaveLessonFile) { OpenScore(); } else { this.scoreCurrent.ResetProgress(); this.scoreProgressForAllSentences.ResetProgress(); } }
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; } }
void LessonReloaded(SentenceList sender, EventArgs e) { UpdateTitle(); //CheckButtonsForNavigation(); }
void ListEn_TextReloaded(SentenceList sender, EventArgs e) { InitScroller(); }