Merge branch 'develop' of git://github.com/Vocaluxe/Vocaluxe into XmlSerialization
This commit is contained in:
commit
a2aafd4614
13 files changed
+1533
-1213
No files matched your search
@@ -33,6 +33,7 @@ namespace ServerLib
|
||||
private bool _Encrypted;
|
||||
|
||||
public static SendKeyEventDelegate SendKeyEvent { internal get; set; }
|
||||
public static SendKeyStringEventDelegate SendKeyStringEvent { internal get; set; }
|
||||
|
||||
#region profile
|
||||
public static GetProfileDataDelegate GetProfileData { internal get; set; }
|
||||
|
||||
@@ -58,6 +58,23 @@ namespace ServerLib
|
||||
CServer.SendKeyEvent(key);
|
||||
}
|
||||
|
||||
public void SendKeyStringEvent(string keyString, bool isShiftPressed = false, bool isAltPressed = false, bool isCtrlPressed = false)
|
||||
{
|
||||
if (!_CheckRight(EUserRights.UseKeyboard))
|
||||
return;
|
||||
|
||||
if (CServer.SendKeyStringEvent == null)
|
||||
{
|
||||
if (WebOperationContext.Current != null)
|
||||
{
|
||||
WebOperationContext.Current.OutgoingResponse.StatusCode = HttpStatusCode.NotFound;
|
||||
WebOperationContext.Current.OutgoingResponse.StatusDescription = "Not found";
|
||||
}
|
||||
}
|
||||
else
|
||||
CServer.SendKeyStringEvent(keyString, isShiftPressed, isAltPressed, isCtrlPressed);
|
||||
}
|
||||
|
||||
#region profile
|
||||
public int GetOwnProfileId()
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@ using System.Text.RegularExpressions;
|
||||
namespace ServerLib
|
||||
{
|
||||
public delegate bool SendKeyEventDelegate(string key);
|
||||
public delegate bool SendKeyStringEventDelegate(string keyString, bool isShiftPressed , bool isAltPressed , bool isCtrlPressed);
|
||||
|
||||
#region profile
|
||||
public delegate SProfileData GetProfileDataDelegate(int profileId, bool isReadonly);
|
||||
|
||||
@@ -30,6 +30,11 @@ namespace ServerLib
|
||||
UriTemplate = "/sendKeyEvent?key={key}")]
|
||||
void SendKeyEvent(string key);
|
||||
|
||||
[OperationContract, WebInvoke(Method = "GET",
|
||||
ResponseFormat = WebMessageFormat.Json,
|
||||
UriTemplate = "/sendKeyStringEvent?keyString={keyString}&shift={isShiftPressed}&alt={isAltPressed}&ctrl={isCtrlPressed}")]
|
||||
void SendKeyStringEvent(string keyString, bool isShiftPressed = false, bool isAltPressed = false, bool isCtrlPressed = false);
|
||||
|
||||
#region profile
|
||||
[OperationContract, WebInvoke(Method = "GET",
|
||||
ResponseFormat = WebMessageFormat.Json,
|
||||
|
||||
Reference in new issue
Block a user