Example #1
0
        private void SliderAchivedGoals_OnValueChanged(object sender, ValueChangedEventArgs e)
        {
            LabelAchivedGoals.Text = FormatHelpers.FormatSliderValue(e.NewValue, StepValue);

            FileImageSource objFileImageSource = (FileImageSource)ImageAchivedGoals.Source;

            string currentFile = objFileImageSource.File;
            string smiley      = SmileyHelper.GetSmileyImage(e.NewValue);

            if (currentFile != smiley)
            {
                ImageAchivedGoals.Source = smiley;
            }
        }
Example #2
0
        private List <Entry> GetStressEntries(DateTime startDate, DateTime endDate)
        {
            var entries       = App.MoodDatabase.GetMoodentries(startDate, endDate);
            var stressentries = new List <Entry>();

            foreach (var e in entries)
            {
                stressentries.Add(new Entry((float)e.Stress)
                {
                    Color      = SKColor.Parse("#90D585"),
                    Label      = FormatHelpers.FormatSliderValue(e.Stress, 0.1),
                    ValueLabel = e.EntryDate.ToString("d/M")
                });
            }

            return(stressentries);
        }
Example #3
0
        private List <Entry> GetAchivedGoalsEntries(DateTime startDate, DateTime endDate)
        {
            var entries     = App.MoodDatabase.GetMoodentries(startDate, endDate);
            var goalentries = new List <Entry>();

            foreach (var e in entries)
            {
                goalentries.Add(new Entry((float)e.AchivedGoals)
                {
                    Color      = SKColor.Parse("#68B9C0"),
                    Label      = FormatHelpers.FormatSliderValue(e.AchivedGoals, 0.1),
                    ValueLabel = e.EntryDate.ToString("d/M")
                });
            }

            return(goalentries);
        }