public static string InvokeWithStringData(string id, string data) { //var eventArgs = new LMTDropEventArgs( // (dataByte == null || dataByte.Length == 0) // ? new byte[] { } // : dataByte?.Split(',') // ?.Select(byte.Parse), dataUrl); var eventArgs = new LMTDropEventArgs(data); _actionStorage[id].Invoke(eventArgs); return((eventArgs != null && eventArgs.IsPrevented ? true : false).ToString()); }
public static string InvokeWithFileData(string id, string dataUrl, string modifyDate, string properties) { //var eventArgs = new LMTDropEventArgs( // (dataByte == null || dataByte.Length == 0) // ? new byte[] { } // : dataByte?.Split(',') // ?.Select(byte.Parse), dataUrl); var propertyArray = properties.Split('|'); var modifyDateArray = modifyDate.Split('|'); var eventArgs = new LMTDropEventArgs(dataUrl, new Interfaces.JsPrototypes.File(propertyArray[1], int.Parse(propertyArray[2]), propertyArray[0], new DateTime(int.Parse(modifyDateArray[0]), int.Parse(modifyDateArray[1]), int.Parse(modifyDateArray[2]), int.Parse(modifyDateArray[3]), int.Parse(modifyDateArray[4]), int.Parse(modifyDateArray[5]), int.Parse(modifyDateArray[6])))); _actionStorage[id].Invoke(eventArgs); return((eventArgs != null && eventArgs.IsPrevented ? true : false).ToString()); }