示例#1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.highScores);

            lvHighscores = FindViewById<ListView> (Resource.Id.listView1);

            objDb = new databaseManager ();

            lstHighscore = objDb.getScores ();

            lvHighscores.Adapter = new SimpleListItem2Adapter (this, lstHighscore);
        }
示例#2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.Main);

            txtUserName = FindViewById<EditText> (Resource.Id.txtUserName);
            txtPassword = FindViewById<EditText> (Resource.Id.txtPassword);

            btnSignIn = FindViewById<Button> (Resource.Id.btnSignIn);
            btnSignUp = FindViewById<Button> (Resource.Id.btnSignUp);

            //TEST
            btnTest = FindViewById<Button> (Resource.Id.btnTest);

            CopyDatabase ();

            objDb = new databaseManager ();

            btnSignIn.Click += OnSignInClick;
            btnSignUp.Click += OnSignUpClick;

            //TEST
            btnTest.Click += OnTestClick;
        }
示例#3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            SetContentView (Resource.Layout.game);

            txtScore = FindViewById<TextView> (Resource.Id.txtScore);

            ivHangMan = FindViewById<ImageView> (Resource.Id.ivHangMan);

            txtWord = FindViewById<TextView> (Resource.Id.txtWord);

            btnQ = FindViewById<Button> (Resource.Id.btnQ);
            btnW = FindViewById<Button> (Resource.Id.btnW);
            btnE = FindViewById<Button> (Resource.Id.btnE);
            btnR = FindViewById<Button> (Resource.Id.btnR);
            btnT = FindViewById<Button> (Resource.Id.btnT);
            btnY = FindViewById<Button> (Resource.Id.btnY);
            btnU = FindViewById<Button> (Resource.Id.btnU);
            btnI = FindViewById<Button> (Resource.Id.btnI);
            btnO = FindViewById<Button> (Resource.Id.btnO);
            btnP = FindViewById<Button> (Resource.Id.btnP);
            btnA = FindViewById<Button> (Resource.Id.btnA);
            btnS = FindViewById<Button> (Resource.Id.btnS);
            btnD = FindViewById<Button> (Resource.Id.btnD);
            btnF = FindViewById<Button> (Resource.Id.btnF);
            btnG = FindViewById<Button> (Resource.Id.btnG);
            btnH = FindViewById<Button> (Resource.Id.btnH);
            btnJ = FindViewById<Button> (Resource.Id.btnJ);
            btnK = FindViewById<Button> (Resource.Id.btnK);
            btnL = FindViewById<Button> (Resource.Id.btnL);
            btnZ = FindViewById<Button> (Resource.Id.btnZ);
            btnX = FindViewById<Button> (Resource.Id.btnX);
            btnC = FindViewById<Button> (Resource.Id.btnC);
            btnV = FindViewById<Button> (Resource.Id.btnV);
            btnB = FindViewById<Button> (Resource.Id.btnB);
            btnN = FindViewById<Button> (Resource.Id.btnN);
            btnM = FindViewById<Button> (Resource.Id.btnM);

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

            buttonList = new List<Button> {
                btnQ, btnW, btnE, btnR, btnT, btnY, btnU, btnI, btnO, btnP,
                btnA, btnS, btnD, btnF, btnG, btnH, btnJ, btnK, btnL, btnZ,
                btnX, btnC, btnV, btnB, btnN, btnM
            };

            objDb = new databaseManager ();

            wordsList = objDb.loadWords();

            username = Intent.GetStringExtra("username");

            newGame ();

            foreach (Button b in buttonList)
            {
                b.Click += OnLetterClick;
            }

            btnRestart.Click += OnRestartClick;
        }