Remove obsolete class EventDelay

(not used since 1.3.0.4)
This commit is contained in:
Peter Kirmeier 2023-05-19 15:36:15 +02:00
parent 13e7cedaa6
commit 9fd7da2e98
3 changed files with 4 additions and 31 deletions

View file

@ -6,7 +6,9 @@ namespace SystemTrayMenu.Helpers
{
using System;
using System.Windows.Input;
#if TODO //HOTKEY
using SystemTrayMenu.UserInterface.HotkeyTextboxControl;
#endif
using SystemTrayMenu.Utilities;
using static SystemTrayMenu.Utilities.FormsExtensions;

View file

@ -1,31 +0,0 @@
// <copyright file="EventDelay.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace SystemTrayMenu.UserInterface.HotkeyTextboxControl
{
using System;
public class EventDelay
{
private readonly object checkLock = new();
private readonly long waitTime;
private long lastCheck;
public EventDelay(long ticks)
{
waitTime = ticks;
}
public bool Check()
{
lock (checkLock)
{
long now = DateTime.Now.Ticks;
bool isPassed = now - lastCheck > waitTime;
lastCheck = now;
return isPassed;
}
}
}
}

View file

@ -7,7 +7,9 @@ namespace SystemTrayMenu.Utilities
using System;
using System.Diagnostics;
using System.Linq;
#if TODO //HOTKEY
using SystemTrayMenu.UserInterface.HotkeyTextboxControl;
#endif
internal static class SingleAppInstance
{