forked from zachtaylor1/SWProj
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAudit.cs
More file actions
45 lines (42 loc) · 1.22 KB
/
Audit.cs
File metadata and controls
45 lines (42 loc) · 1.22 KB
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Input;
namespace SWProjv1
{
class Audit
{
public String name { get; set; }
public String message { get; set; }
public static Audit selectedAudit { get; set; }
public ListBoxItem listboxitem { get; set; }
public Grid grid { get; set; }
public Audit(String name, String message)
{
this.name = name;
this.message = message;
grid = new Grid();
}
private void Item_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{
setGrid();
selectedAudit = this;
}
public void setListBoxItem()
{
listboxitem = new ListBoxItem();
listboxitem.Content = name;
listboxitem.PreviewMouseDown += Item_PreviewMouseDown;
}
void setGrid()
{
grid.Children.Clear();
TextBlock tb = new TextBlock();
tb.Text = name + "\n\n" + message;
grid.Children.Add(tb);
}
}
}