private void UtcOffsetControl_ValueChanged(TimeSpanPicker utcOffsetPicker, TimeSpan newTimeSpan)
        {
            if (this.IsProgrammaticControlUpdate)
            {
                return;
            }

            DateTimeOffset currentImageDateTime = this.ImageCache.Current.GetDateTime();
            DateTimeOffset newImageDateTime = currentImageDateTime.SetOffset(utcOffsetPicker.Value);
            this.ImageCache.Current.SetDateTimeOffset(newImageDateTime);
            utcOffsetPicker.ToolTip = DateTimeHandler.ToDisplayUtcOffsetString(utcOffsetPicker.Value);

            List<ColumnTuplesWithWhere> imageToUpdate = new List<ColumnTuplesWithWhere>() { this.ImageCache.Current.GetDateTimeColumnTuples() };
            this.FileDatabase.UpdateFiles(imageToUpdate);  // write the new UtcOffset to the database
        }
        private void ClockDrift_ValueChanged(TimeSpanPicker sender, TimeSpan newTimeSpan)
        {
            this.RefreshImageTimes();

            // the faster the camera's clock the more likely it is the latest image is in the future relative to when it should be
            // relax the measurement time constraint accordingly
            this.ClockDriftMeasured.Minimum = this.latestFileDateTimeUncorrected.DateTime;
            if (this.ClockDrift.Value < TimeSpan.Zero)
            {
                this.ClockDriftMeasured.Minimum += this.ClockDrift.Value;
            }

            // Enable the start button when there's a correction to apply
            this.ChangesButton.IsEnabled = this.ClockDrift.Value != TimeSpan.Zero;
        }