C # EM security guard summary and source code sharing for system applications

Source: Internet
Author: User

C # EM security guard summary and source code sharing for system applications
This article mainly summarizes an article in his "C # System Application series", describing the previous design and implementation of the software for clearing personal computer usage records ". I hope it will help you. At the same time, we suggest you download the source code. Both the interface, comments, and applications are very good C # learning programs.
:
Http://pan.baidu.com/s/1o93rS
If there are any deficiencies in this article, please try again! The main purpose is to share some ideas and source code for everyone to learn. At the same time, the program is developed through VS2012, and other earlier versions may encounter errors. If you think this part of content is redundant, you can directly learn the source code, and the Code contains very detailed comments.
PS: because of the small name of Dongshan (Eastmountain), CSDN is called Eastmount, so it is named EM security guard. Haha, it was quite fun to build a 360-inch interface.

1. The project structure and functions are described first, as shown in figure:
It can be seen that there are mainly six functions, and the corresponding running effect is shown in:

Its functions are divided into six parts, specifically the CleanIE module. cs), office document clearing module (CleanWord. cs), simple File Deletion \ clear the recycle bin module (CleanRecycle. cs), USB trace removal module (CleanU. cs), CleanRecent. cs and CleanFile. cs ). These functions are all completed according to the completion requirements.
OpaqueCommand. cs and MyOpaqueLayer. cs is the transparent cover effect, that is, when you select a certain part of the function, the interface will add a transparent cover effect, and through the Pancel control, click different icons to display different functional interfaces.
Here, you can learn the following knowledge:
C # transparent cover for system applications MyOpaqueLayer achieves 360 interface shadow effect
C # System Application-using the Pancel control to switch between the same form page
C # Two Methods for moving the Untitled form in System Applications
C # minimize the form of a system application to the taskbar and Common Operations

2. Clear IE module the main function of this module is to obtain and clear Internet traces of Internet Explorer (IE) browsers. After running the software on the main interface, click the "Clear IE" icon to go to the "Clear Internet trace module ". You can implement three functions: Get the address bar of the IE browser and display it in the form of a list, get the recent Website access history of the IE browser, and delete Internet traces of the IE browser.

As shown in, you can obtain the browsing history of IE and click "Get address bar URL" to obtain the URL Information entered by the browser. You can select clear IE on the left to clearly understand the trace information of the browser, it is a multiple-choice cleanup.

Shows the code layout of CleanIE. cs:

Here, you can learn the following knowledge:
C # obtain IE browsing records for system applications and enter the web site in the IE Address Bar
C # clearing Cookies, temporary IE files, and history of System Applications

Iii. Clear the USB flash disk recording module

After entering this module, click "Retrieve Information" to display the information about the recently used USB mobile storage media in sequence in the list. The information includes: label, USB name, UID mark, path information, and time information. Click "delete information" to clear recent USB usage trace records, and follow the prompts in this module.


This part is also a technical difficulty, because Microsoft does not have a lot of open-source content to learn on its own, at the same time, there is little information about this aspect. You can see the history of the USB flash disk and the mobile hard disk. It is obtained from the registry and there are two pieces of information in this figure.
No. 2 is the mobile hard drive information of Western data, as shown in.

The corresponding CleanU. cs code is shown in: (this function is commented out because you are worried that the USB information of the Registry will be damaged. For details, see the code and blog)
Here, you can learn the following knowledge:
C # obtain the USB usage record through the registry for system applications (1)
C # usage of registry for system applications

Iv. Simple file deletion and clearing of the recycle bin Module

After entering this module, click "add file" to bring up an "open" dialog box. You can select the file to be deleted as needed, the selected file is added to the list. When you click the back button, all the added files are cleared and you need to select the file again. When you click Delete file, the files added to the list will be deleted. When you click "Clear recycle bin", the recycle bin files in each disk partition will be cleared, and the operation results will be prompted in this module.


The add file button is shown in. You can click the button to clear the content of the recycle bin:

Similarly, different buttons in the CleanRecyle. cs Code have different implementation functions.
Here, you can learn the following knowledge:
C # Clear recycle bin for system applications

5. Clear the recently used file trace Module

When you enter this module, When you click the "view recently browsed file path" button, the list of recently accessed Windows documents is displayed, the number of retrieved files is displayed in the "get/clear files in total" column. When you click the "get recently accessed files in the address bar" button, the List displays the records of recently accessed files in the address bar of the Windows system, and displays the number of retrieved files in the "get all/clear Files" column; when you click "delete recently browsed file information", the recently accessed files in Windows and the recently accessed files are cleared in the Windows Address Bar.

Obtain the recently viewed file as a shortcut in the Recent path in WIndows, as shown in:
The CleanRecent. cs code is shown in:
PS: This part has a bug. When you open a new file when you obtain the recently viewed file, it will automatically add and display multiple connections to one file, however, you can click "get" again to obtain the correct hyperlink.
Here, you can learn the following knowledge:
C # Getting Windows latest use records for system applications

6. after entering this module, clear the Word trace module and click "Get office recently used documents" to obtain the latest use documents of Microsoft office software, documents of the word, ppt, excel, and Other types are displayed in a list. Click "clear recently used office documents" to clear records of recently accessed office documents, in the displayed dialog box, the deletion operation is displayed.

The static directory is used to obtain and store office files. The Code is as follows: string dirPath = @ "C: \ Users \ dell \ AppData \ Roaming \ Microsoft \ Office \ Recent ";
Because my computer name is Dell, we recommend that you obtain the name of the Environment computer.

7. The file crushing module is used to thoroughly smash specified files and ensure that the files cannot be recovered. The tree control is mainly used, which is a practical effect that I did at that time. As shown in:

Here, you can learn the following knowledge:
C # TreeView Control for system applications (I). display the tree-like disk file directory and loading icon
C # ListView Control for System Application (2). Load the file information in the folder of the selected node
C # ListView Control for System Application (3). Right-click ContextMenuStrip and choose "Open delete file ".
C # System Application calling SDelete program to smash files and Basic Principles

Finally, I hope the article will help you. I am so decadent recently. Please do something! I have never gone out for an internship and should also learn the real application knowledge. On the one hand, I need to complete the semantic analysis of Wikipedia, on the one hand, let's see if we can make some smart python analysis images, search engines, and other things! Let's get down and do something practical ~
(By: Eastmount http://blog.csdn.net/eastmount)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.