Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public static void RemoveFromWhitelist(WhitelistedApp app)
 {
     CpuSuspendWhitelist.RemoveAll(x => x == app);
     using (var db = new ArgonDB())
         db.DeleteAsync(app);
 }