PowerToys/Plugins/Wox.Plugin.Doc/DocViewFrm.cs

36 lines
830 B
C#
Raw Normal View History

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;
2014-01-29 18:33:24 +08:00
namespace Wox.Plugin.Doc
2014-01-24 20:01:20 +08:00
{
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();
}
}
}