protected override void OnCreate(Bundle savedInstanceState)
        {
            RequestPermissions();

            base.OnCreate(savedInstanceState);

            ActionBar.NavigationMode = ActionBarNavigationMode.Tabs;

            SetContentView(Resource.Layout.Main);



            Tab tab1 = ActionBar.NewTab();

            tab1.SetText("1.76");
            tab1.TabSelected += (sender, args) =>
            {
                currentVersion = tab1.Text;
                getFilesInDirectory();
            };
            ActionBar.AddTab(tab1);

            Tab tab2 = ActionBar.NewTab();

            tab2.SetText("4.05");
            tab2.TabSelected += (sender, args) =>
            {
                currentVersion = tab2.Text;
                getFilesInDirectory();
            };
            ActionBar.AddTab(tab2);

            Tab tab3 = ActionBar.NewTab();

            tab3.SetText("4.55");
            tab3.TabSelected += (sender, args) =>
            {
                currentVersion = tab3.Text;
                getFilesInDirectory();
            };
            ActionBar.AddTab(tab3);



            ps4IPAdress = FindViewById <EditText>(Resource.Id.PS4IP);
            Userfiles US = new Userfiles();

            US.Load();
            ps4IPAdress.Text = US.IPAdress;



            getFilesInDownload();



            /*
             *
             * //Move files from Assets to Folder
             * //NOT WORKING YET
             *
             * //Version 1.76 Payloads
             * using (var asset1 = Assets.Open("dlclose.bin"))
             * using (var dest = File.Create(pathToFolder + "1.76 /dlclose.bin"))
             *  asset1.CopyTo(dest);
             * using (var asset2 = Assets.Open("WebBrowserPatch.bin"))
             * using (var dest = File.Create(pathToFolder + "/PS4 Tool/1.76/WebBrowserPatch.bin"))
             *  asset2.CopyTo(dest);
             *
             *
             * //Version 4.05 Payloads
             * using (var asset3 = Assets.Open("DumpFile405.bin"))
             * using (var dest = File.Create(pathToFolder + "/PS4 Tool/4.05/DumpFile405.bin"))
             *  asset3.CopyTo(dest);
             * using (var asset4 = Assets.Open("EnableWebBrowser.bin"))
             * using (var dest = File.Create(pathToFolder + "4.05/EnableWebBrowser.bin"))
             *  asset4.CopyTo(dest);
             * using (var asset5 = Assets.Open("FullDebugSettings.bin"))
             * using (var dest = File.Create(pathToFolder + "4.05/FullDebugSettings.bin"))
             *  asset5.CopyTo(dest);
             * using (var asset6 = Assets.Open("PS4HEN.bin"))
             * using (var dest = File.Create(pathToFolder + "4.05/PS4HEN.bin"))
             *  asset6.CopyTo(dest);
             *
             *
             * //Version 4.55 Payloads
             * using (var asset7 = Assets.Open("GameDumper.bin"))
             * using (var dest = File.Create(pathToFolder + "4.05/GameDumper.bin"))
             *  asset7.CopyTo(dest);
             * using (var asset8 = Assets.Open("PS4HolyGrail.bin"))
             * using (var dest = File.Create(pathToFolder + "4.55/PS4HolyGrail.bin"))
             *  asset8.CopyTo(dest);
             * using (var asset9 = Assets.Open("PermanentWebbrowser.bin"))
             * using (var dest = File.Create(pathToFolder + "4.55/PermanentWebbrowser.bin"))
             *  asset9.CopyTo(dest);
             * using (var asset10 = Assets.Open("DebugSettings.bin"))
             * using (var dest = File.Create(pathToFolder + "4.55/DebugSettings.bin"))
             *  asset10.CopyTo(dest);
             *
             *
             *
             */


            inject_btn = FindViewById <Button>(Resource.Id.inject_btn);

            inject_btn.Click += inject_btn_Click;
        }
        private void inject_btn_Click(object sender, EventArgs e)
        {
            inject_btn       = FindViewById <Button>(Resource.Id.inject_btn);
            payload_dropDown = FindViewById <Spinner>(Resource.Id.payload_DropDown);
            port             = FindViewById <EditText>(Resource.Id.ps4Port);
            ps4IPAdress      = FindViewById <EditText>(Resource.Id.PS4IP);

            Userfiles US = new Userfiles();

            US.IPAdress = ps4IPAdress.Text;
            US.Save();


            if (ps4IPAdress.Text == null || ps4IPAdress.Text == "Ps4 IP Adress..." || port.Text == null || payload_dropDown.SelectedItem == null)
            {
                AlertDialog.Builder msgBox = new AlertDialog.Builder(this);
                msgBox.SetTitle("Error!");
                msgBox.SetMessage("Enter IP Adress, Port and select a Payload!");
                msgBox.SetNeutralButton("Ok", delegate
                {
                    msgBox.Dispose();
                });
                msgBox.Show();
            }
            else
            {
                modPath = pathToFolder + "/" + currentVersion + "/" + payload_dropDown.SelectedItem.ToString();
                try
                {
                    if (File.Exists(modPath))
                    {
                        int portText = int.Parse(port.Text);
                        SendTCP(modPath, ps4IPAdress.Text, portText);
                    }
                    else
                    {
                        AlertDialog.Builder msgBox = new AlertDialog.Builder(this);
                        msgBox.SetTitle("Error!");
                        msgBox.SetMessage("Couldn't find the selected Payload!");
                        msgBox.SetNeutralButton("Ok", delegate
                        {
                            msgBox.Dispose();
                        });
                        msgBox.Show();
                    }
                }
                catch
                {
                    var msgBox = (new AlertDialog.Builder(this)).Create();
                    msgBox.SetTitle("Error!");
                    msgBox.SetMessage("Couldn't connect to PS4!");
                    msgBox.SetButton("Ok", delegate
                    {
                        msgBox.Dispose();
                    });
                    msgBox.SetButton2("Details", delegate
                    {
                        AlertDialog.Builder msg = new AlertDialog.Builder(this);
                        msg.SetTitle("Details:");
                        msg.SetMessage(errorMessage);
                        msg.SetNeutralButton("Ok", delegate
                        {
                            msg.Dispose();
                        });
                        msg.Show();
                    });
                    msgBox.Show();
                }
            }
        }