From abf782e4e9d505184652635aa0912781f572f843 Mon Sep 17 00:00:00 2001 From: kazelee <1847801760@qq.com> Date: 星期四, 24 七月 2025 17:26:41 +0800 Subject: [PATCH] 后端实现添加物料绑定货位, 优化货位容器绑定时容器表插入, 多个物料信息记录的功能 --- device/SnapDevice.cs | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/device/SnapDevice.cs b/device/SnapDevice.cs index 216bc0e..afabdfe 100644 --- a/device/SnapDevice.cs +++ b/device/SnapDevice.cs @@ -108,6 +108,9 @@ if (!ret) { LogHelper.Info("鎶撳浘澶辫触"); } + else { + LogHelper.Info("鎶撳浘鎴愬姛"); + } return ret; } @@ -161,5 +164,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