protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Scores); ListLeaderBoard = FindViewById <ListView>(Resource.Id.listView1); btnReturn = FindViewById <Button>(Resource.Id.btnReturn); objDb = new DataBaseManager(); scoreslist = objDb.ViewLeaderboard(); ListLeaderBoard.Adapter = new DataAdapter(this, scoreslist); btnReturn.Click += BtnReturn_Click; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.game); letterA = FindViewById <Button>(Resource.Id.btnA); letterB = FindViewById <Button>(Resource.Id.btnB); letterC = FindViewById <Button>(Resource.Id.btnC); letterD = FindViewById <Button>(Resource.Id.btnD); letterE = FindViewById <Button>(Resource.Id.btnE); letterF = FindViewById <Button>(Resource.Id.btnF); letterG = FindViewById <Button>(Resource.Id.btnG); letterH = FindViewById <Button>(Resource.Id.btnH); letterI = FindViewById <Button>(Resource.Id.btnI); letterJ = FindViewById <Button>(Resource.Id.btnJ); letterK = FindViewById <Button>(Resource.Id.btnK); letterL = FindViewById <Button>(Resource.Id.btnL); letterM = FindViewById <Button>(Resource.Id.btnM); letterN = FindViewById <Button>(Resource.Id.btnN); letterO = FindViewById <Button>(Resource.Id.btnO); letterP = FindViewById <Button>(Resource.Id.btnP); letterQ = FindViewById <Button>(Resource.Id.btnQ); letterR = FindViewById <Button>(Resource.Id.btnR); letterS = FindViewById <Button>(Resource.Id.btnS); letterT = FindViewById <Button>(Resource.Id.btnT); letterU = FindViewById <Button>(Resource.Id.btnU); letterV = FindViewById <Button>(Resource.Id.btnV); letterW = FindViewById <Button>(Resource.Id.btnW); letterX = FindViewById <Button>(Resource.Id.btnX); letterY = FindViewById <Button>(Resource.Id.btnY); letterZ = FindViewById <Button>(Resource.Id.btnZ); lblScore = FindViewById <TextView>(Resource.Id.lblScore); imgHang = FindViewById <ImageView>(Resource.Id.imgHangman); linearWord = FindViewById <LinearLayout>(Resource.Id.linearLayout2); // Create your application here CopyDatabase(); objDb = new DataBaseManager(); myList = objDb.ViewAll(); ChooseWord(); // Get our button from the layout resource, // and attach an event to it letterA.Click += Letter_Click; letterB.Click += Letter_Click; letterC.Click += Letter_Click; letterD.Click += Letter_Click; letterE.Click += Letter_Click; letterF.Click += Letter_Click; letterG.Click += Letter_Click; letterH.Click += Letter_Click; letterI.Click += Letter_Click; letterJ.Click += Letter_Click; letterK.Click += Letter_Click; letterL.Click += Letter_Click; letterM.Click += Letter_Click; letterN.Click += Letter_Click; letterO.Click += Letter_Click; letterP.Click += Letter_Click; letterQ.Click += Letter_Click; letterR.Click += Letter_Click; letterS.Click += Letter_Click; letterT.Click += Letter_Click; letterU.Click += Letter_Click; letterV.Click += Letter_Click; letterW.Click += Letter_Click; letterX.Click += Letter_Click; letterY.Click += Letter_Click; letterZ.Click += Letter_Click; }