Guest User

Untitled

a guest
Nov 17th, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. public int M(int a)
  2.         {
  3.             int result;
  4.  
  5.             this.timer = new System.Windows.Forms.Timer();
  6.             timer.Interval = 100;
  7.             timer.Tick += new EventHandler(timer_Tick);
  8.             timer.Enabled = true;
  9.  
  10.             /* выполнить это, когда таймер остановится */
  11.         /* result = ...
  12.         */
  13.             return result;
  14. }
  15.  
  16.         void timer_Tick(object sender, EventArgs e)
  17.         {
  18.             this.timerTicks += 100;
  19.             if (this.timerTicks >= this.timelimit) {
  20.                 this.timer.Stop();
  21.         //...
  22.             }
  23.         }
Advertisement
Add Comment
Please, Sign In to add comment