public SettingsForm(UX.Data.Configuration.Application applicationConfiguration, MultiMiner.Engine.Data.Configuration.Xgminer minerConfiguration, Paths pathConfiguration, Perks perksConfiguration) { InitializeComponent(); this.minerConfiguration = minerConfiguration; this.applicationConfiguration = applicationConfiguration; this.pathConfiguration = pathConfiguration; this.perksConfiguration = perksConfiguration; }
public MinerSettingsForm(MultiMiner.Engine.Data.Configuration.Xgminer minerConfiguration, Application applicationConfiguration, Perks perksConfiguration) { InitializeComponent(); this.minerConfiguration = minerConfiguration; this.workingMinerConfiguration = ObjectCopier.CloneObject<MultiMiner.Engine.Data.Configuration.Xgminer, MultiMiner.Engine.Data.Configuration.Xgminer>(minerConfiguration); this.applicationConfiguration = applicationConfiguration; this.workingApplicationConfiguration = ObjectCopier.CloneObject<Application, Application>(applicationConfiguration); this.perksConfiguration = perksConfiguration; }
private void ConfigurePerksRemotely() { Perks workingPerksConfiguration = new Perks(); GetRemoteApplicationConfiguration(SelectedRemoteInstance); ObjectCopier.CopyObject(remotePerksConfig, workingPerksConfiguration); ConfigurationEventArgs eventArgs = new ConfigurationEventArgs { Perks = workingPerksConfiguration }; if (OnConfigurePerks != null) OnConfigurePerks(this, eventArgs); if (eventArgs.ConfigurationModified) { ObjectCopier.CopyObject(workingPerksConfiguration, remotePerksConfig); SetConfigurationRemotely(SelectedRemoteInstance, null, null, null, remotePerksConfig); } }
private void ConfigureSettingsRemotely() { Application workingApplicationConfiguration = new Application(); Engine.Data.Configuration.Engine workingEngineConfiguration = new Engine.Data.Configuration.Engine(); Paths workingPathConfiguration = new Paths(); Perks workingPerksConfiguration = new Perks(); GetRemoteApplicationConfiguration(SelectedRemoteInstance); ObjectCopier.CopyObject(remoteApplicationConfig.ToModelObject(), workingApplicationConfiguration); ObjectCopier.CopyObject(remoteEngineConfig.ToModelObject(), workingEngineConfiguration); ObjectCopier.CopyObject(remotePathConfig, workingPathConfiguration); ObjectCopier.CopyObject(remotePerksConfig, workingPerksConfiguration); ConfigurationEventArgs eventArgs = new ConfigurationEventArgs { Application = workingApplicationConfiguration, Engine = workingEngineConfiguration, Paths = workingPathConfiguration, Perks = workingPerksConfiguration }; if (OnConfigureSettings != null) OnConfigureSettings(this, eventArgs); if (eventArgs.ConfigurationModified) { ObjectCopier.CopyObject(workingApplicationConfiguration.ToTransferObject(), remoteApplicationConfig); ObjectCopier.CopyObject(workingEngineConfiguration.ToTransferObject(), remoteEngineConfig); ObjectCopier.CopyObject(workingPathConfiguration, remotePathConfig); ObjectCopier.CopyObject(workingPerksConfiguration, remotePerksConfig); SetConfigurationRemotely(SelectedRemoteInstance, remoteApplicationConfig, remoteEngineConfig, remotePathConfig, null); } }
public PerksForm(Perks perksConfiguration) { InitializeComponent(); this.perksConfigurationBindingSource.DataSource = perksConfiguration; }
private Perks CreatePerksConfiguration() { Perks result = new Perks(); result.PerksEnabled = perksCheckBox.Checked; result.ShowExchangeRates = exchangeApiCheckbox.Checked; result.ShowIncomeRates = incomeCheckBox.Checked; result.EnableRemoting = remotingCheckBox.Checked; result.RemotingPassword = remotingPasswordEdit.Text; return result; }
public void CreateConfigurations(out Engine.Data.Configuration.Engine engineConfiguration, out UX.Data.Configuration.Application applicationConfiguraion, out Perks perksConfiguration) { engineConfiguration = CreateEngineConfiguration(); applicationConfiguraion = CreateApplicationConfiguration(); perksConfiguration = CreatePerksConfiguration(); }