From 3d55da59a3bb110bdb7ba058b202fbb664e07a3e Mon Sep 17 00:00:00 2001 From: lukeIam Date: Sat, 26 Oct 2013 14:36:38 +0200 Subject: [PATCH] Webserver: Add methode for getting photolinks of a round --- Vocaluxe/Base/Server/CVocaluxeServer.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Base/Server/CVocaluxeServer.cs b/Vocaluxe/Base/Server/CVocaluxeServer.cs index 645075db..2da17154 100644 --- a/Vocaluxe/Base/Server/CVocaluxeServer.cs +++ b/Vocaluxe/Base/Server/CVocaluxeServer.cs @@ -25,6 +25,7 @@ using System.Windows.Forms; using ServerLib; using Vocaluxe.Lib.Input; using VocaluxeLib; +using VocaluxeLib.Draw; using VocaluxeLib.Profile; using VocaluxeLib.Songs; using System.Security.Cryptography; @@ -290,6 +291,8 @@ namespace Vocaluxe.Base.Server #region photo + private static List photosOfThisRound = new List(); + private static bool _SendPhoto(SPhotoData photoData) { if (photoData.Photo == null) @@ -299,8 +302,20 @@ namespace Vocaluxe.Base.Server string name = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"); string filePath = _SaveImage(photoData.Photo, name, CSettings.FolderPhotos); + if (!string.IsNullOrEmpty(filePath)) + { + photosOfThisRound.Add(filePath); + return true; + } + + return false; + } - return !string.IsNullOrEmpty(filePath); + internal static string[] getPhotosOfThisRound() + { + var result = photosOfThisRound.ToArray(); + photosOfThisRound.Clear(); + return result; } #endregion