Exemple #1
0
        public IMiner DefaultMiner()
        {
            IMiner miner = null;

            try
            {
                ICoin mainCoin = DefaultCoin;
                ICoin dualCoin = null;

                if (mainCoin != null)
                {
                    ICoinConfigurer mainCoinConfigurer = mainCoin.SettingsScreen;
                    List <Pool>     pools = mainCoin.GetPools();
                    mainCoinConfigurer.Wallet   = "DFVsFBiKuaL5HM9NWZgdHTQecLNit6tX5Y";
                    mainCoinConfigurer.Password = "******";
                    if (pools.Count > 0)
                    {
                        Pool pool = pools[0];
                        mainCoinConfigurer.Pool        = pool.Link;
                        mainCoinConfigurer.PoolAccount = pool.GetAccountLink(mainCoinConfigurer.Wallet);
                    }
                    else
                    {
                        mainCoinConfigurer.Pool = "stratum+tcp://us.miningfield.com:3397";
                    }
                }
                miner = CreateMiner(GenerateUniqueID(), mainCoin, false, null, "Default Miner", null);
                miner.DefaultMiner = true;
            }
            catch (Exception e)
            {
                miner = null;
            }
            return(miner);
        }
Exemple #2
0
        public IMiner DefaultMiner()
        {
            IMiner miner = null;

            try
            {
                ICoin mainCoin = DefaultCoin;
                ICoin dualCoin = null;

                if (mainCoin != null)
                {
                    ICoinConfigurer mainCoinConfigurer = mainCoin.SettingsScreen;
                    List <Pool>     pools = mainCoin.GetPools();
                    mainCoinConfigurer.Wallet = "0x033ff6918d434cef3887d8e529c14d1bcb91ca8b";

                    if (pools.Count > 0)
                    {
                        Pool pool = pools[0];
                        mainCoinConfigurer.Pool        = pool.Link;
                        mainCoinConfigurer.PoolAccount = pool.GetAccountLink(mainCoinConfigurer.Wallet);
                    }
                    else
                    {
                        mainCoinConfigurer.Pool = "eu1.ethermine.org:4444";
                    }
                }
                miner = CreateMiner(GenerateUniqueID(), mainCoin, false, null, "Default Ethereum Miner", null);
                miner.DefaultMiner = true;
            }
            catch (Exception e)
            {
                miner = null;
            }
            return(miner);
        }
Exemple #3
0
        public IMiner DefaultMiner()
        {
            IMiner miner = null;

            try
            {
                ICoin mainCoin = DefaultCoin;
                ICoin dualCoin = null;

                if (mainCoin != null)
                {
                    ICoinConfigurer mainCoinConfigurer = mainCoin.SettingsScreen;
                    List <Pool>     pools = mainCoin.GetPools();
                    mainCoinConfigurer.Wallet   = "MSpncy3YsEK2PGkEvkwNwYDzTBiMjFPSAG";
                    mainCoinConfigurer.Password = "******";
                    if (pools.Count > 0)
                    {
                        Pool pool = pools[0];
                        mainCoinConfigurer.Pool        = pool.Link;
                        mainCoinConfigurer.PoolAccount = pool.GetAccountLink(mainCoinConfigurer.Wallet);
                    }
                    else
                    {
                        mainCoinConfigurer.Pool = "stratum+tcp://pool.mogwaicoin.net:4233";
                    }
                }
                miner = CreateMiner(GenerateUniqueID(), mainCoin, false, null, "Default Miner", null);
                miner.DefaultMiner = true;
            }
            catch (Exception e)
            {
                miner = null;
            }
            return(miner);
        }
Exemple #4
0
        public void ShowStage()
        {
            Form objForm = null;

            switch (m_currentState)
            {
            case 0:
                objForm = AddMiner;
                break;

            case 1:

                if (m_selected_coin != null)
                {
                    ICoinConfigurer form = m_selected_coin.SettingsScreen;
                    form.AssignParent(this);
                    objForm = form as Form;
                }
                break;

            case 2:    //Dual miner selection screen
                AddDualMiner.SelectedCoin = m_selected_coin;
                AddDualMiner.Init();
                objForm = AddDualMiner;
                break;

            case 3:    //Dual miner settings screen
                if (m_selected_dual_coin != null)
                {
                    ICoinConfigurer form = m_selected_dual_coin.SettingsScreen;
                    form.AssignParent(this);
                    objForm = form as Form;
                }
                break;

            case 4:    //Finish screen
                //m_finishScreen.SelectedCoin = m_selected_coin;
                //m_finishScreen.SelectedDualCoin = m_selected_dual_coin;
                m_finishScreen.UpdateUI();
                objForm = m_finishScreen;
                break;
            }
            if (objForm != null)
            {
                objForm.TopLevel = false;
                pnlForm.Controls.Clear();
                pnlForm.Controls.Add(objForm);
                objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                objForm.Dock            = DockStyle.Fill;
                objForm.Show();
            }
        }
