Beispiel #1
0
 static void Main(string[] args)
 {
     if (args.Length != 0)
     {
         if (args.Contains("--sha1", StringComparer.OrdinalIgnoreCase))
         {
             File.WriteAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "sha1"), Sha1);
             return;
         }
         else if (args.Contains("--ExtractCosturaCompressedDlls", StringComparer.OrdinalIgnoreCase))
         {
             CosturaUtil.ExtractCosturaCompressedDlls();
             return;
         }
     }
     try {
         NTMinerConsole.MainUiOk();
         if (DevMode.IsDevMode)
         {
             NTMinerConsole.GetOrAlloc();
         }
         SystemEvents.SessionEnding += SessionEndingEventHandler;
         StartTimer();
         _waitHandle = new AutoResetEvent(false);
         bool mutexCreated;
         try {
             _sMutexApp = new Mutex(true, "NTMinerNoDevFeeAppMutex", out mutexCreated);
         }
         catch {
             mutexCreated = false;
         }
         if (mutexCreated)
         {
             if (!DevMode.IsDevMode)
             {
                 NTMinerConsole.Disable();
             }
             NTMinerRegistry.SetNoDevFeeVersion(Sha1);
             NTMinerRegistry.SetAutoBoot("NTMinerNoDevFee", true);
             Run();
         }
     }
     catch (Exception e) {
         Logger.ErrorDebugLine(e);
     }
 }