diff --git a/src/Assets/AboutAssets.txt b/src/Assets/AboutAssets.txt new file mode 100755 index 0000000..2f59e2c --- /dev/null +++ b/src/Assets/AboutAssets.txt @@ -0,0 +1,19 @@ +Any raw assets you want to be deployed with your application can be placed in +this directory (and child directories) and given a Build Action of "AndroidAsset". + +These files will be deployed with your package and will be accessible using Android's +AssetManager, like this: + +public class ReadAsset : Activity +{ + protected override void OnCreate (Bundle bundle) + { + base.OnCreate (bundle); + + InputStream input = Assets.Open ("my_asset.txt"); + } +} + +Additionally, some Android functions will automatically load asset files: + +Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); \ No newline at end of file diff --git a/src/Connection.cs b/src/Connection.cs new file mode 100755 index 0000000..e796a20 --- /dev/null +++ b/src/Connection.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Sockets; +using System.Text; + +//using Android.App; +//using Android.Content; +//using Android.OS; +//using Android.Runtime; +//using Android.Views; +//using Android.Widget; + +namespace TCPCommanderAndroid +{ + public class TCP_Connection + { + private static TCP_Connection _TCP_instance; + public static TCP_Connection TCP_Instance + { + get + { + if (_TCP_instance == null) _TCP_instance = new TCP_Connection(); + return _TCP_instance; + } + } + public TcpClient client { get; set; } + } + + public class UDP_Connection + { + private static UDP_Connection _UDP_instance; + public static UDP_Connection UDP_Instance + { + get + { + if (_UDP_instance == null) _UDP_instance = new UDP_Connection(); + return _UDP_instance; + } + } + public UdpClient client { get; set; } + } +} \ No newline at end of file diff --git a/src/FunctionsPage.cs b/src/FunctionsPage.cs new file mode 100755 index 0000000..8fa412a --- /dev/null +++ b/src/FunctionsPage.cs @@ -0,0 +1,442 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Net.NetworkInformation; +using System.Net.Sockets; +using System.Text; + +using Android.App; +using Android.Content; +using Android.OS; +using Android.Runtime; +using Android.Views; +using Android.Widget; + +namespace TCPCommanderAndroid +{ + [Activity(Label = "FunctionsPage", ScreenOrientation = Android.Content.PM.ScreenOrientation.Portrait)] + public class FunctionsPage : Activity + { + public static string storedprivIP; + Show_Dialog dialog; + Button testButton; + Button pingButton; + Button shutdownButton; + Button monitorONButton; + Button monitorOFFButton; + Button screenshotButton; + Button PCLockButton; + //ImageView screenshotView; + Vibrator vibrator; + byte[] buffer = new byte[1]; + System.Timers.Timer connectionTimer; + protected override void OnCreate(Bundle savedInstanceState) + { + base.OnCreate(savedInstanceState); + SetContentView(Resource.Layout.functions_page); + + dialog = new Show_Dialog(this); + + testButton = FindViewById