Example #1
0
        private void EditCurrentMultipool(Coin currentConfiguration)
        {
            using (MultipoolChooseForm multipoolChooseForm = new MultipoolChooseForm(currentConfiguration.PoolGroup))
            {
                DialogResult dialogResult = multipoolChooseForm.ShowDialog();

                if (dialogResult == DialogResult.OK)
                {
                    PoolGroup workingMultipool = multipoolChooseForm.SelectedMultipool;

                    Coin existingConfiguration =
                        configurations.SingleOrDefault(c => (c != currentConfiguration) &&
                                                       c.PoolGroup.Id.Equals(workingMultipool.Id, StringComparison.OrdinalIgnoreCase));

                    if (existingConfiguration == null)
                    {
                        ObjectCopier.CopyObject(workingMultipool, currentConfiguration.PoolGroup);
                        coinListBox.Items[coinListBox.SelectedIndex] = workingMultipool.Name;
                    }
                    else
                    {
                        //don't create a dupe
                        MessageBox.Show(String.Format("A configuration for {0} already exists.", workingMultipool.Name),
                                        "Duplicate Configuration", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
            }
        }
Example #2
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            MultipoolChooseForm multipoolChooseForm = new MultipoolChooseForm();
            DialogResult        dialogResult        = multipoolChooseForm.ShowDialog();

            if (dialogResult == DialogResult.OK)
            {
                AddCoinConfiguration(multipoolChooseForm.SelectedMultipool);
            }
        }
Example #3
0
 private void toolStripButton2_Click(object sender, EventArgs e)
 {
     MultipoolChooseForm multipoolChooseForm = new MultipoolChooseForm();
     DialogResult dialogResult = multipoolChooseForm.ShowDialog();
     if (dialogResult == DialogResult.OK)
         AddCoinConfiguration(multipoolChooseForm.SelectedMultipool);
 }
Example #4
0
        private void EditCurrentMultipool(Coin currentConfiguration)
        {
            using (MultipoolChooseForm multipoolChooseForm = new MultipoolChooseForm(currentConfiguration.PoolGroup))
            {
                DialogResult dialogResult = multipoolChooseForm.ShowDialog();

                if (dialogResult == DialogResult.OK)
                {
                    PoolGroup workingMultipool = multipoolChooseForm.SelectedMultipool;

                    Coin existingConfiguration =
                        configurations.SingleOrDefault(c => (c != currentConfiguration)
                            && c.PoolGroup.Id.Equals(workingMultipool.Id, StringComparison.OrdinalIgnoreCase));

                    if (existingConfiguration == null)
                    {
                        ObjectCopier.CopyObject(workingMultipool, currentConfiguration.PoolGroup);
                        coinListBox.Items[coinListBox.SelectedIndex] = workingMultipool.Name;
                    }
                    else
                    {
                        //don't create a dupe
                        MessageBox.Show(String.Format("A configuration for {0} already exists.", workingMultipool.Name),
                            "Duplicate Configuration", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                }
            }
        }