Ejemplo n.º 1
0
        public static void RunNTMinerNoDevFee()
        {
            if (ClientAppType.IsMinerStudio)
            {
                return;
            }
            string processName = Path.GetFileNameWithoutExtension(NTKeyword.NTMinerNoDevFeeFileName);

            Process[] processes = Process.GetProcessesByName(processName);
            if (processes.Length != 0)
            {
                string thatVersion = NTMinerRegistry.GetNoDevFeeVersion();
                try {
                    string thisVersion = ThisNTMinerNoDevFeeFileVersion;
                    if (thatVersion != thisVersion)
                    {
                        Logger.InfoDebugLine($"发现新版NoDevFee:{thatVersion}->{thisVersion}");
                        Windows.TaskKill.Kill(processName, waitForExit: true);
                        System.Threading.Thread.Sleep(1000);
                        ExtractRunNTMinerNoDevFeeAsync();
                    }
                }
                catch (Exception e) {
                    Logger.ErrorDebugLine(e);
                }
            }
            else
            {
                ExtractRunNTMinerNoDevFeeAsync();
            }
        }