From 9f18954857e9c4c691fc2c8e83d7728abdc18f74 Mon Sep 17 00:00:00 2001 From: kazelee <1847801760@qq.com> Date: 星期二, 08 七月 2025 17:54:22 +0800 Subject: [PATCH] 添加后台图片前台调用的图床接口备用,修复测试出现的问题 --- device/SnapDevice.cs | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/device/SnapDevice.cs b/device/SnapDevice.cs index 216bc0e..f163af8 100644 --- a/device/SnapDevice.cs +++ b/device/SnapDevice.cs @@ -161,5 +161,19 @@ Process.Start(filePath); } } + + public string GetCapturePictureLocalPath() { + string path = AppDomain.CurrentDomain.BaseDirectory + "image"; + if (!Directory.Exists(path)) { + Directory.CreateDirectory(path); + } + DateTime now = DateTime.Now; + string filePath = path + "\\" + string.Format("{0}-{1}-{2}-{3}-{4}-{5}", now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second) + ".jpg"; + bool ret = NETClient.CapturePicture(_PlayID, filePath, EM_NET_CAPTURE_FORMATS.JPEG); + if (!ret) { + return ""; + } + return filePath; + } } } -- Gitblit v1.9.1