private void OnDeleteClick(object sender, EventArgs e) { SoundUtilities.Instance().Play(SoundType.AppbarClicked); _mode = MainPageMode.MainView; _memoPlayerViewModel.Remove(); StopMemoPlaying(); }
private void OnImageManipulationStarted(object sender, ManipulationStartedEventArgs e) { BitmapImage img = new BitmapImage(new Uri( "/Resources/Images/TryToPlay_press.png", UriKind.Relative)); _tryToPlayImage.Source = img; AnniversaryViewModel viewModel = (AnniversaryViewModel)_ringtoneListPicker.DataContext; switch (viewModel.RingTone) { case RingTone.SchoolBell: SoundUtilities.Instance().Play(SoundType.SchoolBell); break; case RingTone.Chaotic: SoundUtilities.Instance().Play(SoundType.Chaotic); break; case RingTone.DingTone: SoundUtilities.Instance().Play(SoundType.DingTone); break; default: break; } base.OnManipulationStarted(e); }
protected override void OnBackKeyPress(CancelEventArgs e) { SoundUtilities.Instance().Play(SoundType.AppbarClicked); switch (_mode) { case MainPageMode.MainView: base.OnBackKeyPress(e); break; case MainPageMode.MemoRecording: _mode = MainPageMode.MainView; StopMemoRecording(); e.Cancel = true; break; case MainPageMode.MemoPlaying: _mode = MainPageMode.MainView; StopMemoPlaying(); e.Cancel = true; break; default: break; } }
private void OnAboutClick(object sender, EventArgs e) { SoundUtilities.Instance().Play(SoundType.AppbarClicked); this.NavigationService.Navigate( new Uri("/AboutPage.xaml", UriKind.Relative)); }
private void OnAlarmClick(object sender, EventArgs e) { SoundUtilities.Instance().Play(SoundType.AppbarClicked); string startTimeStr = _calendarMonthView.CurrentDay.ToLongDateString(); this.NavigationService.Navigate( new Uri("/AlarmPage.xaml?StartTime=" + startTimeStr, UriKind.Relative)); }
private void OnResumeClick(object sender, EventArgs e) { SoundUtilities.Instance().Play(SoundType.AppbarClicked); _memoPlayerViewModel.Resume(); _memoPlayerPanel.Start(); this.ApplicationBar.Buttons.Remove(_resumeAppbarIconButton); this.ApplicationBar.Buttons.Insert(0, _pauseAppbarIconButton); }
private void OnMemoClick(object sender, EventArgs e) { SoundUtilities.Instance().Play(SoundType.AppbarClicked); BeginRecorderStoryboard.Begin(); this.ApplicationBar.Buttons.Clear(); this.ApplicationBar.Buttons.Add(_stopAppbarIconButton); DisableApplicationBar(); }
private bool AssertApply() { bool ret = false; if (string.IsNullOrEmpty(_AnniversaryViewModel.Subject) || _AnniversaryViewModel.Subject == AppResources.EnterSubjectText) { SoundUtilities.Instance().Play(SoundType.Note); VibrateUtilities.Instance().Vibrate(VibrateType.ShortVibrate); MessageBox.Show( AppResources.EmptySubjectWarningText, AppResources.WarningTitleText, MessageBoxButton.OK ); } else if (_AnniversaryViewModel.AlarmOn && ((_AnniversaryViewModel.AlarmTime < DateTime.Now && _AnniversaryViewModel.RepeatType == RepeatType.NotRepeated) || _AnniversaryViewModel.ExpirationTime < DateTime.Now)) { SoundUtilities.Instance().Play(SoundType.Note); VibrateUtilities.Instance().Vibrate(VibrateType.ShortVibrate); MessageBox.Show( AppResources.AlarmExpiredWarningText, AppResources.WarningTitleText, MessageBoxButton.OK ); } else if (_AnniversaryViewModel.AlarmOn && _startTime.Date > _AnniversaryViewModel.ExpirationTime) { SoundUtilities.Instance().Play(SoundType.Note); VibrateUtilities.Instance().Vibrate(VibrateType.ShortVibrate); MessageBox.Show( AppResources.AnniversaryExpirationWarningText, AppResources.WarningTitleText, MessageBoxButton.OK ); } else { ret = true; } return(ret); }
private void GestureListener_Flick(object sender, FlickGestureEventArgs e) { if (e.VerticalVelocity > FlickVelocity) { SoundUtilities.Instance().Play(SoundType.Slipping); Date = Date.AddMonths(1); CurrentDay = Date; } if (e.VerticalVelocity < -FlickVelocity) { SoundUtilities.Instance().Play(SoundType.Slipping); Date = Date.AddMonths(-1); CurrentDay = Date; } }
private void OnDatePickerTap(object sender, GestureEventArgs e) { SoundUtilities.Instance().Play(SoundType.CalendarPanelStart); }
private void DoBack() { SoundUtilities.Instance().Play(SoundType.AppbarClicked); this.NavigationService.GoBack(); }
protected override void OnBackKeyPress(CancelEventArgs e) { SoundUtilities.Instance().Play(SoundType.AppbarClicked); base.OnBackKeyPress(e); }
private void OnOkClick(object sender, EventArgs e) { SoundUtilities.Instance().Play(SoundType.AppbarClicked); this.NavigationService.GoBack(); }
private void OnStopClick(object sender, EventArgs e) { SoundUtilities.Instance().Play(SoundType.AppbarClicked); _mode = MainPageMode.MainView; StopMemoRecording(); }