public ShellViewModel(ILogAnalyzerService logAnalyzerService, IFileWatcherService fileWatcherService, IDispatcherService dispatcherService,
IOpenFileService openFileService, IPleaseWaitService pleaseWaitService, IMessageService messageService)
{
_logAnalyzerService = logAnalyzerService;
_fileWatcherService = fileWatcherService;
_dispatcherService = dispatcherService;
_openFileService = openFileService;
_pleaseWaitService = pleaseWaitService;
_messageService = messageService;
ParseCommand = new Command(OnParseCommandExecute, OnParseCommandCanExecute);
LoadFile = new Command<string>(OnLoadFileExecute);
OpenFileCommand = new Command(OnOpenFileCommandExecute);
ExitCommand = new Command(OnExitCommandExecute);
Document = new TextDocument();
Filter = new LogFilter
{
EnableDebug = true,
EnableError = true,
EnableInfo = true,
EnableWarning = true
};
Filter.PropertyChanged += OnFilterPropertyChanged;
Document.Changed += DocumentChanged;
_logEntries = new FastObservableCollection<LogEntry>();
using (var reader = new XmlTextReader("Resources\\HighlightingDefinition.xshd"))
{
HighlightingDefinition = HighlightingLoader.Load(reader, HighlightingManager.Instance);
}
HighlightingManager.Instance.RegisterHighlighting("CatelHighlighting", new[] { ".cool" }, HighlightingDefinition);
}
#endregion