Exemplo n.º 1
0
        public void ShowNotProfitable(string msg)
        {
            if (ConfigManager.GeneralConfig.UseIFTTT)
            {
                if (!_isNotProfitable)
                {
                    Ifttt.PostToIfttt("nicehash", msg);
                    _isNotProfitable = true;
                }
            }

            if (InvokeRequired)
            {
                Invoke((Action) delegate
                {
                    ShowNotProfitable(msg);
                });
            }
            else
            {
                label_NotProfitable.Visible = true;
                label_NotProfitable.Text    = msg;
                label_NotProfitable.Invalidate();
            }
        }
        public void HideNotProfitable()
        {
            if (ConfigManager.GeneralConfig.UseIFTTT)
            {
                if (_isNotProfitable)
                {
                    Ifttt.PostToIfttt("nicehash", "Mining is once again profitable and has resumed.");
                    _isNotProfitable = false;
                }
            }

            label_NotProfitable.Visible = false;
            label_NotProfitable.Invalidate();
        }
        public void ShowNotProfitable(string msg)
        {
            if (ConfigManager.GeneralConfig.UseIFTTT)
            {
                if (!_isNotProfitable)
                {
                    Ifttt.PostToIfttt("nicehash", msg);
                    _isNotProfitable = true;
                }
            }

            label_NotProfitable.Visible = true;
            label_NotProfitable.Text    = msg;
            label_NotProfitable.Invalidate();
        }
 //// TODO we got a problem here with displaying and sending IFTTT stuff, since we can start/stop
 //private static bool isProfitable = false;
 // TODO IFTTT might be broken or it may spam with messages
 public static void SetProfitableState(bool isProfitable)
 {
     if (isProfitable)
     {
         if (ConfigManager.GeneralConfig.UseIFTTT)
         {
             Ifttt.PostToIfttt("nicehash", "Mining is once again profitable and has resumed.");
         }
         DisplayMiningProfitable(isProfitable);
     }
     else
     {
         if (ConfigManager.GeneralConfig.UseIFTTT)
         {
             Ifttt.PostToIfttt("nicehash", "CURRENTLY MINING NOT PROFITABLE.");
         }
         DisplayMiningProfitable(isProfitable);
     }
 }