using System;
using FooEditEngine.WPF;

namespace FooEditor
{
    sealed class PrintHFParser
    {
        DocumentWindow document;
        /// <summary>
        /// コンストラクター
        /// </summary>
        public PrintHFParser(DocumentWindow document)
        {
            this.document = document;
        }

        /// <summary>
        /// コマンドを解析する
        /// </summary>
        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;
        }
    }
}
