private void ConfigureStrategiesRemotely() { 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); StrategiesForm strategiesForm = new StrategiesForm(workingEngineConfiguration.StrategyConfiguration, knownCoins, workingApplicationConfiguration); strategiesForm.Text = String.Format("{0}: {1}", strategiesForm.Text, this.selectedRemoteInstance.MachineName); DialogResult dialogResult = strategiesForm.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); } }
private void ConfigureSettingsRemotely() { Data.Configuration.Application workingApplicationConfiguration = new Data.Configuration.Application(); Engine.Data.Configuration.Engine workingEngineConfiguration = new Engine.Data.Configuration.Engine(); Paths workingPathConfiguration = new Paths(); Perks workingPerksConfiguration = new Perks(); GetRemoteApplicationConfiguration(this.selectedRemoteInstance); ObjectCopier.CopyObject(this.remoteApplicationConfig.ToModelObject(), workingApplicationConfiguration); ObjectCopier.CopyObject(this.remoteEngineConfig.ToModelObject(), workingEngineConfiguration); ObjectCopier.CopyObject(this.remotePathConfig, workingPathConfiguration); ObjectCopier.CopyObject(this.remotePerksConfig, workingPerksConfiguration); SettingsForm settingsForm = new SettingsForm( workingApplicationConfiguration, workingEngineConfiguration.XgminerConfiguration, workingPathConfiguration, workingPerksConfiguration); settingsForm.Text = String.Format("{0}: {1}", settingsForm.Text, this.selectedRemoteInstance.MachineName); DialogResult dialogResult = settingsForm.ShowDialog(); if (dialogResult == System.Windows.Forms.DialogResult.OK) { ObjectCopier.CopyObject(workingApplicationConfiguration.ToTransferObject(), this.remoteApplicationConfig); ObjectCopier.CopyObject(workingEngineConfiguration.ToTransferObject(), this.remoteEngineConfig); ObjectCopier.CopyObject(workingPathConfiguration, this.remotePathConfig); ObjectCopier.CopyObject(workingPerksConfiguration, this.remotePerksConfig); SetConfigurationRemotely(this.selectedRemoteInstance, this.remoteApplicationConfig, this.remoteEngineConfig, this.remotePathConfig, null); } }
private void ConfigurePoolsRemotely() { Application workingApplicationConfiguration = new Application(); Engine.Data.Configuration.Engine workingEngineConfiguration = new Engine.Data.Configuration.Engine(); GetRemoteApplicationConfiguration(SelectedRemoteInstance); ObjectCopier.CopyObject(remoteApplicationConfig.ToModelObject(), workingApplicationConfiguration); ObjectCopier.CopyObject(remoteEngineConfig.ToModelObject(), workingEngineConfiguration); ConfigurationEventArgs eventArgs = new ConfigurationEventArgs { Application = workingApplicationConfiguration, Engine = workingEngineConfiguration, Perks = PerksConfiguration }; if (OnConfigurePools != null) OnConfigurePools(this, eventArgs); if (eventArgs.ConfigurationModified) { ObjectCopier.CopyObject(workingApplicationConfiguration.ToTransferObject(), remoteApplicationConfig); ObjectCopier.CopyObject(workingEngineConfiguration.ToTransferObject(), remoteEngineConfig); SetConfigurationRemotely(SelectedRemoteInstance, remoteApplicationConfig, remoteEngineConfig, null, null); if (ApplicationConfiguration.SaveCoinsToAllMachines && PerksConfiguration.PerksEnabled && PerksConfiguration.EnableRemoting) SetCoinConfigurationOnAllRigs(remoteEngineConfig.CoinConfigurations); } }
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); } }
private void ConfigureStrategiesRemotely() { Application workingApplicationConfiguration = new Application(); Engine.Data.Configuration.Engine workingEngineConfiguration = new Engine.Data.Configuration.Engine(); GetRemoteApplicationConfiguration(SelectedRemoteInstance); ObjectCopier.CopyObject(remoteApplicationConfig.ToModelObject(), workingApplicationConfiguration); ObjectCopier.CopyObject(remoteEngineConfig.ToModelObject(), workingEngineConfiguration); ConfigurationEventArgs eventArgs = new ConfigurationEventArgs { Application = workingApplicationConfiguration, Engine = workingEngineConfiguration }; if (OnConfigureStrategies != null) OnConfigureStrategies(this, eventArgs); if (eventArgs.ConfigurationModified) { ObjectCopier.CopyObject(workingApplicationConfiguration.ToTransferObject(), remoteApplicationConfig); ObjectCopier.CopyObject(workingEngineConfiguration.ToTransferObject(), remoteEngineConfig); SetConfigurationRemotely(SelectedRemoteInstance, remoteApplicationConfig, remoteEngineConfig, null, null); } }