Flat slide calculator (updated ing)

Source: Internet
Author: User

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:
  1. If (this. textbox1.text. length> 13)
  2. {
  3. Switch (this. textbox1.text. length)
  4. {
  5. Case 13:
  6. Textbox1.font = new font ("Comic Sans MS", 26, fontstyle. Bold );
  7. Break;
  8. Case 14:
  9. Textbox1.font = new font ("Comic Sans MS", 24, fontstyle. Bold );
  10. Break;
  11. Case 15:
  12. Textbox1.font = new font ("Comic Sans MS", 22, fontstyle. Bold );
  13. Break;
  14. Case 16:
  15. Textbox1.font = new font ("Comic Sans MS", 20, fontstyle. Bold );
  16. Break;
  17. Case 17:
  18. Textbox1.font = new font ("Comic Sans MS", 18, fontstyle. Bold );
  19. Break;
  20. Case 18:
  21. Textbox1.font = new font ("Comic Sans MS", 15, fontstyle. Bold );
  22. Break;
  23. Default:
  24. Textbox1.font = new font ("Comic Sans MS", 8, fontstyle. Bold );
  25. Break;
  26. }
  27. }
  28. Else
  29. {
  30. Textbox1.font = new font ("Comic Sans MS", 26, fontstyle. Bold );
  31. }


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:
  1. Point myp = new point (this. Specify toplocation. X, this. Specify toplocation. y );
  2. If (myp. Y <screenheight)
  3. {
  4. This. Specify toplocation = new point (myp. X, myp. Y + 5 );
  5. }
  6. Else
  7. {
  8. This. timer2.enabled = false;
  9. MessageBox. Show ("Thanks for using the" Smelly V2 "Calculator ");
  10. 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!

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.