| | |
| | | if (!ret) { |
| | | LogHelper.Info("抓图失败"); |
| | | } |
| | | else { |
| | | LogHelper.Info("抓图成功"); |
| | | } |
| | | return ret; |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | | } |
| | | } |