You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.9 KiB
66 lines
1.9 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Net;
|
|
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.Markup;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Animation;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Shapes;
|
|
using System.Windows.Threading;
|
|
using System.Xml.Linq;
|
|
using static DyeingComputer.UserClass.SqliteHelper;
|
|
using static DyeingComputer.Windows.ViewStep;
|
|
|
|
namespace DyeingComputer.Windows
|
|
{
|
|
/// <summary>
|
|
/// ViewProgram.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class UserCall : Window
|
|
{
|
|
DateTime times = DateTime.Now;
|
|
TimeSpan timeSpan5=new TimeSpan(0,0,0,5);
|
|
|
|
public UserCall()
|
|
{
|
|
InitializeComponent();
|
|
NOT.Visibility =Visibility.Collapsed;
|
|
Muffling_.IsEnabled = false;
|
|
|
|
DispatcherTimer disTimer = new DispatcherTimer
|
|
{
|
|
Interval = TimeSpan.FromMilliseconds(950) //毫秒
|
|
};
|
|
disTimer.Tick += DisTimer_1S;
|
|
disTimer.Start();//计时开始
|
|
}
|
|
void DisTimer_1S(object sender, EventArgs e)
|
|
{
|
|
TimeSpan timeSpan = DateTime.Now - times;
|
|
TIME_.Text = timeSpan.ToString(@"hh\:mm\:ss");
|
|
|
|
if (timeSpan>timeSpan5) Muffling_.IsEnabled=true;//5秒后允许禁英
|
|
}
|
|
|
|
private void YES_Click(object sender, RoutedEventArgs e)//确认
|
|
{
|
|
this.Close(); //关闭窗口
|
|
}
|
|
|
|
private void Muffling_Click(object sender, RoutedEventArgs e)//
|
|
{
|
|
NOT.Visibility = Visibility.Visible;
|
|
}
|
|
|
|
}
|
|
}
|
|
|