Exemplo n.º 1
0
 public void CreateConfigurations(out Engine.Data.Configuration.Engine engineConfiguration,
                                  out Data.Configuration.Application applicationConfiguraion,
                                  out Perks perksConfiguration)
 {
     engineConfiguration     = CreateEngineConfiguration();
     applicationConfiguraion = CreateApplicationConfiguration();
     perksConfiguration      = CreatePerksConfiguration();
 }
Exemplo n.º 2
0
        public SettingsForm(Data.Configuration.Application applicationConfiguration, MultiMiner.Engine.Data.Configuration.Xgminer minerConfiguration,
                            Paths pathConfiguration)
        {
            InitializeComponent();

            this.minerConfiguration       = minerConfiguration;
            this.applicationConfiguration = applicationConfiguration;
            this.pathConfiguration        = pathConfiguration;
        }
        public static Data.Configuration.Application ToModelObject(this Remoting.Data.Transfer.Configuration.Application transferObject)
        {
            Data.Configuration.Application modelObject = new Data.Configuration.Application();

            ObjectCopier.CopyObject(transferObject, modelObject, "HiddenColumns");
            modelObject.HiddenColumns = transferObject.HiddenColumns.ToList();

            return modelObject;
        }
Exemplo n.º 4
0
        public SettingsForm(Data.Configuration.Application applicationConfiguration, MultiMiner.Engine.Data.Configuration.Xgminer minerConfiguration,
            Paths pathConfiguration)
        {
            InitializeComponent();

            this.minerConfiguration = minerConfiguration;
            this.applicationConfiguration = applicationConfiguration;
            this.pathConfiguration = pathConfiguration;
        }
        public static Data.Configuration.Application ToModelObject(this Remoting.Data.Transfer.Configuration.Application transferObject)
        {
            Data.Configuration.Application modelObject = new Data.Configuration.Application();

            ObjectCopier.CopyObject(transferObject, modelObject, "HiddenColumns");
            modelObject.HiddenColumns = transferObject.HiddenColumns.ToList();

            return(modelObject);
        }
Exemplo n.º 6
0
 private Data.Configuration.Application CreateApplicationConfiguration()
 {
     Data.Configuration.Application applicationConfiguraion;
     applicationConfiguraion = new Data.Configuration.Application();
     applicationConfiguraion.MobileMinerMonitoring     = remoteMonitoringCheck.Checked;
     applicationConfiguraion.MobileMinerRemoteCommands = remoteCommandsCheck.Checked;
     applicationConfiguraion.MobileMinerEmailAddress   = emailAddressEdit.Text;
     applicationConfiguraion.MobileMinerApplicationKey = appKeyEdit.Text;
     applicationConfiguraion.BriefUserInterface        = true;
     return(applicationConfiguraion);
 }
Exemplo n.º 7
0
        private Data.Configuration.Application CreateApplicationConfiguration()
        {
            Data.Configuration.Application applicationConfiguraion;
            applicationConfiguraion = new Data.Configuration.Application();
            applicationConfiguraion.MobileMinerMonitoring     = remoteMonitoringCheck.Checked;
            applicationConfiguraion.MobileMinerRemoteCommands = remoteCommandsCheck.Checked;
            applicationConfiguraion.MobileMinerEmailAddress   = emailAddressEdit.Text;
            applicationConfiguraion.MobileMinerApplicationKey = appKeyEdit.Text;

            //make things obvious for new user, don't hide them
            applicationConfiguraion.BriefUserInterface = false;

            return(applicationConfiguraion);
        }
Exemplo n.º 8
0
        public CoinsForm(List <Engine.Data.Configuration.Coin> coinConfigurations, List <CryptoCoin> knownCoins,
                         Data.Configuration.Application applicationConfiguration, Data.Configuration.Perks perksConfiguration)
        {
            this.configurations = coinConfigurations;
            this.knownCoins     = knownCoins;

            InitializeComponent();

            saveToRemotingCheckBox.Visible = false;
            if (perksConfiguration.PerksEnabled && perksConfiguration.EnableRemoting)
            {
                saveToRemotingCheckBox.Visible           = true;
                this.applicationBindingSource.DataSource = applicationConfiguration;
            }
        }
Exemplo n.º 9
0
        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);
            }
        }
Exemplo n.º 10
0
        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);
            }
        }
Exemplo n.º 11
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);
            }
        }
Exemplo n.º 12
0
        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)
            {
                Engine.Data.Configuration.Engine newEngineConfiguration;
                Data.Configuration.Application newApplicationConfiguration;
                Perks newPerksConfiguration;
                wizardForm.CreateConfigurations(out newEngineConfiguration, out newApplicationConfiguration, out newPerksConfiguration);

                this.engineConfiguration = newEngineConfiguration;
                this.applicationConfiguration = newApplicationConfiguration;
                this.perksConfiguration = newPerksConfiguration;

                this.engineConfiguration.SaveCoinConfigurations();
                this.engineConfiguration.SaveMinerConfiguration();
                this.applicationConfiguration.SaveApplicationConfiguration();
                this.perksConfiguration.SavePerksConfiguration();

                SetBriefMode(applicationConfiguration.BriefUserInterface);
            }
        }
        public static Remoting.Data.Transfer.Configuration.Application ToTransferObject(this Data.Configuration.Application modelObject)
        {
            Remoting.Data.Transfer.Configuration.Application transferObject = new Remoting.Data.Transfer.Configuration.Application();

            ObjectCopier.CopyObject(modelObject, transferObject, "HiddenColumns");
            transferObject.HiddenColumns = modelObject.HiddenColumns.ToArray();

            return(transferObject);
        }
Exemplo n.º 14
0
        private Data.Configuration.Application CreateApplicationConfiguration()
        {
            Data.Configuration.Application applicationConfiguraion;
            applicationConfiguraion = new Data.Configuration.Application();
            applicationConfiguraion.MobileMinerMonitoring = remoteMonitoringCheck.Checked;
            applicationConfiguraion.MobileMinerRemoteCommands = remoteCommandsCheck.Checked;
            applicationConfiguraion.MobileMinerEmailAddress = emailAddressEdit.Text;
            applicationConfiguraion.MobileMinerApplicationKey = appKeyEdit.Text;

            //make things obvious for new user, don't hide them
            applicationConfiguraion.BriefUserInterface = false;

            return applicationConfiguraion;
        }
Exemplo n.º 15
0
 private Data.Configuration.Application CreateApplicationConfiguration()
 {
     Data.Configuration.Application applicationConfiguraion;
     applicationConfiguraion = new Data.Configuration.Application();
     applicationConfiguraion.MobileMinerMonitoring = remoteMonitoringCheck.Checked;
     applicationConfiguraion.MobileMinerRemoteCommands = remoteCommandsCheck.Checked;
     applicationConfiguraion.MobileMinerEmailAddress = emailAddressEdit.Text;
     applicationConfiguraion.MobileMinerApplicationKey = appKeyEdit.Text;
     applicationConfiguraion.BriefUserInterface = true;
     return applicationConfiguraion;
 }