public static bool IsHaveMiner() { if (GetProcessNames().Contains(ReadConfig.GetMinerName().ToLower())) { return(true); } else { return(false); } }
public static void KillMiner() { string minerName = ReadConfig.GetMinerName().ToLower(); Process[] p = Process.GetProcessesByName(minerName); try { p[0].Kill(); } catch (Exception) { throw; } }