// O=P(OC)(OC)C

        private void namedReactionComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            ChemInfo.NamedReaction reaction = fGroups[this.functionalGroupComboBox.SelectedItem.ToString()].NamedReactions[this.namedReactionComboBox.SelectedItem.ToString()];
            if (reaction.ReactionImage.Length > 0)
            {
                this.pictureBox1.Image = reaction.ReactionImage[0];
            }
            this.listBox1.Items.Clear();
            this.listBox1.Items.AddRange(reaction.References.ToArray());
        }
        //[NonSerialized] List<string> m_Reactants;
        //[NonSerialized] List<string> m_ByProducts;

        public ReactionOutput(ChemInfo.NamedReaction reaction)
        {
            Name       = reaction.Name;
            URL        = reaction.URL;
            Product    = reaction.Product;
            ByProducts = reaction.ByProducts;
            Reactants  = reaction.Reactants;
            Catalyst   = reaction.Catalyst;
            Solvent    = reaction.Solvent;
            AcidBase   = reaction.AcidBase;
        }
 private void listBox1_DoubleClick(object sender, EventArgs e)
 {
     ChemInfo.NamedReaction reaction = fGroups[this.functionalGroupComboBox.SelectedItem.ToString()].NamedReactions[this.namedReactionComboBox.SelectedItem.ToString()];
     ChemInfo.Reference     r        = reaction.GetReference(this.listBox1.SelectedItem.ToString());
     if (r != null)
     {
         if (!string.IsNullOrEmpty(r.URL))
         {
             System.Diagnostics.Process.Start(r.URL);
         }
     }
 }
        private void reactionsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ReactionEditor editor = new ReactionEditor(fGroups);

            System.Windows.Forms.DialogResult result = editor.ShowDialog();
            ChemInfo.NamedReaction            rxn    = editor.SelectedNamedReaction;
            if (rxn != null)
            {
                rxn.Solvent = editor.Solvent.ToString();
                rxn.SetAcidBase(editor.AcidBase);
                rxn.Catalyst = editor.Catalyst;
            }
        }
 private void ReactionNameComboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     ChemInfo.NamedReaction r = m_FunctionalGroup.NamedReactions[ReactionNameComboBox.SelectedItem.ToString()];
     reactantAComboBox.SelectedItem = r.ReactantA.ToUpper();
     reactantBComboBox.SelectedItem = r.ReactantB.ToUpper();
     this.Solvent            = (ChemInfo.SOLVENT)Enum.Parse(typeof(ChemInfo.SOLVENT), r.Solvent);
     this.AcidBase           = r.GetAcidBase();
     this.HeatButton.Checked = false;
     if (r.Catalyst.ToLower().Contains("heat"))
     {
         this.HeatButton.Checked = true;
     }
     this.SmartsLabel.Text = "SMARTS: " + m_FunctionalGroup.Smart;
     this.linkLabel1.Text  = r.URL;
 }