Update HandleLogs.cs
This commit is contained in:
parent
48be73d7ff
commit
9f5dfc0754
@ -12,19 +12,29 @@ namespace AsyncRAT_Sharp.Handle_Packet
|
|||||||
{
|
{
|
||||||
public void Addmsg(string Msg, Color color)
|
public void Addmsg(string Msg, Color color)
|
||||||
{
|
{
|
||||||
if (Program.form1.listView2.InvokeRequired)
|
try
|
||||||
{
|
{
|
||||||
Program.form1.listView2.BeginInvoke((MethodInvoker)(() =>
|
if (Program.form1.listView2.InvokeRequired)
|
||||||
|
{
|
||||||
|
Program.form1.listView2.BeginInvoke((MethodInvoker)(() =>
|
||||||
|
{
|
||||||
|
ListViewItem LV = new ListViewItem();
|
||||||
|
LV.Text = DateTime.Now.ToLongTimeString();
|
||||||
|
LV.SubItems.Add(Msg);
|
||||||
|
LV.ForeColor = color;
|
||||||
|
Program.form1.listView2.Items.Insert(0, LV);
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
ListViewItem LV = new ListViewItem();
|
ListViewItem LV = new ListViewItem();
|
||||||
LV.Text = DateTime.Now.ToLongTimeString();
|
LV.Text = DateTime.Now.ToLongTimeString();
|
||||||
LV.SubItems.Add(Msg);
|
LV.SubItems.Add(Msg);
|
||||||
LV.ForeColor = color;
|
LV.ForeColor = color;
|
||||||
Program.form1.listView2.BeginUpdate();
|
|
||||||
Program.form1.listView2.Items.Insert(0, LV);
|
Program.form1.listView2.Items.Insert(0, LV);
|
||||||
Program.form1.listView2.EndUpdate();
|
}
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
catch { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user