~lac-team/lilalarmclock/devel-1.0

« back to all changes in this revision

Viewing changes to Little Alarm Clock/AlarmFrm.cs

  • Committer: whizzey
  • Date: 2011-12-12 21:57:14 UTC
  • Revision ID: whiteghost89@gmail.com-20111212215714-hbrmldouclg298yv
flexible snooze time

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
        public AlarmFrm(DateTime dateTime, string strDescription)
45
45
        {
46
46
            InitializeComponent();
47
 
 
48
 
            this.Icon = SystemIcons.Warning;
49
47
            this.textBox1.Text = string.Format("It is now {0:T}\r\nDescription: {1}", dateTime, strDescription);
50
48
 
51
49
            PlayAlarm();
61
59
                FileInfo fiFile = new FileInfo(strAlarmPath);
62
60
                if (fiFile.Exists)
63
61
                {
 
62
                //TODO: Sound abspielen
64
63
#if Release
65
64
                this.objAudio = new Audio(strAlarmPath);
66
65
                this.objAudio.Play();
96
95
 
97
96
        private void buttonSnooze_Click(object sender, EventArgs e)
98
97
        {
 
98
            int nSnoozeMinutes = Properties.Settings.Default.nSnoozeMinutes;
 
99
 
99
100
            // Display alarm 9 minutes from now
100
 
            SnoozeEventArgs args = new SnoozeEventArgs(DateTime.Now.AddMinutes(9));
 
101
            SnoozeEventArgs args = new SnoozeEventArgs(
 
102
                DateTime.Now.AddMinutes(nSnoozeMinutes));
101
103
 
102
104
            AddSnoozeTimer(this, args);
103
105
        }