Ejemplo n.º 1
0
        public Reaction()
        {
            CUI.CUI.DataListItem equationItem
                = new CUI.CUI.DataListItem("Equation",
                                           CUI.CUI.DataListItem.DataType.tString);
            CUI.CUI.DataListItem givenItem
                = new CUI.CUI.DataListItem("Limiting Given",
                                           CUI.CUI.DataListItem.DataType.tString);

            /*CUI.CUI.DataListItem ReactionTypeItem
             *  = new CUI.CUI.DataListItem("Reaction Type",
             *  CUI.CUI.DataListItem.DataType.tString);
             * CUI.CUI.DataListItem ReactionHeatTypeItem
             *  = new CUI.CUI.DataListItem("Reaction Heat Type",
             *  CUI.CUI.DataListItem.DataType.tString);*/
            CUI.CUI.getDataList("Labatron v1 by Jacob Valdez", new CUI.CUI.DataListItem[2] {
                equationItem, givenItem, //ReactionTypeItem, ReactionHeatTypeItem
            });
            string equation = equationItem.getValue as string;

            parseEquationFromString(equation);
            given = parseGiven(givenItem.getValue as string);
            //reactionType = reactionTypeFunc(ReactionTypeItem.getValue as string);
            //reactionHeatType = parseReactionHeatType(ReactionHeatTypeItem.getValue as string);
            setupCompounds(ref reactants, "Reactants");
            setupCompounds(ref products, "Products");
            renderToCSVFile();
        }
Ejemplo n.º 2
0
 public ReactionCompound(string formula,
                         string name, ReactionGiven given,
                         string state)
 {
     this.name       = name;
     this.given      = given;
     this.state      = state;
     this.coefficent = 1;
     this.formula    = formula;
     postInitialization(formula);
 }