Benachrichtigungen verschwinden nicht mehr einfach
This commit is contained in:
@@ -24,6 +24,7 @@ using ChatController.HauptKlassen;
|
||||
using ChatController.LoginKlassen;
|
||||
using ChatController.Utilities;
|
||||
using ChatController.Utilities.Extensions;
|
||||
using Application = System.Windows.Forms.Application;
|
||||
using Button = System.Windows.Controls.Button;
|
||||
using Cursors = System.Windows.Input.Cursors;
|
||||
using DataFormats = System.Windows.DataFormats;
|
||||
@@ -244,10 +245,11 @@ namespace ChatController
|
||||
|
||||
SelectContact(_ContactList.FirstOrDefault(f => f.GroupId.Equals(pGroupId)));
|
||||
};
|
||||
|
||||
|
||||
notifyIcon.BalloonTipClosed += (sender, args) =>
|
||||
{
|
||||
DisposeAndRemoveNotification((NotifyIcon)sender, pGroupId);
|
||||
// TODO: wird beim ausblenden bzw. automatischem Schließen des "Balloons" ausgelöst
|
||||
//DisposeAndRemoveNotification((NotifyIcon)sender, pGroupId);
|
||||
};
|
||||
|
||||
_Group2NotifyIcons.AddOrUpdateValueInDictionary(pGroupId, notifyIcon);
|
||||
@@ -261,7 +263,9 @@ namespace ChatController
|
||||
{
|
||||
foreach(var notifyIcon in group2NotifyIcon.Value)
|
||||
{
|
||||
notifyIcon.Icon = null;
|
||||
notifyIcon.Dispose();
|
||||
Application.DoEvents();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,6 +276,9 @@ namespace ChatController
|
||||
{
|
||||
pNotification.Dispose();
|
||||
_Group2NotifyIcons.Remove(pGroupId);
|
||||
|
||||
|
||||
Application.DoEvents();
|
||||
}
|
||||
|
||||
public void ResetStyle()
|
||||
|
||||
Reference in New Issue
Block a user