Beispiel #1
0
        private void PoolListCombo_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems != null && e.AddedItems.Count != 0)
            {
                PoolData poolData = e.AddedItems[0] as PoolData;

                // If it's the same value, don't change, it might override custom pool input
                if (lastPoolDataValue != null && lastPoolDataValue.id == poolData.id)
                {
                    return;
                }

                logger.Info("Using pool: " + poolData);

                // If it's a custom, show the pool input
                if (poolData.name == "Custom")
                {
                    PoolInput      = "";
                    ShowCustomPool = true;
                }
                // If it's not, set pool input to the first stratum
                else
                {
                    PoolInput      = poolData.Value();
                    ShowCustomPool = false;
                }

                lastPoolDataValue = poolData;
            }
        }
Beispiel #2
0
        private void PoolListCombo_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems != null && e.AddedItems.Count != 0)
            {
                PoolData poolData = e.AddedItems[0] as PoolData;

                // If it's the same value, don't change, it might override custom pool input
                if (lastPoolDataValue != null && lastPoolDataValue.id == poolData.id)
                {
                    return;
                }

                // If it's a custom, show the pool input
                if (poolData.name == "Custom")
                {
                    PoolInput      = "";
                    ShowCustomPool = true;
                }
                // If it's not, set pool input to the first stratum
                else
                {
                    PoolInput      = poolData.Value();
                    ShowCustomPool = false;
                }

                lastPoolDataValue = poolData;

                // Don't want to override the saved pool on initialization because it can't be changed  by user at that point
                if (!initializing)
                {
                    logger.Info("Using pool: " + poolData);
                    // Save the selected pool as the savedPool for auto-select
                    linker.minerManager.data.savedPool = poolData;
                }
            }
        }