forked from Adrianotiger/desktopPet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFormDebug.cs
47 lines (41 loc) · 1.22 KB
/
FormDebug.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using desktopPet;
using System;
using System.Drawing;
using System.Windows.Forms;
namespace DesktopPet
{
public partial class FormDebug : Form
{
public FormDebug()
{
InitializeComponent();
}
private void FormDebug_Load(object sender, EventArgs e)
{
}
public void AddDebugInfo(Form1.DEBUG_TYPE type, string text)
{
ListViewItem item = new ListViewItem(DateTime.Now.ToLongTimeString());
if(type == Form1.DEBUG_TYPE.info)
{
item.ForeColor = Color.White;
if (checkBox1.Checked) listView1.Items.Add(item);
}
else if(type == Form1.DEBUG_TYPE.warning)
{
item.ForeColor = Color.Yellow;
if (checkBox2.Checked) listView1.Items.Add(item);
}
else if(type == Form1.DEBUG_TYPE.error)
{
item.ForeColor = Color.Salmon;
if (checkBox3.Checked) listView1.Items.Add(item);
}
item.SubItems.Add(text);
item.EnsureVisible();
}
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}