using System;
using FooEditEngine.WPF;

namespace FooEditor
{
    class PrintHFParser
    {
        DocumentWindow document;
        public PrintHFParser(DocumentWindow document)
        {
            this.document = document;
        }

        public string Parse(object sender, ParseCommandEventArgs e)
        {
            string result;
            result = e.Original.Replace("%f", this.document.Title);
            result = result.Replace("%p", e.PageNumber.ToString());
            return result;
        }
    }
}
