示例#1
0
        void generardenuevo()
        {
            walletPath = AppDomain.CurrentDomain.BaseDirectory + @"wallet.address.txt";


            if (!File.Exists(simplewalletPath))
            {
                MessageBox.Show("Missing " + simplewalletPath);
                Process.GetCurrentProcess().Kill();
            }


            if (!File.Exists(cpuminerPath))
            {
                MessageBox.Show("Missing " + cpuminerPath);
                Process.GetCurrentProcess().Kill();
            }

            if (!File.Exists(claymoreminerPath))
            {
                MessageBox.Show("Missing " + claymoreminerPath);
                Process.GetCurrentProcess().Kill();
            }

            if (!File.Exists(ccminerPath))
            {
                MessageBox.Show("Missing " + ccminerPath);
                Process.GetCurrentProcess().Kill();
            }


            if (!File.Exists(walletPath))
            {
                MessageBox.Show("Generating new wallet with the password: x");
                GenerateWallet();
            }
            else
            {
                ReadWalletAddress();
            }

            var coresAvailable = Environment.ProcessorCount;

            for (var i = 0; i < coresAvailable; i++)
            {
                string text = (i + 1).ToString();
                if (i + 1 == coresAvailable)
                {
                    text += " (max)";
                }
                comboBoxCores.Items.Add(text);
            }

            var coresConfig = INI.Value("cores");
            int coresInt    = comboBoxCores.Items.Count - 1;

            if (coresConfig != "")
            {
                int coresParsed;
                var parsed = int.TryParse(coresConfig, out coresParsed);
                if (parsed)
                {
                    coresInt = coresParsed - 1;
                }
                if (coresInt + 1 > coresAvailable)
                {
                    coresInt = coresAvailable - 1;
                }
            }
            comboBoxCores.SelectedIndex = coresInt;
            comboBoxBrand.SelectedIndex = 1;

            var poolHost = INI.Value("pool_host");

            if (poolHost != "")
            {
                textBoxPoolHost.Text = poolHost;
            }
            var poolPort = INI.Value("pool_port");

            if (poolPort != "")
            {
                textBoxPoolPort.Text = poolPort;
            }

            Log("Thank you for using Superior Coin Miner, created by zone117x, modified by Jefrin Aguilar --- Superior-Coin.com");

            Application.ApplicationExit += (s, e) => killMiners();
        }
示例#2
0
        private void cuda_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (activo == 1)
            {
                _syncContext = SynchronizationContext.Current;

                miningBtnStart    = buttonStartCPUMining.Text;
                miningBtnStop     = "Stop CPU Mining";
                GPUminingBtnStart = buttonStartGPUMining.Text;
                GPUminingBtnStop  = "Stop GPU Mining";

                platform64bit = ArchitectureCheck.Is64Bit();

                string platformString = platform64bit ? "64bit" : "32bit";                                                                    //if 64 bit

                simplewalletPath = AppDomain.CurrentDomain.BaseDirectory + @"binaries\simplewallet\" + platformString + @"\simplewallet.exe"; //paths
                                                                                                                                              //verificar el tipo de sistema 32 o 64 y usarlo
                cpuminerPath = AppDomain.CurrentDomain.BaseDirectory + @"binaries\cpuminer\" + platformString + @"\xmrig.exe";

                claymoreminerPath = AppDomain.CurrentDomain.BaseDirectory + @"binaries\XMRAMD\" + platformString + @"\xmrig-amd.exe"; //AMD

                //verificar si es cuda8 o cuda9

                if (cuda.SelectedIndex == 0)
                {
                    ccminerPath = AppDomain.CurrentDomain.BaseDirectory + @"binaries\XMRNvidia\" + platformString + @"\xmrig-nvidia-2.5.2-cuda8-win64" + @"\xmrig-nvidia.exe"; //NVIDIA
                }
                if (cuda.SelectedIndex == 1)
                {
                    ccminerPath = AppDomain.CurrentDomain.BaseDirectory + @"binaries\XMRNvidia\" + platformString + @"\xmrig-nvidia-2.5.2-cuda9-win64" + @"\xmrig-nvidia.exe"; //NVIDIA
                }


                walletPath = AppDomain.CurrentDomain.BaseDirectory + @"wallet.address.txt";


                if (!File.Exists(simplewalletPath))
                {
                    MessageBox.Show("Missing " + simplewalletPath);
                    Process.GetCurrentProcess().Kill();
                }


                if (!File.Exists(cpuminerPath))
                {
                    MessageBox.Show("Missing " + cpuminerPath);
                    Process.GetCurrentProcess().Kill();
                }

                if (!File.Exists(claymoreminerPath))
                {
                    MessageBox.Show("Missing " + claymoreminerPath);
                    Process.GetCurrentProcess().Kill();
                }

                if (!File.Exists(ccminerPath))
                {
                    MessageBox.Show("Missing " + ccminerPath);
                    Process.GetCurrentProcess().Kill();
                }


                if (!File.Exists(walletPath))
                {
                    MessageBox.Show("Generating new wallet with the password: x");
                    GenerateWallet();
                }
                else
                {
                    ReadWalletAddress();
                }

                var coresAvailable = Environment.ProcessorCount;

                for (var i = 0; i < coresAvailable; i++)
                {
                    string text = (i + 1).ToString();
                    if (i + 1 == coresAvailable)
                    {
                        text += " (max)";
                    }
                    comboBoxCores.Items.Add(text);
                }

                var coresConfig = INI.Value("cores");
                int coresInt    = comboBoxCores.Items.Count - 1;
                if (coresConfig != "")
                {
                    int coresParsed;
                    var parsed = int.TryParse(coresConfig, out coresParsed);
                    if (parsed)
                    {
                        coresInt = coresParsed - 1;
                    }
                    if (coresInt + 1 > coresAvailable)
                    {
                        coresInt = coresAvailable - 1;
                    }
                }
                comboBoxCores.SelectedIndex = coresInt;
                comboBoxBrand.SelectedIndex = 1;

                var poolHost = INI.Value("pool_host");
                if (poolHost != "")
                {
                    textBoxPoolHost.Text = poolHost;
                }
                var poolPort = INI.Value("pool_port");
                if (poolPort != "")
                {
                    textBoxPoolPort.Text = poolPort;
                }

                //Log("Thank you for using Superior Coin Miner, created by zone117x, modified by Jefrin Aguilar --- Superior-Coin.com");
            }
        }
