2016-02-15 58 views

回答

0
public MainPage() 
{ 
    var timer = new DispatcherTimer(); 
    timer.Tick += DispatcherTimerEventHandler; 
    timer.Interval = new TimeSpan(0, 0, 0, 1); 
    timer.Start(); 
} 

private void DispatcherTimerEventHandler(object sender, object e) 
{ 
    coin();    
} 

private void coin() 
{ 
    //Runs every second. 
} 
計時器