Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        static void menu_OnMenuItemClicked(Agent.Contrib.UI.Menu menu, MenuItem menuItem, DateTime time)
        {
            Debug.Print(menuItem.Title + " was clicked at " + time.ToString());

        }