コード例 #1
0
ファイル: SettingsForm.cs プロジェクト: Capkeeper/MultiMiner
        public SettingsForm(ApplicationConfiguration applicationConfiguration, XgminerConfiguration minerConfiguration)
        {
            InitializeComponent();

            this.minerConfiguration = minerConfiguration;
            this.applicationConfiguration = applicationConfiguration;
        }
コード例 #2
0
ファイル: StrategiesForm.cs プロジェクト: nwfella/MultiMiner
 public StrategiesForm(StrategyConfiguration strategyConfiguration, List<CryptoCoin> knownCoins, 
     ApplicationConfiguration applicationConfiguration)
 {
     InitializeComponent();
     this.strategyConfiguration = strategyConfiguration;
     this.applicationConfiguration = applicationConfiguration;
     this.knownCoins = knownCoins;
 }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: WizardForm.cs プロジェクト: nwfella/MultiMiner
 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;
 }
コード例 #5
0
ファイル: WizardForm.cs プロジェクト: nwfella/MultiMiner
 public void CreateConfigurations(out EngineConfiguration engineConfiguration, 
     out ApplicationConfiguration applicationConfiguraion)
 {
     engineConfiguration = CreateEngineConfiguration();
     applicationConfiguraion = CreateApplicationConfiguration();
 }
コード例 #6
0
ファイル: MainForm.cs プロジェクト: hrvojevujcec/MultiMiner
        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();
            }
        }
コード例 #7
0
ファイル: MainForm.cs プロジェクト: hrvojevujcec/MultiMiner
 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;
 }
コード例 #8
0
        public void LoadApplicationConfiguration()
        {
            ApplicationConfiguration tmp = ConfigurationReaderWriter.ReadConfiguration <ApplicationConfiguration>(ApplicationConfigurationFileName());

            ObjectCopier.CopyObject(tmp, this);
        }