package com.metafox.app.AmigaDemoScene;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class DemoFront extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        setContentView(R.layout.demofront);
        findViewById(R.id.DemoGroups).setOnClickListener(new handleButton1000());
        findViewById(R.id.DemoTitles).setOnClickListener(new handleButton1001());
        findViewById(R.id.DemoParties).setOnClickListener(new handleButton1002());
        findViewById(R.id.DemoAbout).setOnClickListener(new handleButton1004());
        findViewById(R.id.DemoThisYear).setOnClickListener(new handleButton1005());
    }

    class handleButton1000 implements OnClickListener {
        public void onClick(View v) {
            Intent intent1000 = new Intent(DemoFront.this, DemoGroups.class);
            startActivity(intent1000);
        }
    }
    class handleButton1001 implements OnClickListener {
        public void onClick(View v) {
            Intent intent1001 = new Intent(DemoFront.this, DemoTitles.class);
            startActivity(intent1001);
        }
    }
    class handleButton1002 implements OnClickListener {
        public void onClick(View v) {
            Intent intent1002 = new Intent(DemoFront.this, DemoParties.class);
            startActivity(intent1002);
        }
    }
    class handleButton1004 implements OnClickListener {
        public void onClick(View v) {
            Intent intent1004 = new Intent(DemoFront.this, DemoAbout.class);
            startActivity(intent1004);
        }
    }
    class handleButton1005 implements OnClickListener {
        public void onClick(View v) {
            Intent intent1005 = new Intent(DemoFront.this, DemoThisYear.class);
            startActivity(intent1005);
        }
    }
    public void DemoYatseLink (View view) {
        goToUrl101 ( "https://play.google.com/store/apps/details?id=org.leetzone.android.yatsewidgetfree");
    }

    private void goToUrl101 (String url) {
        Uri uriUrl = Uri.parse(url);
        Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
        startActivity(launchBrowser);
    }

    public void Commodore (View view) {
        goToUrl102 ( "http://en.wikipedia.org/wiki/Commodore_International");
    }

    private void goToUrl102 (String url) {
        Uri uriUrl = Uri.parse(url);
        Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
        startActivity(launchBrowser);
    }

    public void LooniesNexus8YouTube (View view) {
        goToUrl103 ( "https://www.youtube.com/watch?v=Xs88vNBylQ4");
    }

    private void goToUrl103 (String url) {
        Uri uriUrl = Uri.parse(url);
        Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
        startActivity(launchBrowser);
    }

    public void DesertDreamC64YouTube (View view) {
        goToUrl104 ( "https://www.youtube.com/watch?v=oCiCntVGA4M");
    }

    private void goToUrl104 (String url) {
        Uri uriUrl = Uri.parse(url);
        Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
        startActivity(launchBrowser);
    }

    public void DesertDreamPCYouTube (View view) {
        goToUrl105 ( "https://www.youtube.com/watch?v=11fowneR08U");
    }

    private void goToUrl105 (String url) {
        Uri uriUrl = Uri.parse(url);
        Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
        startActivity(launchBrowser);
    }
}
