private void VlcControl1_VlcLibDirectoryNeeded(object sender, Vlc.DotNet.Forms.VlcLibDirectoryNeededEventArgs e) { var currentAssembly = Assembly.GetEntryAssembly(); var currentDirectory = new FileInfo(currentAssembly.Location).DirectoryName; if (currentDirectory == null) { return; } if (IntPtr.Size == 4) { e.VlcLibDirectory = new DirectoryInfo(System.IO.Path.GetFullPath(@".\libvlc\win-x86\")); } else { e.VlcLibDirectory = new DirectoryInfo(System.IO.Path.GetFullPath(@".\libvlc\win-x64\")); } if (!e.VlcLibDirectory.Exists) { var folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog { Description = "Select Vlc libraries folder.", RootFolder = Environment.SpecialFolder.Desktop, ShowNewFolderButton = true }; if (folderBrowserDialog.ShowDialog() == DialogResult.OK) { e.VlcLibDirectory = new DirectoryInfo(folderBrowserDialog.SelectedPath); } } }
private void VlcControl1_VlcLibDirectoryNeeded1(object sender, Vlc.DotNet.Forms.VlcLibDirectoryNeededEventArgs e) { var currentAssembly = Assembly.GetEntryAssembly(); var currentDirectory = new FileInfo(currentAssembly.Location).DirectoryName; // Default installation path of VideoLAN.LibVLC.Windows e.VlcLibDirectory = new DirectoryInfo(Path.Combine(currentDirectory, "libvlc", IntPtr.Size == 4 ? "win-x86" : "win-x64")); }
private void vlcControl1_VlcLibDirectoryNeeded(object sender, Vlc.DotNet.Forms.VlcLibDirectoryNeededEventArgs e) { var currentDirectory = Environment.CurrentDirectory; // Default installation path of VideoLAN.LibVLC.Windows e.VlcLibDirectory = new DirectoryInfo(Path.Combine(currentDirectory, "libvlc", IntPtr.Size == 4 ? "win-x86" : "win-x64")); }
public DirectoryInfo OnVlcLibDirectoryNeeded() { var del = VlcLibDirectoryNeeded; if (del != null) { var args = new VlcLibDirectoryNeededEventArgs(); del(this, args); return args.VlcLibDirectory; } return null; }
public DirectoryInfo OnVlcLibDirectoryNeeded() { var del = VlcLibDirectoryNeeded; if (del != null) { var args = new VlcLibDirectoryNeededEventArgs(); del(this, args); return(args.VlcLibDirectory); } return(null); }
private void OnVlcControlNeedsLibDirectory(object sender, Vlc.DotNet.Forms.VlcLibDirectoryNeededEventArgs e) { var currentAssembly = Assembly.GetEntryAssembly(); var currentDirectory = new FileInfo(currentAssembly.Location).DirectoryName; if (currentDirectory == null) { return; } if (AssemblyName.GetAssemblyName(currentAssembly.Location).ProcessorArchitecture == ProcessorArchitecture.X86) { e.VlcLibDirectory = new DirectoryInfo(System.IO.Path.Combine(currentDirectory, @"C:\Program Files (x86)\VideoLAN\VLC")); } else { e.VlcLibDirectory = new DirectoryInfo(System.IO.Path.Combine(currentDirectory, @"C:\Program Files (x86)\VideoLAN\VLC")); } }
private void OnVlcControlNeedLibDirectory(object sender, VlcLibDirectoryNeededEventArgs e) { var currentAssembly = Assembly.GetEntryAssembly(); var currentDirectory = new FileInfo(currentAssembly.Location).DirectoryName; if (currentDirectory == null) return; if (AssemblyName.GetAssemblyName(currentAssembly.Location).ProcessorArchitecture == ProcessorArchitecture.X86) e.VlcLibDirectory = new DirectoryInfo(Path.Combine(currentDirectory, @"VlcLibs\x86\")); else e.VlcLibDirectory = new DirectoryInfo(Path.Combine(currentDirectory, @"VlcLibs\x64\")); if (!e.VlcLibDirectory.Exists) { var folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); folderBrowserDialog.Description = "Select Vlc libraries folder."; folderBrowserDialog.RootFolder = Environment.SpecialFolder.Desktop; folderBrowserDialog.ShowNewFolderButton = true; if (folderBrowserDialog.ShowDialog() == DialogResult.OK) { e.VlcLibDirectory = new DirectoryInfo(folderBrowserDialog.SelectedPath); } } }
private void OnVlcControlNeedsLibDirectory(object sender, Vlc.DotNet.Forms.VlcLibDirectoryNeededEventArgs e) { e.VlcLibDirectory = new DirectoryInfo(Utils.GetWinVlcPath()); }