mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 17:59:17 +00:00
.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System.IO;
|
||||
using System.Windows.Controls;
|
||||
using ICSharpCode.AvalonEdit.Highlighting;
|
||||
|
||||
namespace QuickLook.Plugin.TextViewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for TextViewerPanel.xaml
|
||||
/// </summary>
|
||||
public partial class TextViewerPanel : UserControl
|
||||
{
|
||||
public TextViewerPanel(string path)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
LoadFile(path);
|
||||
}
|
||||
|
||||
private void LoadFile(string path)
|
||||
{
|
||||
viewer.Load(path);
|
||||
|
||||
viewer.SyntaxHighlighting = HighlightingManager.Instance.GetDefinitionByExtension(Path.GetExtension(path));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user