You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.9 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace StartServerWPF.Modules.Main.Views
{
/// <summary>
/// ModifyDeviceView.xaml 的交互逻辑
/// </summary>
public partial class SetParamDialog : UserControl
{
public SetParamDialog()
{
InitializeComponent();
}
private void calendar_DisplayModeChanged(object sender, CalendarModeChangedEventArgs e)
{
if (calendar.DisplayMode == CalendarMode.Month || calendar.DisplayMode == CalendarMode.Decade)
{
calendar.DisplayMode = CalendarMode.Year;
}
}
/// <summary>
/// 点击日历图标显示Calendar控件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void tb_calendar_img_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
if (Pop.IsOpen)
{
Pop.IsOpen = false;
}
else
{
Pop.IsOpen = true;
}
}
///// <summary>
///// 监听日期变化隐藏Calendar控件
///// </summary>
///// <param name="sender"></param>
///// <param name="e"></param>
//private void calendar_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)
//{
// var year = calendar.DisplayDate.Date.Year;
// var month = calendar.DisplayDate.Date.Month;
// tb_calendar.Text = year + "年" + month + "月";
// Pop.IsOpen = false;
//}
}
}