void FindPreviousAsyncCallback(IAsyncResult ar) { ThreadedAsyncResult tar = (ThreadedAsyncResult)ar; FindPreviousOperation state = (FindPreviousOperation)tar.AsyncState; if (state.Result == FindPreviousOperation.OperationResult.Finished && state.Match == null) { InformationAlert ia = new InformationAlert(Catalog.GetString("The pattern you requested was not found."), Catalog.GetString("Beginning of file reached."), mainWindow); ia.Run(); ia.Destroy(); } }
void ReplaceAllAsyncCallback(IAsyncResult ar) { ThreadedAsyncResult tar = (ThreadedAsyncResult)ar; ReplaceAllOperation state = (ReplaceAllOperation)tar.AsyncState; if (state.Result == ReplaceAllOperation.OperationResult.Finished) { InformationAlert ia = new InformationAlert("Found and replaced " + state.NumReplaced + " occurences.", "", null); ia.Run(); ia.Destroy(); } this.Sensitive = true; this.Visible = false; this.Visible = true; }
void FindNextAsyncCallback(IAsyncResult ar) { ThreadedAsyncResult tar = (ThreadedAsyncResult)ar; FindNextOperation state = (FindNextOperation)tar.AsyncState; if (state.Result == FindNextOperation.OperationResult.Finished && state.Match == null) { InformationAlert ia = new InformationAlert("The pattern you requested was not found.", "End of file reached.", null); ia.Run(); ia.Destroy(); } this.Sensitive = true; this.Visible = false; this.Visible = true; }