mirror of https://github.com/quasar/Quasar.git
Cross-Thread exception handled
Cross-Thread exception on Uninstall
This commit is contained in:
parent
860b59ac7d
commit
46bd17c4fa
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using xServer.Core.Helper;
|
||||
|
@ -68,27 +69,27 @@ private static void ShowPopup(Client c)
|
|||
FrmMain.Instance.nIcon.ShowBalloonTip(30, string.Format("Client connected from {0}!", c.Value.Country), string.Format("IP Address: {0}\nOperating System: {1}", c.EndPoint.Address.ToString(), c.Value.OperatingSystem), ToolTipIcon.Info);
|
||||
}
|
||||
|
||||
public static void HandleStatus(Client client, Status packet)
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
foreach (ListViewItem lvi in FrmMain.Instance.lstClients.Items)
|
||||
{
|
||||
Client c = (Client)lvi.Tag;
|
||||
if (client == c)
|
||||
{
|
||||
FrmMain.Instance.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
lvi.SubItems[3].Text = packet.Message;
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
public static void HandleStatus(Client client, Status packet)
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
FrmMain.Instance.Invoke((MethodInvoker) delegate
|
||||
{
|
||||
foreach (ListViewItem lvi in FrmMain.Instance.lstClients.Items)
|
||||
{
|
||||
Client c = (Client) lvi.Tag;
|
||||
if (client == c)
|
||||
{
|
||||
lvi.SubItems[3].Text = packet.Message;
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}).Start();
|
||||
}
|
||||
}).Start();
|
||||
}
|
||||
|
||||
public static void HandleUserStatus(Client client, UserStatus packet)
|
||||
public static void HandleUserStatus(Client client, UserStatus packet)
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue