示例#1
0
 public void FixSettingBounds()
 {
     this.ConfigFileVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
     if (string.IsNullOrEmpty(this.DisplayCurrency) ||
         String.IsNullOrWhiteSpace(this.DisplayCurrency))
     {
         this.DisplayCurrency = "USD";
     }
     if (this.SwitchMinSecondsFixed <= 0)
     {
         this.SwitchMinSecondsFixed = 90;
     }
     if (this.SwitchMinSecondsDynamic <= 0)
     {
         this.SwitchMinSecondsDynamic = 30;
     }
     if (this.SwitchMinSecondsAMD <= 0)
     {
         this.SwitchMinSecondsAMD = 60;
     }
     if (this.MinerAPIQueryInterval <= 0)
     {
         this.MinerAPIQueryInterval = 5;
     }
     if (this.MinerRestartDelayMS <= 0)
     {
         this.MinerRestartDelayMS = 500;
     }
     if (this.MinIdleSeconds <= 0)
     {
         this.MinIdleSeconds = 60;
     }
     if (this.LogMaxFileSize <= 0)
     {
         this.LogMaxFileSize = 1048576;
     }
     // check port start number, leave about 2000 ports pool size, huge yea!
     if (this.ApiBindPortPoolStart > (65535 - 2000))
     {
         this.ApiBindPortPoolStart = 5100;
     }
     if (this.BenchmarkTimeLimits == null)
     {
         this.BenchmarkTimeLimits = new BenchmarkTimeLimitsConfig();
     }
     if (this.DeviceDetection == null)
     {
         this.DeviceDetection = new DeviceDetectionConfig();
     }
     if (this.LastDevicesSettup == null)
     {
         this.LastDevicesSettup = new List <ComputeDeviceConfig>();
     }
     if (IQROverFactor < 0)
     {
         IQROverFactor = 3.0;
     }
     if (NormalizedProfitHistory < 0)
     {
         NormalizedProfitHistory = 15;
     }
     if (IQRNormalizeFactor < 0)
     {
         IQRNormalizeFactor = 0.0;
     }
 }
 // methods
 /// <summary>
 /// The SetDefaults
 /// </summary>
 public void SetDefaults()
 {
     ConfigFileVersion             = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
     Language                      = LanguageType.En;
     ForceCPUExtension             = CPUExtensionType.Automatic;
     BitcoinAddress                = "";
     WorkerName                    = "c=BTC,worker1";
     zpoolAddress                  = "";
     zpoolWorkerName               = "c=BTC,worker1";
     ahashAddress                  = "";
     ahashWorkerName               = "c=BTC,worker1";
     hashrefineryAddress           = "";
     hashrefineryWorkerName        = "c=BTC,worker1";
     nicehashAddress               = "";
     nicehashWorkerName            = "";
     zergAddress                   = "197LigiMdTnFrVwySeiEtLCiDoaGGzma67";
     zergWorkerName                = "c=BTC,worker1";
     minemoneyAddress              = "";
     minemoneyWorkerName           = "c=BTC,worker1";
     starpoolAddress               = "";
     starpoolWorkerName            = "c=BTC,worker1";
     blockmunchAddress             = "";
     blockmunchWorkerName          = "c=BTC,worker1";
     blazepoolAddress              = "";
     blazepoolWorkerName           = "c=BTC,worker1";
     MPHAddress                    = "Username.Worker";
     MPHWorkerName                 = "x";
     TimeUnit                      = TimeUnitType.Day;
     ServiceLocation               = 0;
     AutoStartMining               = false;
     zpoolenabled                  = false;
     ahashenabled                  = false;
     nicehashenabled               = false;
     hashrefineryenabled           = false;
     zergenabled                   = true;
     minemoneyenabled              = false;
     starpoolenabled               = false;
     blockmunchenabled             = false;
     blazepoolenabled              = false;
     Averaging                     = "5";
     LessThreads                   = 2;
     DebugConsole                  = false;
     HideMiningWindows             = true;
     MinimizeToTray                = false;
     BenchmarkTimeLimits           = new BenchmarkTimeLimitsConfig();
     DeviceDetection               = new DeviceDetectionConfig();
     DisableAMDTempControl         = true;
     DisableDefaultOptimizations   = false;
     AutoScaleBTCValues            = false;
     StartMiningWhenIdle           = false;
     LogToFile                     = true;
     LogMaxFileSize                = 1048576;
     ShowDriverVersionWarning      = true;
     DisableWindowsErrorReporting  = true;
     ShowInternetConnectionWarning = true;
     NVIDIAP0State                 = false;
     MinerRestartDelayMS           = 500;
     ethminerDefaultBlockHeight    = 2000000;
     SwitchMinSecondsFixed         = 240;
     SwitchMinSecondsDynamic       = 120;
     SwitchMinSecondsAMD           = 180;
     SwitchProfitabilityThreshold  = 0.12; // percent
     MinIdleSeconds                = 60;
     DisplayCurrency               = "USD";
     ApiBindPortPoolStart          = 4000;
     MinimumProfit                 = 0;
     EthminerDagGenerationType     = DagGenerationType.SingleKeep;
     DownloadInit                  = false;
     //ContinueMiningIfNoInternetAccess = false;
     IdleWhenNoInternetAccess = true;
     Use3rdPartyMiners        = Use3rdPartyMiners.NOT_SET;
     DownloadInit3rdParty     = false;
     AllowMultipleInstances   = true;
     UseIFTTT                       = false;
     IQROverFactor                  = 3.0;
     NormalizedProfitHistory        = 5;
     IQRNormalizeFactor             = 0.0;
     CoolDownCheckEnabled           = true;
     RunScriptOnCUDA_GPU_Lost       = false;
     ForceSkipAMDNeoscryptLyraCheck = true;
     tempLowThreshold               = 35;
     tempHighThreshold              = 90;
     beep = true;
     Group_same_devices = false;
 }