mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-05-16 10:22:34 +12:00
[BUG] Fix Disappears after relogin via rdp (#307), 1.2.3.1
This commit is contained in:
parent
d6fc6941db
commit
282eede778
|
@ -68,15 +68,6 @@ namespace SystemTrayMenu
|
|||
|
||||
private void SystemEvents_DisplaySettingsChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (menus.IsShortlyAfterOpening())
|
||||
{
|
||||
Log.Info("Ignored DisplaySettingsChanged, because IsShortlyAfterOpening == true");
|
||||
}
|
||||
else
|
||||
{
|
||||
AppRestart.ByDisplaySettings();
|
||||
}
|
||||
|
||||
menus.ReAdjustSizeAndLocation();
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ namespace SystemTrayMenu.Business
|
|||
private readonly WaitLeave waitLeave = new(Properties.Settings.Default.TimeUntilCloses);
|
||||
private DateTime deactivatedTime = DateTime.MinValue;
|
||||
private DateTime dateTimeLastOpening = DateTime.MinValue;
|
||||
private DateTime dateTimeDisplaySettingsChanged = DateTime.MinValue;
|
||||
private OpenCloseState openCloseState = OpenCloseState.Default;
|
||||
private bool showingMessageBox;
|
||||
private TaskbarPosition taskbarPosition = new WindowsTaskbar().Position;
|
||||
|
@ -569,13 +568,7 @@ namespace SystemTrayMenu.Business
|
|||
|
||||
internal bool IsOpenCloseStateOpening()
|
||||
{
|
||||
return openCloseState == OpenCloseState.Opening || (DateTime.Now - dateTimeDisplaySettingsChanged).TotalMilliseconds < 500;
|
||||
}
|
||||
|
||||
internal bool IsShortlyAfterOpening()
|
||||
{
|
||||
dateTimeDisplaySettingsChanged = DateTime.Now;
|
||||
return (DateTime.Now - dateTimeLastOpening).TotalMilliseconds < 2000;
|
||||
return openCloseState == OpenCloseState.Opening;
|
||||
}
|
||||
|
||||
internal void SwitchOpenClose(bool byClick, bool isMainPreload = false)
|
||||
|
|
|
@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.2.3.0")]
|
||||
[assembly: AssemblyFileVersion("1.2.3.0")]
|
||||
[assembly: AssemblyVersion("1.2.3.1")]
|
||||
[assembly: AssemblyFileVersion("1.2.3.1")]
|
||||
|
|
|
@ -24,11 +24,6 @@ namespace SystemTrayMenu.Utilities
|
|||
Restart(GetCurrentMethod());
|
||||
}
|
||||
|
||||
internal static void ByDisplaySettings()
|
||||
{
|
||||
Restart(GetCurrentMethod());
|
||||
}
|
||||
|
||||
internal static void ByConfigChange()
|
||||
{
|
||||
Restart(GetCurrentMethod());
|
||||
|
|
Loading…
Reference in a new issue