I have been playing for two days! I found that if I leave the code, the entire computer industry will perish @@! So I returned from "strong" and played a zombie (csonline) (* ^__^ *) One afternoon *)...!!! I am a little nervous. I am looking for a video screen on the Internet to save the computer industry! "Tens of millions of Internet users are searched in the public, and the tutorials are actually on the elastic drive ...... "@!
Along with the "we are their slaves", I read 3 Windows Mobile's snake design, greedysnake (so nice to read !) Another addictive game !! Not only do you want to play, but you want to write more !!! Instructor Zhang yuanshan (not a zombie) is talking about me very much!
A little more nonsense, direct theme, "flat-screen slide calculator" is the upgraded version of the last calculator, although the last time using a simple factory mode, the code is still visible, however, after reading the explanation from brother Zhang (My name is Zhang), I found that Visual Studio's powerful functions were not used, and I was very dissatisfied! The factory class and operation base class and Their Derived classes are all compiled into DLL assembly (solution example)
In the projectCreate two new "Class Libraries" and the "Class Libraries" will eventually be compiled into DLL assembly.
Add operators to overwrite the factory directly. DLL and operation. the DLL is enough. The functions that the calculator does not have (single responsibility principle) are removed. The operator (+-*/…) that was clicked directly last time is fixed -*/......) Bug; Package the calculator into an installation file, Of course, it can also be uninstalled. It eliminates the bug that too much data is not displayed in the text box last time. walking behind the trend, by the way, it changes the interface of the last time and is mainly pure.
Flat interface:
Installation Process:
After installation, the "cainiao" shortcut is automatically generated:
In "start" --> "All Programs", minicalc2.0: The red icon is used to uninstall the minic1c program.
When there are less than 13 digits on the display screen:
When there are 13 more:
When there are many:
Of course, when the number decreases, the number increases accordingly.
Open the program and slide the boot (how can a group of cool words get it ):
When the program is closed, minic1c is automatically moved down to the taskbar (because it is too slow, I have helped you ):
Finish finishing the work ~~~ Steal food @@!
Update ing:
Adjust the size of the displayed number by judging the number of displayed data:
Code:
- If (this. textbox1.text. length> 13)
- {
- Switch (this. textbox1.text. length)
- {
- Case 13:
- Textbox1.font = new font ("Comic Sans MS", 26, fontstyle. Bold );
- Break;
- Case 14:
- Textbox1.font = new font ("Comic Sans MS", 24, fontstyle. Bold );
- Break;
- Case 15:
- Textbox1.font = new font ("Comic Sans MS", 22, fontstyle. Bold );
- Break;
- Case 16:
- Textbox1.font = new font ("Comic Sans MS", 20, fontstyle. Bold );
- Break;
- Case 17:
- Textbox1.font = new font ("Comic Sans MS", 18, fontstyle. Bold );
- Break;
- Case 18:
- Textbox1.font = new font ("Comic Sans MS", 15, fontstyle. Bold );
- Break;
- Default:
- Textbox1.font = new font ("Comic Sans MS", 8, fontstyle. Bold );
- Break;
- }
- }
- Else
- {
- Textbox1.font = new font ("Comic Sans MS", 26, fontstyle. Bold );
- }
You can modify the font color, size, and shape based on your hobbies.
The sleek slide uses an API: animatewindow ().
Finally, disable special program effects:
// Obtain the current Coordinate
Code:
- Point myp = new point (this. Specify toplocation. X, this. Specify toplocation. y );
- If (myp. Y <screenheight)
- {
- This. Specify toplocation = new point (myp. X, myp. Y + 5 );
- }
- Else
- {
- This. timer2.enabled = false;
- MessageBox. Show ("Thanks for using the" Smelly V2 "Calculator ");
- This. Close ();
Of course, we still provide the source code with true feelings:
Www.rayfile.com/zh-cn/files/2460ba2e-8ba1-11de-86ac-0014221f469f/
I wonder if csdn has a network disk?If yes, there will certainly be a lot of open-source code, haha ~ Senior cainiao like me will be happy!
Tip: If you want to know the software design process, go to the "Mobile Phone snake design" of "Zhang yuanshan! Download O from csdn!