Example #1
0
        private void StopMining()
        {
            _minerStatsCheck.Stop();
            //_smaMinerCheck.Stop();
            _computeDevicesCheckTimer?.Stop();

            // Disable IFTTT notification before label call
            _isNotProfitable = false;

            MinersManager.StopAllMiners();

            textBoxBTCAddress.Enabled = true;
            textBoxWorkerName.Enabled = true;
            comboBoxLocation.Enabled  = true;
            buttonBenchmark.Enabled   = true;
            buttonStartMining.Enabled = true;
            buttonSettings.Enabled    = true;
            devicesListViewEnableControl1.IsMining = false;
            buttonStopMining.Enabled = false;

            if (_demoMode)
            {
                _demoMode             = false;
                labelDemoMode.Visible = false;
            }

            UpdateGlobalRate();
        }
Example #2
0
        private void StopMining()
        {
            MinerStatsCheck.Stop();
            SMAMinerCheck.Stop();

            MinersManager.StopAllMiners();

            textBoxBTCAddress.Enabled = true;
            textBoxWorkerName.Enabled = true;
            comboBoxLocation.Enabled  = true;
            buttonBenchmark.Enabled   = true;
            buttonStartMining.Enabled = true;
            buttonSettings.Enabled    = true;
            devicesListViewEnableControl1.IsMining = false;
            buttonStopMining.Enabled = false;

            if (DemoMode)
            {
                DemoMode = false;
                labelDemoMode.Visible = false;
            }
            if (ConfigManager.GeneralConfig.WebInterfaceEnabled)
            {
                File.WriteAllText(Path.Combine(((DriveDirectory)server.Root).Path, "stats.json"), "[ { \"Status\": \"Nicehash Miner is stopped\" } ]");
            }
            server.Stop();
            UpdateGlobalRate();
        }
Example #3
0
        private void StopMining()
        {
            MinerStatsCheck.Stop();
            SMAMinerCheck.Stop();

            MinersManager.StopAllMiners();

            textBoxBTCAddress.Enabled = true;
            textBoxWorkerName.Enabled = true;
            comboBoxLocation.Enabled  = true;
            buttonBenchmark.Enabled   = true;
            buttonStartMining.Enabled = true;
            buttonSettings.Enabled    = true;
            devicesListViewEnableControl1.IsMining = false;
            buttonStopMining.Enabled = false;

            if (DemoMode)
            {
                DemoMode = false;
                labelDemoMode.Visible = false;
            }

            UpdateGlobalRate();
        }
Example #4
0
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            MinersManager.StopAllMiners();

            MessageBoxManager.Unregister();
        }