Exemple #1
0
        private void DeleteElementsAnimatedClock(double partActiv)
        {
            int newLastElementClockFace = Convert.ToInt32(Math.Round(clockFace.Length * partActiv));

            if (newLastElementClockFace > lastElementClockFace)
            {
                RestartAnimatedClock();
            }

            circleBar.SetValue(partActiv);
            for (int i = newLastElementClockFace; i < lastElementClockFace; i++)
            {
                clockFace[i].Opacity(0);
            }
            lastElementClockFace = newLastElementClockFace;
        }
        public void Update(string title)
        {
            double timeApp    = dailyUseOfApplication_db.GetTimeForTitle(title);
            double timeAllApp = dailyUseOfApplication_db.GetTimeForAllTitle();

            if (timeAllApp > 0)
            {
                circleBar.SetValue((timeApp / timeAllApp));
                valueBarUsingApplication.SetContent((int)((timeApp / timeAllApp) * 100) + " %");
            }
        }