示例#1
0
 public static void StartCheckWatch_EventArrived(object sender, EventArrivedEventArgs e)
 {
     try
     {
         var pid = e.NewEvent.Properties["ProcessID"].Value;
         if (pid.ProcessIDExists())
         {
             var proc = pid.GetProcessById();
             if (proc.ProcessName.ToLower().Contains("league"))
             {
                 logger.Debug("Started process: " + Environment.NewLine + proc.GetProcessInfoForLogging(Program.PrintProcessModules));
                 LeaguePriority.CheckForFreeMemory();
                 LeaguePriority.CheckAndBoost(Program.NoClient);
             }
         }
     }
     catch (Exception ex)
     {
         logger.Error(ex, Strings.exceptionThrown + " while executing start check watch event. " + Environment.NewLine);
     }
 }