5 |
|
using RomCheater.PluginFramework.Interfaces; |
6 |
|
using System.Diagnostics; |
7 |
|
using libWin32.Win32.Threading; |
8 |
+ |
using RomCheater.Logging; |
9 |
|
|
10 |
|
namespace RomCheater.PluginFramework.Core |
11 |
|
{ |
19 |
|
|
20 |
|
public override void Reload() |
21 |
|
{ |
22 |
+ |
logger.Debug.WriteLine(" Loading config for {0}...", this.ToString()); |
23 |
|
init(); |
24 |
+ |
logger.Debug.WriteLine(" Loaded config for {0}.", this.ToString()); |
25 |
|
} |
26 |
|
private void init() |
27 |
|
{ |
35 |
|
string proc_user = ThreadControl.GetProcessOwner(proc.Handle, out isSystem).ToLower(); |
36 |
|
if (isSystem) |
37 |
|
{ |
38 |
+ |
logger.Debug.WriteLine(" not adding process {0} because it is a system process", proc_name); |
39 |
|
continue; |
40 |
|
} |
41 |
|
ProcContainer container = null; |
42 |
|
try |
43 |
< |
{ |
43 |
> |
{ |
44 |
|
container = new ProcContainer(proc); |
45 |
+ |
logger.Debug.WriteLine(" adding process {0} ", proc_name); |
46 |
|
} |
47 |
< |
catch (Exception) |
47 |
> |
catch (Exception ex) |
48 |
|
{ |
49 |
< |
throw; |
49 |
> |
//throw; |
50 |
> |
logger.Debug.WriteLine(" not adding process {0} because it thew an exception [{1}]", proc_name, ex.Message); |
51 |
> |
continue; |
52 |
|
} |
53 |
|
proc_list.Add(container); |
54 |
|
} |