void ActionRadioButton_Click(object sender, EventArgs e) { int position = (int)((RadioButton)sender).GetTag(Resource.Id.action_radio_button); if (oldActionID != position) { Console.WriteLine("oldActionID != position" + oldActionID + "," + position); selected.Checked = false; oldActionID = position; selected = (RadioButton)sender; } ActionMngr.StartPlayer(context, ActionMngr.Actions[SelectedActionID], 1, 1); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); RequestWindowFeature(WindowFeatures.NoTitle); SetContentView(Resource.Layout.AlarmGoingOff); alarmOff = FindViewById <Button>(Resource.Id.alarmgoingoff_off); alarmSnooze = FindViewById <Button> (Resource.Id.alarmgoingoff_snooze); alarmTime = FindViewById <TextView> (Resource.Id.alarmgoingoff_time); alarmOff.Click += AlarmOff_Click; alarmSnooze.Click += AlarmSnooze_Click; alarm = (Alarm)this.Intent.GetParcelableExtra("startAlarm"); string time = string.Format("{0}.{1}", alarm.Time.Hours.ToString(), alarm.Time.Minutes.ToString().PadLeft(2, '0')); alarmTime.Text = time; AlarmAction action = ActionMngr.Actions[alarm.ActionID]; ActionMngr.StartPlayer(this, action, alarm.Duration, alarm.Volume); }