Example #1
0
        /// <summary>
        /// 外部调用备忘提醒
        /// </summary>
        public void OpenMemoReminder()
        {
            ReminderView view = new ReminderView();

            view.DataContext = new ReminderViewModel("备忘提醒");
            view?.Show();
        }
Example #2
0
        /// <summary>
        /// 外部调用远程提醒
        /// </summary>
        public void OpenRemoteReminder()
        {
            ReminderView view = new ReminderView();

            view.DataContext = new ReminderViewModel("远程提醒");
            view?.Show();
        }
 /// <summary>
 /// 提醒按钮
 /// </summary>
 /// <param name="element"></param>
 private void Remind(ButtonBase element)
 {
     Task.Factory.StartNew(() =>
     {
         //Thread.Sleep(500);
         DispatcherHelper.CheckBeginInvokeOnUI(
             () =>
         {
             ReminderView view = new ReminderView();
             view.DataContext  = new ReminderViewModel.ReminderViewModel();
             view.Show();
         });
     }).ContinueWith(result =>
     {
         if (result.IsFaulted)
         {
         }
     });
 }