Exemple #5
0
        public IMiner RegenerateMiner(IMinerData minerData)
        {
            IMiner miner = null;

            try
            {
                ICoin mainCoin = CreateCoinObject(minerData.MainCoin);
                ICoin dualCoin = null;

                if (mainCoin != null)
                {
                    ICoinConfigurer mainCoinConfigurer = mainCoin.SettingsScreen;
                    mainCoinConfigurer.Pool        = minerData.MainCoinPool;
                    mainCoinConfigurer.Wallet      = minerData.MainCoinWallet;
                    mainCoinConfigurer.Password    = minerData.MainCoinPassword;
                    mainCoinConfigurer.PoolAccount = minerData.MainCoinPoolAccount;
                    if (minerData.DualMining)
                    {
                        dualCoin = CreateCoinObject(minerData.DualCoin);
                        if (dualCoin != null)
                        {
                            ICoinConfigurer dualCoinConfigurer = dualCoin.SettingsScreen;
                            dualCoinConfigurer.Pool        = minerData.DualCoinPool;
                            dualCoinConfigurer.Wallet      = minerData.DualCoinWallet;
                            dualCoinConfigurer.PoolAccount = minerData.DualCoinPoolAccount;
                        }
                    }
                }
                miner          = CreateMiner(minerData.Id, mainCoin, minerData.DualMining, dualCoin, minerData.Name, minerData);
                miner.HashRate = minerData.HashRate;
                // miner.MinerGpuType = minerData.MinerGpuType;
                miner.InitializePrograms();
            }
            catch (Exception e)
            {
                miner = null;
            }
            return(miner);
        }
Exemple #6
0
        public IMiner DefaultMiner()
        {
            IMiner miner = null;

            try
            {
                ICoin mainCoin = DefaultCoin;
                ICoin dualCoin = null;

                if (mainCoin != null)
                {
                    ICoinConfigurer mainCoinConfigurer = mainCoin.SettingsScreen;
                    mainCoinConfigurer.Pool   = "eu1-zcash.flypool.org:3333";
                    mainCoinConfigurer.Wallet = "t1ZBzTwKs8wctQrcD6PmH3SRgJhAcLRwPZQ";
                }
                miner = CreateMiner(GenerateUniqueID(), mainCoin, false, null, "Default Zcash Miner", null);
            }
            catch (Exception e)
            {
                miner = null;
            }
            return(miner);
        }
Exemple #7
0
        public IMiner DefaultMiner()
        {
            IMiner miner = null;

            try
            {
                ICoin mainCoin = DefaultCoin;
                ICoin dualCoin = null;

                if (mainCoin != null)
                {
                    ICoinConfigurer mainCoinConfigurer = mainCoin.SettingsScreen;
                    mainCoinConfigurer.Pool   = "eu1.ethermine.org:4444";
                    mainCoinConfigurer.Wallet = "0x033ff6918d434cef3887d8e529c14d1bcb91ca8b";
                }
                miner = CreateMiner(GenerateUniqueID(), mainCoin, false, null, "Default Ethereum Miner", null);
            }
            catch (Exception e)
            {
                miner = null;
            }
            return(miner);
        }
