Changeset 287 for trunk/hiptop/pester/net/sabi
- Timestamp:
- 07/25/06 16:36:34 (18 years ago)
- Location:
- trunk/hiptop/pester/net/sabi/pester
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hiptop/pester/net/sabi/pester/Alarm.java
r280 r287 79 79 public void setUID(int uid) { 80 80 mUID = uid; 81 } 82 public void snoozeForMinutes(int minutes) { 83 mDate = new Date(); 84 mDate.addMinutes(minutes); 85 resume(); 81 86 } 82 87 -
trunk/hiptop/pester/net/sabi/pester/Pester.java
r278 r287 3 3 import danger.app.Application; 4 4 import danger.app.Event; 5 import danger.ui.AlertWindow; 5 import danger.app.IPCMessage; 6 import danger.ui.Layout; 7 import danger.ui.TextField; 8 import danger.ui.TextInputAlertWindow; 6 9 import danger.ui.ScreenWindow; 10 import danger.ui.StaticText; 7 11 import danger.util.DEBUG; 8 12 import java.util.Stack; … … 22 26 case Event.EVENT_ALARM: 23 27 Alarm alarm = (Alarm)e.argument; 24 AlertWindow alert = getAlert(ID_ALARM_ALERT, this);28 TextInputAlertWindow alert = getTextInputAlert(ID_ALARM_ALERT, this); 25 29 alert.setTitle(alarm.getDateTimeString()); 26 30 alert.setMessage(alarm.getMessage()); 27 31 alert.setShowTone(alarm.getAlert()); 28 alert.show(AlertWindow.SYSTEM_ALERT_TYPE_ALARM); 32 alert.disableButtonOnEmptyField(ID_SNOOZE_BUTTON, ID_SNOOZE_MINUTES); 33 alert.setShowCancel(false); 34 alert.show(TextInputAlertWindow.SYSTEM_ALERT_TYPE_ALARM); 29 35 sAlarmStack.push(alarm); 36 return true; 37 case EVENT_SET_ALARM: 38 AlarmSetDialog alarmSetDialog = AlarmSetDialog.getDialog(); 39 alarmSetDialog.setWindowStyle(AlarmSetDialog.SYSTEM_DIALOG_STYLE); 40 alarmSetDialog.editAlarm((Alarm)sAlarmStack.pop(),false); 41 return true; 42 case EVENT_SNOOZE_ALARM: 43 String snoozeMinutesString = 44 TextInputAlertWindow. 45 getTextFieldValue((IPCMessage)e.argument, 46 ID_SNOOZE_MINUTES); 47 int snoozeMinutes = Integer.parseInt(snoozeMinutesString); 48 ((Alarm)sAlarmStack.pop()).snoozeForMinutes(snoozeMinutes); 30 49 return true; 31 50 case EVENT_DISMISS_ALARM:
Note:
See TracChangeset
for help on using the changeset viewer.