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