public void OpenVideoUnit(String folder) { Host.Invoke((Action)(() => { try { VideoUnit vu = VideoUnit.GetUnit(folder.Replace(@"/", @"\")); // for exammple System.IO.DirectoryNotFoundException когда удалили директорию FileSelector.VideoUnit = vu; } catch (Exception ex) { MessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } })); }
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); } // })); }