예제 #1
0
        private MaltIngredientItem ParseMalt(string maltContent)
        {
            MaltIngredientItem item = new MaltIngredientItem();

            item.MaltIngredientIndex = int.Parse(maltContent.Substring(",", ")"));
            item.MaltValue           = int.Parse(ParseSelectedDropdownValue(maltContent));
            item.Weight = int.Parse(maltContent.Substring("weight\"  onchange=\"calc()\" value=\"", "\""));
            item.EBC    = int.Parse(maltContent.Substring("col\" value=\"", "\""));

            return(item);
        }
예제 #2
0
        private MaltIngredientItem ParseMalt(string maltContent)
        {
            MaltIngredientItem item = new MaltIngredientItem();

            item.MaltIngredientIndex = int.Parse(maltContent.Substring(",", ")"));
            item.MaltValue = int.Parse(ParseSelectedDropdownValue(maltContent));
            item.Weight = int.Parse(maltContent.Substring("weight\"  onchange=\"calc()\" value=\"", "\""));
            item.EBC = int.Parse(maltContent.Substring("col\" value=\"", "\""));

            return item;
        }
예제 #3
0
        private List <MaltIngredientItem> ParseMalts(string content)
        {
            List <string> malts = content.Substrings("do_drop('malt'", "</tr>");

            List <MaltIngredientItem> maltIngredients = new List <MaltIngredientItem>();

            foreach (string malt in malts)
            {
                MaltIngredientItem item = ParseMalt(malt);

                // 0 == NONE
                if (item.MaltValue != 0)
                {
                    maltIngredients.Add(item);
                }
            }

            return(maltIngredients);
        }