Ejemplo n.º 1
0
 public override void OnCreate()
 {
     base.OnCreate();
     timer                    = new CountDownTimer(0, 0);
     timer.TimeChanged       += Timer_TimeChanged;
     timer.CountDownFinished += Timer_CountDownFinished;
     timerBroadcastIntent     = new Intent("com.kudchikarsk.remindme.timer");
 }
Ejemplo n.º 2
0
 private void Timer_CountDownFinished()
 {
     timerBroadcastIntent.PutExtra("status", 2);
     SendBroadcast(timerBroadcastIntent);
     timer.TimeChanged       -= Timer_TimeChanged;
     timer.CountDownFinished -= Timer_CountDownFinished;
     timer.Dispose();
     timer = null;
     StopSelf();
 }
Ejemplo n.º 3
0
        public override void OnDestroy()
        {
            base.OnDestroy();

            if (timer != null)
            {
                timer.TimeChanged       -= Timer_TimeChanged;
                timer.CountDownFinished -= Timer_CountDownFinished;
                timer.Dispose();
            }
            timer = null;
        }