Advertisement
manski

Crashing code

Sep 11th, 2012
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.78 KB | None | 0 0
  1. using System;
  2. using Android.App;
  3. using Android.Content.PM;
  4. using Android.OS;
  5. using Android.Widget;
  6. using Exception = System.Exception;
  7.  
  8. namespace SensorRecorder {
  9.   [Activity(Label = "SensorRecorder", MainLauncher = true, Icon = "@drawable/icon",
  10.     ScreenOrientation = ScreenOrientation.Portrait)]
  11.   public class Activity1 : Activity {
  12.     private Button m_startStopButton;
  13.  
  14.     protected override void OnCreate(Bundle bundle) {
  15.       base.OnCreate(bundle);
  16.  
  17.       SetContentView(Resource.Layout.Main);
  18.  
  19.       this.m_startStopButton = FindViewById<Button>(Resource.Id.StartStopButton);
  20.       this.m_startStopButton.Click += OnStartStopButton;
  21.     }
  22.  
  23.     private void OnStartStopButton(object sender, EventArgs e) {
  24.       throw new Exception("Just a test");
  25.     }
  26.   }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement