Remove BeginUpdate EndUpdate
This commit is contained in:
parent
55e0a49dff
commit
4511d9fb57
@ -11,10 +11,6 @@ namespace AsyncRAT_Sharp.Handle_Packet
|
|||||||
public class HandleListView
|
public class HandleListView
|
||||||
{
|
{
|
||||||
public void AddToListview(Clients client, MsgPack unpack_msgpack)
|
public void AddToListview(Clients client, MsgPack unpack_msgpack)
|
||||||
{
|
|
||||||
if (Program.form1.listView1.InvokeRequired)
|
|
||||||
{
|
|
||||||
Program.form1.listView1.BeginInvoke((MethodInvoker)(() =>
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -39,12 +35,14 @@ namespace AsyncRAT_Sharp.Handle_Packet
|
|||||||
client.LV.ToolTipText += "[Pastebin] " + unpack_msgpack.ForcePathObject("Pastebin").AsString;
|
client.LV.ToolTipText += "[Pastebin] " + unpack_msgpack.ForcePathObject("Pastebin").AsString;
|
||||||
client.ID = unpack_msgpack.ForcePathObject("HWID").AsString;
|
client.ID = unpack_msgpack.ForcePathObject("HWID").AsString;
|
||||||
|
|
||||||
|
if (Program.form1.listView1.InvokeRequired)
|
||||||
|
{
|
||||||
|
Program.form1.listView1.BeginInvoke((MethodInvoker)(() =>
|
||||||
|
{
|
||||||
lock (Settings.Listview1Lock)
|
lock (Settings.Listview1Lock)
|
||||||
{
|
{
|
||||||
Program.form1.listView1.BeginUpdate();
|
|
||||||
Program.form1.listView1.Items.Add(client.LV);
|
Program.form1.listView1.Items.Add(client.LV);
|
||||||
Program.form1.listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
|
Program.form1.listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
|
||||||
Program.form1.listView1.EndUpdate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Properties.Settings.Default.Notification == true)
|
if (Properties.Settings.Default.Notification == true)
|
||||||
@ -53,10 +51,10 @@ namespace AsyncRAT_Sharp.Handle_Packet
|
|||||||
{client.ClientSocket.RemoteEndPoint.ToString().Split(':')[0]} : {client.ClientSocket.LocalEndPoint.ToString().Split(':')[1]}";
|
{client.ClientSocket.RemoteEndPoint.ToString().Split(':')[0]} : {client.ClientSocket.LocalEndPoint.ToString().Split(':')[1]}";
|
||||||
Program.form1.notifyIcon1.ShowBalloonTip(100);
|
Program.form1.notifyIcon1.ShowBalloonTip(100);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
lock (Settings.Online)
|
lock (Settings.Online)
|
||||||
{
|
{
|
||||||
|
@ -24,9 +24,7 @@ namespace AsyncRAT_Sharp.Handle_Packet
|
|||||||
LV.ForeColor = color;
|
LV.ForeColor = color;
|
||||||
lock (Settings.Listview2Lock)
|
lock (Settings.Listview2Lock)
|
||||||
{
|
{
|
||||||
Program.form1.listView2.BeginUpdate();
|
|
||||||
Program.form1.listView2.Items.Insert(0, LV);
|
Program.form1.listView2.Items.Insert(0, LV);
|
||||||
Program.form1.listView2.EndUpdate();
|
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -28,9 +28,7 @@ namespace AsyncRAT_Sharp.Handle_Packet
|
|||||||
client.LV2.ImageKey = client.ID;
|
client.LV2.ImageKey = client.ID;
|
||||||
lock (Settings.Listview3Lock)
|
lock (Settings.Listview3Lock)
|
||||||
{
|
{
|
||||||
Program.form1.listView3.BeginUpdate();
|
|
||||||
Program.form1.listView3.Items.Add(client.LV2);
|
Program.form1.listView3.Items.Add(client.LV2);
|
||||||
Program.form1.listView3.EndUpdate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -40,10 +38,8 @@ namespace AsyncRAT_Sharp.Handle_Packet
|
|||||||
{
|
{
|
||||||
lock (Settings.Listview3Lock)
|
lock (Settings.Listview3Lock)
|
||||||
{
|
{
|
||||||
Program.form1.listView3.BeginUpdate();
|
|
||||||
Program.form1.ThumbnailImageList.Images.RemoveByKey(client.ID);
|
Program.form1.ThumbnailImageList.Images.RemoveByKey(client.ID);
|
||||||
Program.form1.ThumbnailImageList.Images.Add(client.ID, Bitmap.FromStream(memoryStream));
|
Program.form1.ThumbnailImageList.Images.Add(client.ID, Bitmap.FromStream(memoryStream));
|
||||||
Program.form1.listView3.EndUpdate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user