private IMediaItem CreateFileMediaItem(string path, bool noMsgBox) { if (string.IsNullOrEmpty(path)) return null; try { return new FileMediaItem(path); } catch { if (!noMsgBox) MessageBox.Show("Invalid file path: " + path); return null; } }