Exemple #1
0
        private void ConfigureCoinsLocally()
        {
            CoinsForm coinsForm = new CoinsForm(engineConfiguration.CoinConfigurations, knownCoins, applicationConfiguration, perksConfiguration);
            DialogResult dialogResult = coinsForm.ShowDialog();
            if (dialogResult == System.Windows.Forms.DialogResult.OK)
            {
                FixMisconfiguredDevices();
                ConfigureUnconfiguredDevices();

                engineConfiguration.SaveCoinConfigurations();
                engineConfiguration.SaveDeviceConfigurations();
                applicationConfiguration.SaveApplicationConfiguration();

                //may be able to auto-assign more devices now that coins are setup
                AddMissingDeviceConfigurations();

                ApplyModelsToViewModel();
                RefreshViewForConfigurationChanges();

                SubmitMobileMinerPools();

                if (applicationConfiguration.SaveCoinsToAllMachines && perksConfiguration.PerksEnabled && perksConfiguration.EnableRemoting)
                    SetCoinConfigurationOnAllRigs(this.engineConfiguration.CoinConfigurations.ToArray());
            }
            else
            {
                engineConfiguration.LoadCoinConfigurations(pathConfiguration.SharedConfigPath);
                applicationConfiguration.LoadApplicationConfiguration(pathConfiguration.SharedConfigPath);
            }
        }
Exemple #2
0
        private void ConfigureCoinsRemotely()
        {
            Data.Configuration.Application workingApplicationConfiguration = new Data.Configuration.Application();
            Engine.Data.Configuration.Engine workingEngineConfiguration = new Engine.Data.Configuration.Engine();

            GetRemoteApplicationConfiguration(this.selectedRemoteInstance);

            ObjectCopier.CopyObject(this.remoteApplicationConfig.ToModelObject(), workingApplicationConfiguration);
            ObjectCopier.CopyObject(this.remoteEngineConfig.ToModelObject(), workingEngineConfiguration);

            CoinsForm coinsForm = new CoinsForm(workingEngineConfiguration.CoinConfigurations, knownCoins, workingApplicationConfiguration, perksConfiguration);
            coinsForm.Text = String.Format("{0}: {1}", coinsForm.Text, this.selectedRemoteInstance.MachineName);
            DialogResult dialogResult = coinsForm.ShowDialog();

            if (dialogResult == System.Windows.Forms.DialogResult.OK)
            {
                ObjectCopier.CopyObject(workingApplicationConfiguration.ToTransferObject(), this.remoteApplicationConfig);
                ObjectCopier.CopyObject(workingEngineConfiguration.ToTransferObject(), this.remoteEngineConfig);
                SetConfigurationRemotely(this.selectedRemoteInstance, this.remoteApplicationConfig, this.remoteEngineConfig, null, null);

                if (applicationConfiguration.SaveCoinsToAllMachines && perksConfiguration.PerksEnabled && perksConfiguration.EnableRemoting)
                    SetCoinConfigurationOnAllRigs(this.remoteEngineConfig.CoinConfigurations);
            }
        }
Exemple #3
0
        private void ConfigureCoinsLocally()
        {
            CoinsForm coinsForm = new CoinsForm(engineConfiguration.CoinConfigurations, knownCoins);
            DialogResult dialogResult = coinsForm.ShowDialog();
            if (dialogResult == System.Windows.Forms.DialogResult.OK)
            {
                FixMisconfiguredDevices();
                ConfigureUnconfiguredDevices();

                engineConfiguration.SaveCoinConfigurations();
                engineConfiguration.SaveDeviceConfigurations();

                ApplyModelsToViewModel();
                RefreshViewForConfigurationChanges();
            }
            else
                engineConfiguration.LoadCoinConfigurations(pathConfiguration.SharedConfigPath);
        }