Esempio n. 1
0
        protected void DrawTime()
        {
            if (timerVisual != null)
            {
                drawingCanvas.DeleteVisual(timerVisual);
            }
            int seconds = timeToPlaySeconds - currentlyElpasedTime >= 0 ? timeToPlaySeconds - currentlyElpasedTime : 0;

            if (seconds > 0)
            {
                timerVisual = graphics.DrawText("Time left: " + seconds, 100, 100, timerBrush);
            }
            else if (seconds <= 0)
            {
                timerVisual = graphics.DrawText("You can rest now.", 100, 100, timerBrush);
            }
        }