public SettingsForm(ApplicationConfiguration applicationConfiguration, XgminerConfiguration minerConfiguration) { InitializeComponent(); this.minerConfiguration = minerConfiguration; this.applicationConfiguration = applicationConfiguration; }
public StrategiesForm(StrategyConfiguration strategyConfiguration, List<CryptoCoin> knownCoins, ApplicationConfiguration applicationConfiguration) { InitializeComponent(); this.strategyConfiguration = strategyConfiguration; this.applicationConfiguration = applicationConfiguration; this.knownCoins = knownCoins; }
public AdvancedSettingsForm(XgminerConfiguration minerConfiguration, ApplicationConfiguration applicationConfiguration) { InitializeComponent(); this.minerConfiguration = minerConfiguration; this.workingMinerConfiguration = ObjectCopier.CloneObject<XgminerConfiguration, XgminerConfiguration>(minerConfiguration); this.applicationConfiguration = applicationConfiguration; this.workingApplicationConfiguration = ObjectCopier.CloneObject<ApplicationConfiguration, ApplicationConfiguration>(applicationConfiguration); }
private ApplicationConfiguration CreateApplicationConfiguration() { ApplicationConfiguration applicationConfiguraion; applicationConfiguraion = new ApplicationConfiguration(); applicationConfiguraion.MobileMinerMonitoring = remoteMonitoringCheck.Checked; applicationConfiguraion.MobileMinerRemoteCommands = remoteCommandsCheck.Checked; applicationConfiguraion.MobileMinerEmailAddress = emailAddressEdit.Text; applicationConfiguraion.MobileMinerApplicationKey = appKeyEdit.Text; return applicationConfiguraion; }
public void CreateConfigurations(out EngineConfiguration engineConfiguration, out ApplicationConfiguration applicationConfiguraion) { engineConfiguration = CreateEngineConfiguration(); applicationConfiguraion = CreateApplicationConfiguration(); }
private void CheckAndShowGettingStarted() { //only show if there's no settings yet if (File.Exists(ApplicationConfiguration.ApplicationConfigurationFileName())) return; WizardForm wizardForm = new WizardForm(this.knownCoins); DialogResult dialogResult = wizardForm.ShowDialog(); if (dialogResult == System.Windows.Forms.DialogResult.OK) { EngineConfiguration newEngineConfiguration; ApplicationConfiguration newApplicationConfiguration; wizardForm.CreateConfigurations(out newEngineConfiguration, out newApplicationConfiguration); this.engineConfiguration = newEngineConfiguration; this.applicationConfiguration = newApplicationConfiguration; this.engineConfiguration.SaveCoinConfigurations(); this.engineConfiguration.SaveMinerConfiguration(); this.applicationConfiguration.SaveApplicationConfiguration(); } }
private static int TimerIntervalToMinutes(ApplicationConfiguration.TimerInterval timerInterval) { int coinStatsMinutes; switch (timerInterval) { case ApplicationConfiguration.TimerInterval.FiveMinutes: coinStatsMinutes = 5; break; case ApplicationConfiguration.TimerInterval.ThirtyMinutes: coinStatsMinutes = 30; break; case ApplicationConfiguration.TimerInterval.OneHour: coinStatsMinutes = 1 * 60; break; case ApplicationConfiguration.TimerInterval.ThreeHours: coinStatsMinutes = 3 * 60; break; case ApplicationConfiguration.TimerInterval.SixHours: coinStatsMinutes = 6 * 60; break; case ApplicationConfiguration.TimerInterval.TwelveHours: coinStatsMinutes = 12 * 60; break; default: coinStatsMinutes = 15; break; } return coinStatsMinutes; }
public void LoadApplicationConfiguration() { ApplicationConfiguration tmp = ConfigurationReaderWriter.ReadConfiguration <ApplicationConfiguration>(ApplicationConfigurationFileName()); ObjectCopier.CopyObject(tmp, this); }