/// <summary>
        /// 控件双击的响应
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DiaryBreifControl_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var wnd = new DiaryWindow
            {
                Diary = Diary,
                Owner = Application.Current.MainWindow,
                Title = "修改日记",
            };

            wnd.ShowDialog();
        }
Esempio n. 2
0
 /// <summary>
 /// 日期控件双击的处理
 /// </summary>
 /// <param name="e"></param>
 private void AddNewDiary(DayEventArgs e)
 {
     var diary = new Diary
     {
         HappenTime = e.DayTime,
     };
     var wnd = new DiaryWindow
     {
         Diary = diary,
         Title="添加日记",
         Owner = Application.Current.MainWindow
     };
     if (true == wnd.ShowDialog())
     {
         DiaryCache.Diaries.Add(wnd.Diary);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// 日期控件双击的处理
        /// </summary>
        /// <param name="e"></param>
        private void AddNewDiary(DayEventArgs e)
        {
            var diary = new Diary
            {
                HappenTime = e.DayTime,
            };
            var wnd = new DiaryWindow
            {
                Diary = diary,
                Title = "添加日记",
                Owner = Application.Current.MainWindow
            };

            if (true == wnd.ShowDialog())
            {
                DiaryCache.Diaries.Add(wnd.Diary);
            }
        }
 /// <summary>
 /// 控件双击的响应
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void DiaryBreifControl_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     var wnd = new DiaryWindow
     {
         Diary = Diary,
         Owner = Application.Current.MainWindow,
         Title="修改日记",
     };
     wnd.ShowDialog();
 }