public static void AddToWhitelist(int PID, string name, string path) { var app = new WhitelistedApp { Name = name, Path = path }; using (var db = new ArgonDB()) try { db.InsertAsync(app); } catch { } CpuSuspendWhitelist.Add(app); SuspendedProcessList.RemoveAll(x => x.ID == PID); }
public static void RemoveFromWhitelist(WhitelistedApp app) { CpuSuspendWhitelist.RemoveAll(x => x == app); using (var db = new ArgonDB()) db.DeleteAsync(app); }