From 5f85b32981f55e3819d9c11417dba7a54932c8f2 Mon Sep 17 00:00:00 2001 From: rainerosion Date: Sun, 15 Jan 2023 11:43:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B8=AE=E7=95=A5=E5=9C=96=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tech/Tech.csproj | 16 +++++++--------- Tech/packages.config | 2 ++ Tech/util/Thumbnail.cs | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 Tech/util/Thumbnail.cs diff --git a/Tech/Tech.csproj b/Tech/Tech.csproj index c35f179..4043c17 100644 --- a/Tech/Tech.csproj +++ b/Tech/Tech.csproj @@ -42,6 +42,12 @@ ..\packages\LibVLCSharp.WinForms.3.6.7\lib\net40\LibVLCSharp.WinForms.dll + + ..\packages\WindowsAPICodePack-Core.1.1.1\lib\Microsoft.WindowsAPICodePack.dll + + + ..\packages\WindowsAPICodePack-Shell.1.1.1\lib\Microsoft.WindowsAPICodePack.Shell.dll + @@ -86,12 +92,6 @@ Form1.cs - - UserControl - - - MultiPlayerView.cs - UserControl @@ -106,12 +106,10 @@ UCOverview.cs + Form1.cs - - MultiPlayerView.cs - PlayerView.cs diff --git a/Tech/packages.config b/Tech/packages.config index a8a95d2..4fc1aa7 100644 --- a/Tech/packages.config +++ b/Tech/packages.config @@ -10,4 +10,6 @@ + + \ No newline at end of file diff --git a/Tech/util/Thumbnail.cs b/Tech/util/Thumbnail.cs new file mode 100644 index 0000000..0a11ce5 --- /dev/null +++ b/Tech/util/Thumbnail.cs @@ -0,0 +1,18 @@ +using System.Drawing; +using Microsoft.WindowsAPICodePack.Shell; + +namespace Tech_Demo.util +{ + public class Thumbnail + { + /** + * 視頻縮略圖工具欄 + */ + public static Bitmap GetThumbnailByPath(string filePath) + { + ShellFile shellFile = ShellFile.FromFilePath(filePath); + Bitmap thumbnail = shellFile.Thumbnail.ExtraLargeBitmap; + return thumbnail; + } + } +} \ No newline at end of file