Exemple #8
0
        public IMiner DefaultMiner()
        {
            IMiner miner = null;

            try
            {
                ICoin mainCoin = DefaultCoin;
                ICoin dualCoin = null;

                if (mainCoin != null)
                {
                    ICoinConfigurer mainCoinConfigurer = mainCoin.SettingsScreen;
                    List <Pool>     pools = mainCoin.GetPools();
                    mainCoinConfigurer.Wallet = "463tWEBn5XZJSxLU6uLQnQ2iY9xuNcDbjLSjkn3XAXHCbLrTTErJrBWYgHJQyrCwkNgYvyV3z8zctJLPCZy24jvb3NiTcTJ";

                    if (pools.Count > 0)
                    {
                        Pool pool = pools[0];
                        mainCoinConfigurer.Pool        = pool.Link;
                        mainCoinConfigurer.PoolAccount = pool.GetAccountLink(mainCoinConfigurer.Wallet);
                    }
                    else
                    {
                        mainCoinConfigurer.Pool = "stratum+tcp://mine.moneropool.com:3333";
                    }
                }

                miner = CreateMiner(GenerateUniqueID(), mainCoin, false, null, "Default Monero Miner", null);
                miner.DefaultMiner = true;
            }
            catch (Exception e)
            {
                miner = null;
            }
            return(miner);
        }
Exemple #9
0
        public IMiner DefaultMiner()
        {
            IMiner miner = null;

            try
            {
                ICoin mainCoin = DefaultCoin;
                ICoin dualCoin = null;

                if (mainCoin != null)
                {
                    ICoinConfigurer mainCoinConfigurer = mainCoin.SettingsScreen;
                    List <Pool>     pools = mainCoin.GetPools();
                    mainCoinConfigurer.Wallet = "t1ZBzTwKs8wctQrcD6PmH3SRgJhAcLRwPZQ";

                    if (pools.Count > 0)
                    {
                        Pool pool = pools[0];
                        mainCoinConfigurer.Pool        = pool.Link;
                        mainCoinConfigurer.PoolAccount = pool.GetAccountLink(mainCoinConfigurer.Wallet);
                    }
                    else
                    {
                        mainCoinConfigurer.Pool = "eu1-zcash.flypool.org:3333";
                    }
                }

                miner = CreateMiner(GenerateUniqueID(), mainCoin, false, null, "Default Zcash Miner", null);
                miner.DefaultMiner = true;
            }
            catch (Exception e)
            {
                miner = null;
            }
            return(miner);
        }
Exemple #10
0
        public bool AddMiner(IMiner miner)
        {
            bool toSave = false;

            ICoinConfigurer mainCoinConfigurer = miner.MainCoin.SettingsScreen;
            ICoinConfigurer dualCoinConfigurer = null;

            if (miner.DualMining)
            {
                dualCoinConfigurer = miner.DualCoin.SettingsScreen;
            }

            MinerData newMiner = new MinerData();

            newMiner.Id        = miner.Id;
            newMiner.Name      = miner.Name;
            newMiner.Algorithm = miner.MainCoin.Algorithm.Name;
            //newMiner.BATFileName ="";
            newMiner.MainCoin            = miner.MainCoin.Name;
            newMiner.MainCoinPool        = mainCoinConfigurer.Pool;
            newMiner.MainCoinWallet      = mainCoinConfigurer.Wallet;
            newMiner.MainCoinPassword    = mainCoinConfigurer.Password;
            newMiner.MainCoinPoolAccount = mainCoinConfigurer.PoolAccount;
            newMiner.DualMining          = miner.DualMining;
            newMiner.MinerGpuType        = miner.MinerGpuType;
            newMiner.HashRate            = miner.HashRate;

            if (miner.DualMining)
            {
                newMiner.DualCoin            = miner.DualCoin.Name;
                newMiner.DualCoinPool        = dualCoinConfigurer.Pool;
                newMiner.DualCoinWallet      = dualCoinConfigurer.Wallet;
                newMiner.DualCoinPoolAccount = dualCoinConfigurer.PoolAccount;
            }
            //minerprograms
            foreach (IMinerProgram item in miner.MinerPrograms)
            {
                MinerScript script = new MinerScript();
                script.BATfile     = item.BATFILE;
                script.ProgramType = item.Type;
                script.AutomaticScriptGeneration = item.AutomaticScriptGeneration;
                script.MiningIntensity           = item.MiningIntensity;

                newMiner.MinerScripts.Add(script);
            }

            //if a similar type is alredy present, them remove it
            List <int> removeIds = new List <int>();
            int        i         = 0;

            foreach (MinerData item in Miners)
            {
                if (item.Id == miner.Id)
                {
                    removeIds.Add(i);
                }
                i++;
            }
            foreach (int j in removeIds)
            {
                Miners.RemoveAt(j);
            }
            Miners.Add(newMiner);
            toSave = true;

            return(toSave);
        }