本文整理汇总了C#中Timer.ScheduleAtFixedRate方法的典型用法代码示例。如果您正苦于以下问题:C# Timer.ScheduleAtFixedRate方法的具体用法?C# Timer.ScheduleAtFixedRate怎么用?C# Timer.ScheduleAtFixedRate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timer
的用法示例。
在下文中一共展示了Timer.ScheduleAtFixedRate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StartAnimation
public void StartAnimation()
{
animation_task = new MyTimertask (this);
animation_timer = new Timer ();
animation_timer.ScheduleAtFixedRate (animation_task, ANIMATION_INTERVAL_MS, ANIMATION_INTERVAL_MS);
}
示例2: RestartSeekBarTimer
private void RestartSeekBarTimer ()
{
StopSeekBarTimer ();
mSeekbarTimer = new Timer ();
mSeekbarTimer.ScheduleAtFixedRate (new UpdateSeekbarTask (this), SEEKBAR_DELAY_TIME,
SEEKBAR_INTERVAL_TIME);
}
示例3: StartVoiceTimer
void StartVoiceTimer()
{
var countdown = Arguments.GetInt(EXTRA_TIMER_DURATION_SECONDS);
timerCountdownToast = new Toast(Activity.ApplicationContext);
timerCountdownToast.SetGravity(GravityFlags.Center, 0, 0);
timerCountdownToast.Duration = ToastLength.Short;
var inflater = Activity.LayoutInflater;
var view = inflater.Inflate(Resource.Layout.toast_timer, Activity.FindViewById<ViewGroup>(Resource.Id.toast_layout_root));
timerCountdownToast.View = view;
var label = view.FindViewById<TextView>(Resource.Id.countdown_text);
var timer = new Timer("camera_timer");
timer.ScheduleAtFixedRate(new CountdownTimer(this, label, countdown, timerCountdownToast), 1000, 1000);
}