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.
 
 
 
 

50 lines
1.3 KiB

using IOTContainer.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
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.Shapes;
namespace IOTContainer.View
{
/// <summary>
/// Exit.xaml 的交互逻辑
/// </summary>
public partial class Exit : Window
{
private Timer timer;
private int ExitNum = 0;
public Exit()
{
InitializeComponent();
timer = new Timer(_ => Dispatcher.BeginInvoke(new Action(() => TimeRun())), null, 0, 1000);
}
private void TimeRun()
{
WinApi.FindSetTop(null, "Exit");
if (DateTime.Now.Second == 0 || DateTime.Now.Second == 30)
{
ExitNum = 0;
}
}
private void Border_MouseDown(object sender, MouseButtonEventArgs e)
{
ExitNum++;
if (ExitNum == 5)
{
ExitPwd exitPwd = new ExitPwd();
exitPwd.Show();
WinApi.FindSetTop(null, "ExitPwd");
}
}
}
}