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 { /// /// Exit.xaml 的交互逻辑 /// 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"); } } } }