示例#3
0
        public Main()
        {
            InitializeComponent();

            _syncContext = SynchronizationContext.Current;

            miningBtnStart = buttonStartCPUMining.Text;
            miningBtnStop = "Stop CPU Mining";
            GPUminingBtnStart = buttonStartGPUMining.Text;
            GPUminingBtnStop = "Stop GPU Mining";

            platform64bit = ArchitectureCheck.Is64Bit();

            string platformString = platform64bit ? "64bit" : "32bit"; //if 64 bit

            simplewalletPath = AppDomain.CurrentDomain.BaseDirectory + @"binaries\simplewallet\" + platformString + @"\simplewallet.exe"; //paths
            cpuminerPath = AppDomain.CurrentDomain.BaseDirectory + @"binaries\cpuminer\" + platformString + @"\minerd.exe";
            claymoreminerPath = AppDomain.CurrentDomain.BaseDirectory + @"binaries\claymoreminer\" + platformString + @"\NsGpuCNMiner.exe"; //AMD
            ccminerPath = AppDomain.CurrentDomain.BaseDirectory + @"binaries\ccminer\" + platformString + @"\ccminer.exe"; //NVIDIA

            walletPath = AppDomain.CurrentDomain.BaseDirectory + @"wallet.address.txt";

            if (!File.Exists(simplewalletPath))
            {
                MessageBox.Show("Missing " + simplewalletPath);
                Process.GetCurrentProcess().Kill();
            }

            if (!File.Exists(cpuminerPath))
            {
                MessageBox.Show("Missing " + cpuminerPath);
                Process.GetCurrentProcess().Kill();
            }

            if (!File.Exists(claymoreminerPath))
            {
                MessageBox.Show("Missing " + claymoreminerPath);
                Process.GetCurrentProcess().Kill();
            }

            if (!File.Exists(ccminerPath))
            {
                MessageBox.Show("Missing " + ccminerPath);
                Process.GetCurrentProcess().Kill();
            }

            if (!File.Exists(walletPath))
            {
                MessageBox.Show("Generating new wallet with the password: x");
                GenerateWallet();
            }
            else
            {
                ReadWalletAddress();
            }

            var coresAvailable = Environment.ProcessorCount;
            for (var i = 0; i < coresAvailable; i++)
            {
                string text = (i + 1).ToString();
                if (i+1 == coresAvailable) text += " (max)";
                comboBoxCores.Items.Add(text);
            }

            var coresConfig = INI.Value("cores");
            int coresInt = comboBoxCores.Items.Count - 1;
            if (coresConfig != "")
            {
                int coresParsed;
                var parsed = int.TryParse(coresConfig, out coresParsed);
                if (parsed) coresInt = coresParsed - 1;
                if (coresInt+1 > coresAvailable) coresInt = coresAvailable - 1;

            }
            comboBoxCores.SelectedIndex = coresInt;
            comboBoxBrand.SelectedIndex = 1;

            var poolHost = INI.Value("pool_host");
            if (poolHost != ""){
                textBoxPoolHost.Text = poolHost;
            }
            var poolPort = INI.Value("pool_port");
            if (poolPort != "")
            {
                textBoxPoolPort.Text = poolPort;
            }

            Log("Thank you for using VFCN Miner, created by zone117x, modified by UsernameVF");

            Application.ApplicationExit += (s, e) => killMiners();

        }