private void ViewHistoryButton_Click(object sender, RoutedEventArgs e)
        {
            var contents = new OdometerDataFileReader(panelSettings.dataFileName).Contents;
            var viewer   = new OdometerDataViewer(contents)
            {
                Owner = this,
                WindowStartupLocation = WindowStartupLocation.CenterOwner,
            };

            viewer.ShowDialog();
        }
        protected override void ApplyBindings()
        {
            base.ApplyBindings();
            OdometerReader                 = new OdometerReader(panelSettings.fileName);
            OdometerDataFileReader         = new OdometerDataFileReader(panelSettings.dataFileName);
            ShowCaptionsCheckbox.IsChecked = panelSettings.showCaptions;
            ShowUnitsCheckbox.IsChecked    = panelSettings.showUnits;
            ShowInMetricCheckbox.IsChecked = panelSettings.showInMetric;
            switch (panelSettings.alignment)
            {
            case HorizontalAlignment.Left:
                LeftAlignmentRadio.IsChecked = true;
                break;

            case HorizontalAlignment.Center:
                CenterAlignmentRadio.IsChecked = true;
                break;

            case HorizontalAlignment.Right:
                RightAlignmentRadio.IsChecked = true;
                break;

            default:
                CenterAlignmentRadio.IsChecked = true;
                break;
            }
            if (panelSettings.orientation == Orientation.Horizontal)
            {
                HorizontalLayoutRadio.IsChecked = true;
            }
            else
            {
                VerticalLayoutRadio.IsChecked = true;
            }
            ShowDistanceCheckbox.IsChecked     = panelSettings.showMiles;
            ShowRuntimeCheckbox.IsChecked      = panelSettings.showHours;
            ShowAverageSpeedCheckbox.IsChecked = panelSettings.showSpeed;
            ShowFuelUsedCheckbox.IsChecked     = panelSettings.showFuel;
            ShowEconomyCheckbox.IsChecked      = panelSettings.showMPG;
        }