Esempio n. 1
0
        private void DisplayAnswer(Answer answer)
        {
            panelInput.Visible = false;
            panelAnswer.Visible = true;

            blAnswer.DataSource = answer.GetAsListItems();
            blAnswer.DataTextField = "Text";
            blAnswer.DataValueField = "Value";
            blAnswer.DataBind();
        }
Esempio n. 2
0
        private Answer ConvertFromSeconds(double value)
        {
            var answer = new Answer();

            answer.Seconds = value % 60;
            value = Math.Floor(value / 60);

            answer.Mintes = value % 60;
            value = Math.Floor(value / 60);

            answer.Hours = value % 24;

            answer.Days = Math.Floor(value / 24);

            return answer;
        }
Esempio n. 3
0
        private Answer ConvertFromSeconds(double value)
        {
            var answer = new Answer();

            answer.Seconds = Math.Round(value, MidpointRounding.AwayFromZero) % 60;
            value = Math.Floor(value / 60);

            answer.Mintes = value % 60;
            value = Math.Floor(value / 60);

            answer.Hours = value % 24;

            answer.Days = Math.Floor(value / 24);

            return answer;
        }