Example #1
0
        public void Update()
        {
            _currentEntry.Subject        = Subject;
            _currentEntry.AlarmOn        = AlarmOn;
            _currentEntry.RepeatType     = RepeatType.ToString();
            _currentEntry.AlarmTime      = AlarmTime;
            _currentEntry.ExpirationTime = ExpirationTime;
            _currentEntry.Vibrate        = Vibrate;
            _currentEntry.RingTone       = RingTone.ToString();
            _currentEntry.ExtraInfo      = AlarmOn ? AlarmTime.ToShortTimeString() : AppResources.NoAlarmText;

            EntryDataContext.Instance.UpdateEntry(_currentEntry);
            if (_currentEntry.AlarmOn)
            {
                AlarmUtilities.UpdateAlarm(_currentEntry);
            }
        }
Example #2
0
        public void Store(DateTime startTime)
        {
            Entry entry = new Entry
            {
                EntryId        = System.Guid.NewGuid().ToString(),
                EntryType      = EntryType.Anniversary.ToString(),
                CreateTime     = DateTime.Now,
                StartTime      = startTime.Date,
                ExpirationTime = this.ExpirationTime,
                Subject        = this.Subject,
                RepeatType     = this.RepeatType.ToString(),
                ExtraInfo      = this.AlarmOn ? AlarmTime.ToShortTimeString() : AppResources.NoAlarmText,
                AlarmOn        = this.AlarmOn,
                AlarmTime      = this.AlarmTime,
                RingTone       = this.RingTone.ToString(),
                Vibrate        = this.Vibrate
            };

            EntryDataContext.Instance.AddEntry(entry);
            if (AlarmOn)
            {
                AlarmUtilities.AddAlarm(entry);
            }
        }
Example #3
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     //display picked alarm
     lblAlarmTime.Text    = AlarmTime.ToShortTimeString();
     lblAlarmTime.Visible = true;
 }