private void Save_Click(object sender, RoutedEventArgs e) { if (currentSelection.CharLength == 0) { ///TODO: notify the user why this failed return; } var flowDocumentText = XamlWriter.Save(this.inputText.Document); var tags = this.tags.Text.Split(' ', ',').ToList(); this.tags.Text = ""; this.inputText.Document = new FlowDocument(); var annotationAndTags = new annotationAndTags() { Annotation = flowDocumentText, Tags = tags }; ThreadPool.QueueUserWorkItem(saveAnnotation, annotationAndTags); }
private void Save_Click(object sender, RoutedEventArgs e) { if (currentSelection.CharLength == 0) { ///TODO: notify the user why this failed return; } var flowDocumentText = XamlWriter.Save(this.inputText.Document); var tags = this.tags.Text.Split(' ', ',').ToList(); this.tags.Text = ""; this.inputText.Document = new FlowDocument(); var annotationAndTags = new annotationAndTags() { Annotation = flowDocumentText, Tags = tags }; ThreadPool.QueueUserWorkItem(saveAnnotation, annotationAndTags); }