Beispiel #1
0
        private async Task assignHistogramOutput()
        {
            var thresholdResult          = this.parseTextBoxTextToInteger(out var thresholdParsed, this.threshold);
            var amountOfCategoriesResult =
                this.parseTextBoxTextToInteger(out var amountOfCategoriesParsed, this.amountOfCategories);
            var binSizeResult = this.parseTextBoxTextToInteger(out var binSizeParsed, this.binSize);

            await handleWhenEitherInputsAreNotParsed(thresholdParsed, amountOfCategoriesParsed, binSizeParsed);

            this.fitbitFitbitJournalOutput = new FitbitJournalOutput(this.fitbitJournal);
            this.outputTextBox.Text        =
                this.fitbitFitbitJournalOutput.GetOutput(thresholdResult, amountOfCategoriesResult, binSizeResult).Result;
        }
        private async Task generateHistogram()
        {
            if (this.fitbitJournal.IsEmpty())
            {
                this.outputTextBox.Text = "No Data";
            }
            else
            {
                bool thresholdParsed;
                bool binSizeParsed;
                bool amountOfCategoriesParsed;

                var thresholdResult          = this.parseTextBoxTextToInteger(out thresholdParsed, this.threshold);
                var amountOfCategoriesResult =
                    this.parseTextBoxTextToInteger(out amountOfCategoriesParsed, this.amountOfCategories);
                var binSizeResult = this.parseTextBoxTextToInteger(out binSizeParsed, this.binSize);

                await handleWhenEitherInputsAreNotParsed(thresholdParsed, amountOfCategoriesParsed, binSizeParsed);

                this.fitbitFitbitJournalOutput = new FitbitJournalOutput(this.fitbitJournal);
                this.outputTextBox.Text        =
                    this.fitbitFitbitJournalOutput.GetOutput(thresholdResult, amountOfCategoriesResult, binSizeResult);
            }
        }