public IntervalSyncViewModel(IntervalSyncFrequency syncFrequency)
 {
     _syncFrequency = syncFrequency;
     Hours = syncFrequency.Hours;
     Minutes = syncFrequency.Minutes;
     IsModified = false;
 }
        public override SyncFrequency GetFrequency()
        {
            if (_syncFrequency == null)
            {
                _syncFrequency = new IntervalSyncFrequency();
            }

            if (IsModified)
            {
                var timeNow = DateTime.Now;
                _syncFrequency.StartTime = timeNow.Subtract(new TimeSpan(0, 0, timeNow.Second));
                _syncFrequency.Hours = Hours;
                _syncFrequency.Minutes = Minutes;
            }
            return _syncFrequency;
        }