. NET Language app development platform--smobiler Learning log: How to quickly implement timer timer function

Source: Internet
Author: User

Front: Smobiler is a development platform that uses. NET language to develop apps in the VS environment, perhaps more convenient than Xamarin

First, the target style

We want to achieve the effect in the following actions:

1. Drag a Timer control, a TextBox control, a button control, a label control, and an image control to the form interface from "Smobiler components" on the toolbar

Tick events for 2.Timer controls
VB:    timer1_tick (sender as ObjectEventArgstimer1. Tick Me. TextBox1.Text = (convert.toint32 (MetextBox1.Text.ToString ())-1). ToString () End Sub     
C #:   timer1_tick (This. TextBox1.Text = (Convert.ToInt32 (this.textBox1.Text.ToString ( ))-1). ToString (); }

Note: Call the Timer control

The TextChanged event of 3.TextBox
VB:   textbox1_textchanged (sender as ObjectEventArgstextbox1.textchanged If Metimer1. Start () End If end Sub   
C #:   textbox1_textchanged (if (this.textBox1.Text = =else {timer1). Start (); } }

Note: Determine the condition to select the start timer or stop timer

The Click event for the 4.Button control
VB:   button1_click (sender as ObjectEventArgsbutton1. Click Me"All" End Sub   
C #:   button1_click (this.textBox1.Text ="$";}  
5. Modify the properties of the Timer Control A.interval property

The time interval for triggering the tick event, in seconds, the default setting is "1", i.e. the interval time is 1 seconds, see;

Second, the mobile phone effect display

The effect is displayed when the button is pressed:

. NET Language app development platform--smobiler Learning log: How to quickly implement timer timer function

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.