Exemple #1
0
        public int CountInFile(string path)
        {
            var content = _storeReader.Read(path);
            var pages   = _textParser.Parse(content);

            return(_wordCounter.Count(pages));
        }
Exemple #2
0
        public Bitmap DrawGraph(FunctionInfo[] infos)
        {
            try
            {
                var funcs = infos.Select(inf => new Function(parser.Parse(inf.Function), inf.Color, inf.Function,
                                                             inf.Styles, inf.LeftBorders, inf.RightBorders));

                var picture = fDrawer.CreateChart(funcs.ToArray());
                return(picture);
            }
            catch (ParseException e)
            {
                throw new DrawingException(e.Message);
            }
        }