Esempio n. 1
0
 public MainWindow(IMarkdownConverter markdownConverter, ISpellCheckProvider spellCheckProvider, FindReplaceDialog findReplaceDialog)
 {
     InitializeComponent();
     MarkdownConverter       = markdownConverter;
     SpellCheckProvider      = spellCheckProvider;
     FindReplaceDialog       = findReplaceDialog;
     Loaded                 += OnLoaded;
     Closing                += OnClosing;
     SizeChanged            += (s, e) => CalculateEditorMargins();
     Editor.PropertyChanged += EditorOnPropertyChanged;
     Editor.TextChanged     += (s, e) => Preview.UpdatePreview(Editor.Text);
     Editor.ScrollChanged   += (s, e) => Preview.SetScrollOffset(e);
 }
Esempio n. 2
0
 private void ExecuteUpdatePreview(object sender, ExecutedRoutedEventArgs e) => Preview.UpdatePreview(Editor.Text);