Exemple #1
0
        public FunctionalGroup(string str, System.Data.DataRow row)
        {
            string[] parts = str.Split('\t');
            Name         = parts[0].Trim();
            row["Name"]  = Name;
            Smart        = parts[1].Trim();
            row["Smart"] = Smart;
            //string ReactionName = parts[2].Trim();
            //string URL = parts[3].Trim();
            //string ReactantA = parts[4].Trim();
            //string ReactantB = parts[5].Trim();
            //string ReactantC = parts[6].Trim();
            //string AcidBase = parts[7].Trim();
            //string Heat = parts[8].Trim();
            //string Catalyst = parts[9].Trim();
            //string Solvent = parts[10].Trim();
            //string Product = parts[11].Trim();
            //string[] ByProducts = new string[]{ parts[12].Trim() };
            m_Reactions = new NamedReactionCollection();
            //m_Reactions.Add(new NamedReaction(this, ReactionName, URL, ReactantA, ReactantB, ReactantC, Product, AcidBase, Heat, Catalyst, Solvent, ByProducts));
            string fileName = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "..\\..\\Data\\Images\\" + Name + ".jpg";

            if (System.IO.File.Exists(fileName))
            {
                Image = System.Drawing.Image.FromFile(fileName);
            }
            row["Image"]  = Image;
            m_AtomIndices = new List <int[]>();
        }
 public FunctionalGroupCollection()
 {
     m_NamedReactions = new NamedReactionCollection();
 }
 public NamedReactionCollectionPropertyDescriptor(NamedReactionCollection coll, int idx) :
     base("#" + idx.ToString(), null)
 {
     this.collection = coll;
     this.index      = idx;
 }