コード例 #1
0
        private void DisplayConsultation(Consultation consultation)
        {
            CustomConsole.WriteLineEmphasies("{0:yyyy MM dd} > {1}", consultation.Date, consultation.Medic.Name);

            if (consultation.Clinic != null)
            {
                textOutputControl.Write("Clinic", consultation.Clinic.Name);
            }

            if (consultation.Labels != null && consultation.Labels.Count > 0)
            {
                listOutputControl.Write("Labels", consultation.Labels);
            }

            if (consultation.Comments != null)
            {
                textOutputControl.Write("Comments", consultation.Comments);
            }

            if (consultation.Prescriptions != null && consultation.Prescriptions.Count > 0)
            {
                listOutputControl.Write("Prescriptions", consultation.Prescriptions.Select(x => x.Description));
            }
        }
コード例 #2
0
        private static void Main()
        {
            // Perform test

            TestRunner testRunner = new TestRunner(GenerateGrid);

            testRunner.MeasurementDone += HandleMeasurementDone;

            testRunner.PerformTest();

            // Write results

            CustomConsole.WriteLine();

            TimeSpan          averageTime       = testRunner.CalculateAverage();
            TextOutputControl textOutputControl = new TextOutputControl();

            textOutputControl.Write("Average:", averageTime.TotalMilliseconds + " ms");

            // Done

            CustomConsole.Pause();
        }
コード例 #3
0
        private static void HandleMeasurementDone(object sender, MeasurementDoneEventArgs e)
        {
            TextOutputControl textOutputControl = new TextOutputControl();

            textOutputControl.Write("Time:", e.Time.TotalMilliseconds + " ms");
        }