Exemplo n.º 1
0
        private void advancedProxiesButton_Click(object sender, EventArgs e)
        {
            if (!perksConfiguration.PerksEnabled)
            {
                if (!perksConfiguration.PerksEnabled)
                {
                    System.Windows.Forms.MessageBox.Show(MiningEngine.AdvancedProxiesRequirePerksMessage,
                        "Perks Required", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
                }

                using (PerksForm perksForm = new PerksForm(perksConfiguration))
                {
                    perksForm.ShowDialog();
                }
            }
            else
            {
                using (ProxySettingsForm proxySettingsForm = new ProxySettingsForm(minerConfiguration))
                {
                    System.Windows.Forms.DialogResult dialogResult = proxySettingsForm.ShowDialog();
                    if (dialogResult == System.Windows.Forms.DialogResult.OK)
                    {
                        perksConfiguration.AdvancedProxying = true;
                        perksConfiguration.SavePerksConfiguration();

                        LoadProxySettings();
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void advancedProxiesButton_Click(object sender, EventArgs e)
        {
            if (!perksConfiguration.PerksEnabled)
            {
                if (!perksConfiguration.PerksEnabled)
                {
                    System.Windows.Forms.MessageBox.Show(MiningEngine.AdvancedProxiesRequirePerksMessage,
                                                         "Perks Required", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
                }

                using (PerksForm perksForm = new PerksForm(perksConfiguration))
                {
                    perksForm.ShowDialog();
                }
            }
            else
            {
                using (ProxySettingsForm proxySettingsForm = new ProxySettingsForm(minerConfiguration))
                {
                    System.Windows.Forms.DialogResult dialogResult = proxySettingsForm.ShowDialog();
                    if (dialogResult == System.Windows.Forms.DialogResult.OK)
                    {
                        perksConfiguration.AdvancedProxying = true;
                        perksConfiguration.SavePerksConfiguration();

                        LoadProxySettings();
                    }
                }
            }
        }
Exemplo n.º 3
0
        private void ConfigurePerksRemotely()
        {
            Perks workingPerksConfiguration = new Perks();

            GetRemoteApplicationConfiguration(this.selectedRemoteInstance);

            ObjectCopier.CopyObject(this.remotePerksConfig, workingPerksConfiguration);

            PerksForm perksForm = new PerksForm(workingPerksConfiguration);
            perksForm.Text = String.Format("{0}: {1}", perksForm.Text, this.selectedRemoteInstance.MachineName);
            DialogResult dialogResult = perksForm.ShowDialog();

            if (dialogResult == System.Windows.Forms.DialogResult.OK)
            {
                ObjectCopier.CopyObject(workingPerksConfiguration, this.remotePerksConfig);
                SetConfigurationRemotely(this.selectedRemoteInstance, null, null, null, this.remotePerksConfig);
            }
        }
Exemplo n.º 4
0
        private void ConfigurePerksLocally()
        {
            PerksForm perksForm = new PerksForm(perksConfiguration);
            DialogResult dialogResult = perksForm.ShowDialog();

            if (dialogResult == System.Windows.Forms.DialogResult.OK)
            {
                bool miningWithMultipleProxies = miningEngine.Mining && (devices.Count(d => d.Kind == DeviceKind.PXY) > 1);
                if (!perksConfiguration.PerksEnabled && miningWithMultipleProxies)
                {
                    throw new Exception(MiningEngine.AdvancedProxiesRequirePerksMessage);
                }

                perksConfiguration.SavePerksConfiguration();

                RefreshViewForConfigurationChanges();
            }
            else
                perksConfiguration.LoadPerksConfiguration(pathConfiguration.SharedConfigPath);
        }
Exemplo n.º 5
0
        private void ConfigurePerksLocally()
        {
            PerksForm perksForm = new PerksForm(perksConfiguration);
            DialogResult dialogResult = perksForm.ShowDialog();

            if (dialogResult == System.Windows.Forms.DialogResult.OK)
            {
                perksConfiguration.SavePerksConfiguration();

                RefreshViewForConfigurationChanges();
            }
            else
                perksConfiguration.LoadPerksConfiguration(pathConfiguration.SharedConfigPath);
        }
Exemplo n.º 6
0
        private void HandleConfigurePerks(object sender, ConfigurationEventArgs e)
        {
            PerksForm perksForm = new PerksForm(e.Perks);
            if (app.SelectedRemoteInstance != null)
                perksForm.Text = String.Format("{0}: {1}", perksForm.Text, app.SelectedRemoteInstance.MachineName);

            e.ConfigurationModified = perksForm.ShowDialog() == DialogResult.OK;
        }