/// <summary>
 /// Handles the Click event of the printPreviewToolStripMenuItem control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void printPreviewToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (PrintSetupDialog psd = new PrintSetupDialog(_engine))
     {
         if (psd.ShowDialog() == DialogResult.OK)
         {
             if (psd.Document != null)
             {
                 printPreviewDialog.Document = psd.Document;
                 printPreviewDialog.ShowDialog(this);
             }
         }
     }
 }
 ///// <summary>
 ///// Gets the current print formatter.
 ///// </summary>
 ///// <returns></returns>
 //private PrintDocument GetCurrentPrintFormatter()
 //{
 //    foreach(LoadableItem li in _engine.PluginsProvider.GetPlugisOfSubcalss(typeof(PluginPrintFormatter)))
 //    {
 //        string printFormatter = null;
 //        if(!_engine.SettingsProvider.TryGet("CurrentPrintFormatter", out printFormatter))
 //        {
 //            Printing.PrintFormatterSelector pss = new BritishMicro.TaskClerk.UI.Printing.PrintFormatterSelector();
 //            if(pss.ShowDialog(this) == DialogResult.Cancel)
 //            {
 //                return null;
 //            }
 //            printFormatter = (string)_engine.SettingsProvider.Get("CurrentPrintFormatter");
 //        }
 //        if(li.ReturnType().Name == printFormatter)
 //        {
 //            return li.CreateInstance(_engine) as PrintDocument;
 //        }
 //    }
 //    return null;
 //}
 /// <summary>
 /// Handles the Click event of the printToolStripMenuItem control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void printToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (PrintSetupDialog psd = new PrintSetupDialog(_engine))
     {
         if (psd.ShowDialog() == DialogResult.OK)
         {
             if (psd.Document != null)
             {
                 printDialog.Document = psd.Document;
                 printDialog.Document.Print();
             }
         }
     }
 }