private static void menu_OnMenuItemClicked(Menu menu, MenuItem menuItem, DateTime time) { int duration = 0; if (Parse.TryParseInt(menuItem.CommandArg, out duration)) { menu.OnMenuItemClicked -= menu_OnMenuItemClicked; menu.AutoRenderOnButtonPress = false; TimeSpan ts = new TimeSpan(0, duration, 0); countdown = new CountdownTimer(ts); countdown.OnCountdownTimerElapsed += countdown_OnCountdownTimerElapsed; countdown.Start(); cdt.Change(0, 1000); ShowCountDown(null); } }
private static void countdown_OnCountdownTimerElapsed(CountdownTimer timer, DateTime Timestamp) { ResetAll(); }