public int Replace(string from, string to, FindReplaceExpression expression) { int count = 0; switch (expression) { case FindReplaceExpression.FirstFound: { var list = new List <SearchResult>(); list.Add(SearchSelector.rezults.ElementAt(activeFindIndex)); count = Replace(list, to); if (count > 0) { SearchSelector.rezults.Remove(SearchSelector.rezults.ElementAt(activeFindIndex)); } break; } case FindReplaceExpression.InThisPage: { count = 0; break; } case FindReplaceExpression.InThisParagraph: { count = 0; break; } case FindReplaceExpression.InThisBook: { count = ReplaceAll(Search(from, expression), to); // SearchSelector.RestoreOriginalState(this); break; } } //SearchSelector.rezults.ForEach(item => // item.Position += FlowPosition); BrowseProject.OpenFile(BrowseProject.CurentFile, Path.GetFileNameWithoutExtension(BrowseProject.CurentFile)); NotesBrowser.MainControl.Items.Refresh(); return(count); }
private void MenuAddPr_Click(object sender, RoutedEventArgs e) { BrowseProject.CreateProject(); }
public void Dispose() { BrowseProject.Dispose(); TextBox.MainControl.Dispose(); }