2014-01-24 20:01:20 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Drawing;
|
2014-01-25 00:21:16 +08:00
|
|
|
|
using System.IO;
|
2014-01-24 20:01:20 +08:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace WinAlfred.Plugin.Doc
|
|
|
|
|
{
|
|
|
|
|
public partial class DocViewFrm : Form
|
|
|
|
|
{
|
|
|
|
|
public DocViewFrm()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2014-01-25 00:21:16 +08:00
|
|
|
|
FormClosing+=DocViewFrm_FormClosing;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void DocViewFrm_FormClosing(object sender, FormClosingEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
e.Cancel = true;
|
|
|
|
|
Hide();
|
2014-01-24 20:01:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ShowDoc(string path)
|
|
|
|
|
{
|
2014-01-25 00:21:16 +08:00
|
|
|
|
//string html = File.ReadAllText(path);
|
|
|
|
|
//webBrowser1.DocumentText = html;
|
2014-01-24 20:01:20 +08:00
|
|
|
|
webBrowser1.Url = new Uri(String.Format("file:///{0}", path));
|
|
|
|
|
Show();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|