From 0a4d1ebe61a27f59646ed8a1702e6ff85aa4616f Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Sun, 5 May 2013 17:03:12 +0200 Subject: [PATCH] added a simple android test application (using xamarin) --- .gitignore | 6 + ClientServerLib/AndroidRemote.sln | 20 ++ .../AndroidRemote/AndroidRemote.csproj | 92 +++++++++ ClientServerLib/AndroidRemote/MainActivity.cs | 143 +++++++++++++ .../Newtonsoft.Json.MonoDroid.dll | Bin 0 -> 325120 bytes .../AndroidRemote/Properties/AssemblyInfo.cs | 28 +++ .../Resources/AboutResources.txt | 44 ++++ .../Resources/Resource.designer.cs | 194 ++++++++++++++++++ .../AndroidRemote/Resources/drawable/Icon.png | Bin 0 -> 2574 bytes .../AndroidRemote/Resources/layout/Main.axml | 52 +++++ .../Resources/values/Strings.xml | 18 ++ 11 files changed, 597 insertions(+) create mode 100644 ClientServerLib/AndroidRemote.sln create mode 100644 ClientServerLib/AndroidRemote/AndroidRemote.csproj create mode 100644 ClientServerLib/AndroidRemote/MainActivity.cs create mode 100644 ClientServerLib/AndroidRemote/Newtonsoft.Json.MonoDroid.dll create mode 100644 ClientServerLib/AndroidRemote/Properties/AssemblyInfo.cs create mode 100644 ClientServerLib/AndroidRemote/Resources/AboutResources.txt create mode 100644 ClientServerLib/AndroidRemote/Resources/Resource.designer.cs create mode 100644 ClientServerLib/AndroidRemote/Resources/drawable/Icon.png create mode 100644 ClientServerLib/AndroidRemote/Resources/layout/Main.axml create mode 100644 ClientServerLib/AndroidRemote/Resources/values/Strings.xml diff --git a/.gitignore b/.gitignore index 1875ccf8..b0ac1e0d 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,9 @@ Output/Songs /ClientServerLib/ClientServerLib/bin/ClientServerLib.dll ClientTest.exe *.vshost.* +*.userprefs +AndroidRemote.dll.mdb +/ClientServerLib/AndroidRemote/bin/Newtonsoft.Json.MonoDroid.dll +/ClientServerLib/ClientServerLib/bin/Newtonsoft.Json.dll +/ClientServerLib/AndroidRemote/bin/AndroidRemote.dll +/ClientServerLib/ClientTest/bin/Debug/Newtonsoft.Json.dll diff --git a/ClientServerLib/AndroidRemote.sln b/ClientServerLib/AndroidRemote.sln new file mode 100644 index 00000000..eaf69974 --- /dev/null +++ b/ClientServerLib/AndroidRemote.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidRemote", "AndroidRemote\AndroidRemote.csproj", "{D97EF6F3-7C3F-439F-B022-647948E206D2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D97EF6F3-7C3F-439F-B022-647948E206D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D97EF6F3-7C3F-439F-B022-647948E206D2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D97EF6F3-7C3F-439F-B022-647948E206D2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D97EF6F3-7C3F-439F-B022-647948E206D2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = AndroidRemote.csproj + EndGlobalSection +EndGlobal diff --git a/ClientServerLib/AndroidRemote/AndroidRemote.csproj b/ClientServerLib/AndroidRemote/AndroidRemote.csproj new file mode 100644 index 00000000..e7b5397e --- /dev/null +++ b/ClientServerLib/AndroidRemote/AndroidRemote.csproj @@ -0,0 +1,92 @@ + + + + Debug + AnyCPU + 10.0.0 + 2.0 + {D97EF6F3-7C3F-439F-B022-647948E206D2} + {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Library + AndroidRemote + Resources + Assets + Resource + True + Resources\Resource.designer.cs + AndroidRemote + + + true + full + false + bin\ + DEBUG;MONO + prompt + 4 + false + None + + + none + true + bin\ + prompt + 4 + false + false + SdkOnly + MONO + + + + + + + + Newtonsoft.Json.MonoDroid.dll + + + + + + + + ClientServerLib\CClient.cs + + + ClientServerLib\CConnection.cs + + + ClientServerLib\Structs.cs + + + ClientServerLib\DeffieHellman\BigInt.cs + + + ClientServerLib\DeffieHellman\DeffieHellman.cs + + + ClientServerLib\DeffieHellman\StrongNumberProvider.cs + + + ClientServerLib\Vocaluxe\CCommands.cs + + + ClientServerLib\Vocaluxe\VocaluxeStructs.cs + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ClientServerLib/AndroidRemote/MainActivity.cs b/ClientServerLib/AndroidRemote/MainActivity.cs new file mode 100644 index 00000000..f2a1c89f --- /dev/null +++ b/ClientServerLib/AndroidRemote/MainActivity.cs @@ -0,0 +1,143 @@ +using System; + +using Android.App; +using Android.Content; +using Android.Runtime; +using Android.Views; +using Android.Widget; +using Android.OS; + +using ClientServerLib; +using Vocaluxe.Base.Server; + +namespace AndroidRemote +{ + [Activity (Label = "Vocaluxe Remote", MainLauncher = true)] + public class Activity1 : Activity + { + CClient client = new CClient(); + Button bConnect; + Button bLogin; + Button bUp; + Button bDown; + bool loggedIn; + + protected override void OnCreate (Bundle bundle) + { + base.OnCreate (bundle); + + loggedIn = false; + + // Set our view from the "main" layout resource + SetContentView (Resource.Layout.Main); + + bConnect = FindViewById