Open rain resource library (first. net2.0 software) 2

Source: Internet
Author: User

In the previous articleArticleIn, I mainly talked about the interface settings and some preliminary operations.
See: http://luyu.cnblogs.com/archive/2005/11/25/284281.html

This article focuses on some design ideas and new features, as well as unsolved problems.
After the interface design of this software, there are still 10 major problems to solve, but now it has basically been completed, and some subsequent resource compression and encryption are not done yet.

I have been suffering from a long time problem, that is, how can I generate a statistical row in the last row of the dview, including the statistical record and paging functions. Later, I asked about csdn, and I was unable to implement it because I had no results. I think it may be possible to solve the problem by reloading the datagriditemcreate event, but it is really troublesome, but the efficiency is too low. So I tried other methods and later found that my thinking was too narrow and my thoughts were too stiff. Do I have to use the row of the datagridview? Isn't it possible to set a multi-function control by yourself? It can be accomplished by Multiple labels, Textbox, linklabe, and so on.
I was very happy to think about it. But I saw a widget named bindingnavigator in the data panel of vs2005, which was dragged onto the form. Isn't that really the control I want? I think it can be directly connected to the data source for paging. However, I do not like this method. I like to use datareader to read data. It is nice to use datareader with its appearance and events. The result is really good.
The following is an 8-record I used for testing. Each page defines 3 records, and the other is 3 pages, which can be seen in the last bindingnavigator text domain.


Of course, you can click the title to view the content directly. Click the delete button to delete the current record. However, this function can be displayed only after the Administrator logs on. Otherwise, it is too dangerous. :)

In fact, not all of the content is very beautiful, like this font is too large, because it is not applied to the style, of course, this is a better change, when extracting the image, I can extract the style sheet and add it to this document. :)

The above is all the files of the Software. Except for "About Us", there are only form1.cs and insertlib. CS windows. Where form1 is the main window, And I implemented onlyProgramRun an instance at the same time. To avoid wasting resources and data synchronization.CodeAs follows:

1 String Procname = System. Diagnostics. process. getcurrentprocess (). processname;
2 If (System. Diagnostics. process. getprocessesbyname (procname). getupperbound ( 0 ) >   0 )
3 {
4MessageBox. Show ("The system is running.","Warning", System. Windows. Forms. messageboxbuttons. OK, system. Windows. Forms. messageboxicon. Asterisk );
5}
6 Else
7 Application. Run ( New Mainform ());

It is very concise and clear. I have referenced the code of a friend.

At the same time, I designed a function library data. CS, image. CS, text. CS to process databases, images, and text respectively.
Others are really messy. I 'd like some guidance from the architecture design experts.
When the homepage is loaded for the first time in the form, I will load the listview (article type) on the left side of the main window and the type in the insertlib window (added to static variables, which avoids database operations ). The remaining operations are not difficult.

In addition to the problems mentioned above, this software also has some functions to be improved. For example, in the adaptive window, the paging table adaptive problem should be solved.
After software release, I will release it for your trial. You can share your suggestions with me.

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.