-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.xaml.cs
49 lines (45 loc) · 1.46 KB
/
App.xaml.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
48
49
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Windows;
namespace Projekt2
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
private ObservableCollection<Process> processes = new ObservableCollection<Process>(Process.GetProcesses());
//public Thread refreshThread { get; set; }
public ObservableCollection<Process> Processes
{
get { return this.processes; }
set { this.processes = value; }
}
public App()
{
//refreshThread = new Thread(new ThreadStart(() => refresh()));
//refreshThread.Start();
}
//private void refresh()
//{
// Process[] proc={};
// while (true)
// {
// //foreach (var p in proc)
// //{
// // Processes.Remove(p);
// //}
// proc = Process.GetProcesses();
// List<MyProcess> procs = new List<MyProcess>();
// foreach (var p in proc)
// {
// procs.Add(new MyProcess(p));
// }
// Processes = new ObservableCollection<MyProcess>(procs);
// Processes[0].RaisePropertyChanged("Name");
// //processGrid.DataContext = processesCollection;
// Thread.Sleep(1000);
// }
//}
}
}