- Date: Feb 2017
- Category: Software
- Key Tags: C#, windows application
A .exe program can run on windows to search keyword location in text file.
It is a .exe program can run on windows to search keyword location in text file. See project code: Source Code
It is a program that searches a text file for a string. It can find all occurrences of the string and show them in a list. Since the text file could be very long, and lists in C# do not display until the button-press code that fills them exits, the program is multithreaded.
The program can do the following:
- Have a textbox for the name of a text file. You can also have a Browse button that will let you find a file to put in the textbox.
- Another textbox will accept text to be found in the document.
- A search button will cause the document to be searched.
- A listview control displays the entire line on which the text was found and the line number within the document.
- Search each line of text as you read it for the search string. You should probably do a case-insensitive comparison. Every time the string is found, put the entire line in which it occurs in the list along with its line number. To make it interesting, put in a pause of 100 milliseconds every time you read a line. This will simulate a long document.
- The Search button text can be change to “Cancel” once the search starts, and can cancel the operation when pressed.
- When search completed or canceled, show message to remind user.
- Show approximate progress when doing research.
- When start a new search, clear old search results.
- When search is fully completed, the cancel button can also change to search button automatically.