Merge branch 'develop' of git://github.com/Vocaluxe/Vocaluxe into XmlSerialization

This commit is contained in:
Flamefire committed 2014-11-14 21:21:23 +01:00
commit a2aafd4614
13 files changed
+1533 -1213

No files matched your search

+58
View File
@@ -0,0 +1,58 @@
# Build Vocaluxe - HowTo (Windows)
* Navigate to the right repository: usually [Vocaluxe Main](https://github.com/Vocaluxe/Vocaluxe)
* Navigate to the right branch: usually [develop](https://github.com/Vocaluxe/Vocaluxe/tree/develop) (The main branch of Vocaluxe)
![branch](https://cloud.githubusercontent.com/assets/5115160/4995706/bc5aa536-69c2-11e4-8534-b64573624a33.PNG)
* Copy the `URL` of the corresponding git file
![url](https://cloud.githubusercontent.com/assets/5115160/4995708/bc5af234-69c2-11e4-91d1-112972f35f01.PNG)
* Make sure [Visual Studio 2012/2013(?)](http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktop) is installed
* Clone the repository and open it
**Method A: Use Visual Studio (2013+)'s git client:**
* Start Visual Studio
* `VIEW`->`Team Explorer`
* Click on the `Connect to a Team Project` button inside the `Team Explorer`
* Click on `Clone` under `Local Git Repositories`
* Enter `[theCopiedGitUrl]` in the first field
* Enter a target folder in the second field
* Click clone
![vsclone](https://cloud.githubusercontent.com/assets/5115160/4998350/de81ca76-69d7-11e4-983d-d2886aa9faa0.png)
**Method B: Use commandline git client:**
* Make sure git is installed [git-scm](http://git-scm.com/)
* Open a `git bash` (there should be a link in the start menu)
or a normal commandline if you have added git to the `PATH` variable
* Navigate to the folder where git should create the Vocaluxe project folder
```
cd [PathToYourFolder]
```
* Clone the repository (could take some time...)
```
git clone [theCopiedGitUrl]
```
![clone](https://cloud.githubusercontent.com/assets/5115160/4995707/bc5aa6da-69c2-11e4-95cb-71ac7b0c3fc8.png)
* Now you should find a Folder `Vocaluxe` in the given directory -> navigate into it
* Open the file `Vocaluxe.sln` with Visual Studio
* Configure the build target to `ReleaseWin` and `x86` or `x64` (if unsure -> select `x86`)
* Build the projects by clicking `"Build"->"Build solution"` or just press `Control`+`Shift`+`B`
![build](https://cloud.githubusercontent.com/assets/5115160/4995709/bc5b3474-69c2-11e4-9d9b-b49f8a3b315d.png)
* Check if your build was successful
![buildsuccess](https://cloud.githubusercontent.com/assets/5115160/4995710/bc5b4fe0-69c2-11e4-8b0f-4acaeffbc568.png)
* YOUR build should have appeared here:
```
[PathToYourFolder]\Vocaluxe\Output
```
* Run `Vocaluxe.exe` or copy the whole folder to a location of your choice
* Have fun!
+1
View File
@@ -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; }
+17
View File
@@ -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()
{
+1
View File
@@ -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);
+5
View File
@@ -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,
+5 -1
View File
@@ -19,6 +19,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using VocaluxeLib;
namespace Vocaluxe.Base
@@ -185,8 +186,11 @@ namespace Vocaluxe.Base
// ReSharper disable ConditionIsAlwaysTrueOrFalse
if (VersionRevision != ERevision.Release)
{
// ReSharper restore ConditionIsAlwaysTrueOrFalse
version += " " + _GetVersionStatus() + String.Format(" ({0:0000)}", _Assembly.Version.Revision);
var gitversion = Application.ProductVersion;
version += " " + _GetVersionStatus() + String.Format(" ({0})", gitversion);
}
return version;
}
+54 -17
View File
@@ -64,6 +64,7 @@ namespace Vocaluxe.Base.Server
_Server = new CServer(CConfig.Config.Server.ServerPort, CConfig.Config.Server.ServerEncryption == EOffOn.TR_CONFIG_ON);
CServer.SendKeyEvent = _SendKeyEvent;
CServer.SendKeyStringEvent = _sendKeyStringEvent;
CServer.GetProfileData = _GetProfileData;
CServer.SendProfileData = _SendProfileData;
CServer.GetProfileList = _GetProfileList;
@@ -125,9 +126,11 @@ namespace Vocaluxe.Base.Server
private static bool _SendKeyEvent(string key)
{
bool result = false;
if (!string.IsNullOrEmpty(key))
var lowerKey = key.ToLower();
if (!string.IsNullOrEmpty(lowerKey))
{
switch (key.ToLower())
switch (lowerKey)
{
case "up":
Controller.AddKeyEvent(new SKeyEvent(ESender.Keyboard, false, false, false, false, Char.MinValue, Keys.Up));
@@ -157,25 +160,22 @@ namespace Vocaluxe.Base.Server
Controller.AddKeyEvent(new SKeyEvent(ESender.Keyboard, false, false, false, false, Char.MinValue, Keys.Tab));
result = true;
break;
case "backspace":
Controller.AddKeyEvent(new SKeyEvent(ESender.Keyboard, false, false, false, false, Char.MinValue, Keys.Back));
result = true;
break;
default:
foreach (char c in key)
if (lowerKey.StartsWith("f"))
{
bool shift = true;
char keyChar;
if (char.ToUpper(c) != c)
{
keyChar = char.ToUpper(c);
shift = false;
}
else
keyChar = c;
var numberString = lowerKey.Substring(1);
int number;
Keys fKey;
if ((keyChar >= '0' && keyChar <= '9') || (keyChar >= 'A' && keyChar <= 'Z'))
if (Int32.TryParse(numberString, out number) && number >= 1
&& number <= 12
&& Enum.TryParse("F" + number, true, out fKey))
{
Keys keys = (Keys)keyChar;
if (shift)
keys |= Keys.Shift;
Controller.AddKeyEvent(new SKeyEvent(ESender.Keyboard, false, false, false, false, Char.MinValue, keys));
Controller.AddKeyEvent(new SKeyEvent(ESender.Keyboard, false, false, false, false, Char.MinValue, fKey));
result = true;
}
}
@@ -186,6 +186,43 @@ namespace Vocaluxe.Base.Server
return result;
}
private static bool _sendKeyStringEvent(string keyString, bool isShiftPressed , bool isAltPressed , bool isCtrlPressed )
{
bool result = false;
foreach (var key in keyString.ToCharArray())
{
Controller.AddKeyEvent(new SKeyEvent(ESender.Keyboard, isAltPressed,
Char.IsUpper(key) || isShiftPressed,
isCtrlPressed, true,
isShiftPressed?Char.ToUpper(key) :key,
_ParseKeys(key)));
result = true;
}
return result;
}
private static Keys _ParseKeys(char keyText)
{
Keys key;
if (!Enum.TryParse(keyText.ToString(), true, out key))
{
switch (keyText)
{
case ' ':
key = Keys.Space;
break;
default:
key = Keys.None;
break;
}
}
return key;
}
#region profile
private static SProfileData _GetProfileData(int profileId, bool isReadonly)
{
+2 -1
View File
@@ -50,4 +50,5 @@ using System.Runtime.InteropServices;
//
[assembly: AssemblyVersion("0.3.0.83")]
[assembly: AssemblyFileVersion("0.3.0.83")]
[assembly: AssemblyFileVersion("0.3.0.83")]
[assembly: AssemblyInformationalVersion("GITVERSION")]
+5 -1
View File
@@ -521,7 +521,11 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>xcopy /E /D /Y "$(ProjectDir)\Website" "$(SolutionDir)\PhoneGap"</PostBuildEvent>
<PostBuildEvent>xcopy /E /D /Y "$(ProjectDir)\Website" "$(SolutionDir)\PhoneGap"
powershell -command "(Get-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs') | Foreach-Object {$_ -replace '(?&lt;=AssemblyInformationalVersion\()(.*)(?=\))', '\"GITVERSION\"'} | Set-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs'"</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>powershell -command "$version = git describe --long; (Get-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs') | Foreach-Object {$_ -replace 'GITVERSION', $version} | Set-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs'"</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
+26 -4
View File
@@ -78,7 +78,7 @@
</div>
<!-- /page -->
<div id="main" data-role="page" data-content-theme="a">
<div id="main" data-role="page" data-content-theme="a" data-add-back-btn="false">
<div data-role="header">
<h1>Volcaluxe</h1>
</div>
@@ -297,14 +297,36 @@
<div class="ui-block-c">
<a data-role="button" id="keyboardButtonReturn" data-i18n="keyboardButtonReturn"></a>
</div>
<div class="ui-block-a">
<!--
<fieldset data-role="controlgroup" data-type="horizontal">
<input type="checkbox" name="keyboardButtonFunct" id="keyboardButtonFunct" />
<label data-i18n="keyboardButtonFunct" for="keyboardButtonFunct"></label>
</fieldset>-->
</div>
<div class="ui-block-b">
<fieldset data-role="controlgroup" data-type="horizontal">
<input type="checkbox" name="keyboardButtonShift" id="keyboardButtonShift" />
<label data-i18n="keyboardButtonShift" for="keyboardButtonShift"></label>
<input type="checkbox" name="keyboardButtonAlt" id="keyboardButtonAlt" />
<label data-i18n="keyboardButtonAlt" for="keyboardButtonAlt"></label>
<input type="checkbox" name="keyboardButtonCtrl" id="keyboardButtonCtrl" />
<label data-i18n="keyboardButtonCtrl" for="keyboardButtonCtrl"></label>
</fieldset>
</div>
<div class="ui-block-c">
<a data-role="button" id="keyboardButtonP">P</a>
<a data-role="button" id="keyboardButtonBackspace" data-i18n="keyboardButtonBackspace"></a>
</div>
</div>
<!-- <div style>
<div>
<fieldset data-role="controlgroup" data-type="horizontal">
<input type="checkbox" name="keyboardAutoSend" id="keyboardAutoSend" />
<label data-i18n="keyboardAutoSend" for="keyboardAutoSend"></label>
</fieldset>
<label for="keyboardButtonKeys" data-i18n="keyboardButtonKeys"></label>
<input type="text" id="keyboardButtonKeys" data-mini="true">
</div> -->
<a data-role="button" id="keyboardButtonSend" data-i18n="keyboardButtonSend"></a>
</div>
</div>
<!-- /content -->
</div>
+1345 -1187
View File
File diff suppressed because it is too large. Load diff
+7 -1
View File
@@ -76,5 +76,11 @@
"discoverConnectServerAddress": "Serveradresse:",
"discoverConnectButton": "Verbinden",
"Checking...": "Prüfen...",
"timeout": "Zeitüberschreitung"
"timeout": "Zeitüberschreitung",
"keyboardButtonShift": "Umschalt",
"keyboardButtonAlt": "Alt",
"keyboardButtonCtrl": "Steuerung",
"keyboardButtonBackspace": "Rücktaste",
"keyboardAutoSend": "Tasten autom. senden",
"keyboardButtonSend": "Senden"
}
+7 -1
View File
@@ -76,5 +76,11 @@
"discoverConnectServerAddress": "Serveraddress:",
"discoverConnectButton": "Connect",
"Checking...": "Checking...",
"timeout": "Timeout"
"timeout": "Timeout",
"keyboardButtonShift": "Shift",
"keyboardButtonAlt": "Alt",
"keyboardButtonCtrl": "Control",
"keyboardButtonBackspace": "Backspace",
"keyboardAutoSend": "Auto send keys",
"keyboardButtonSend": "Send"
}