Example #1
0
        private async Task CheckForBackup()
        {
            DebugEvent.SaveText("CheckForBackup", "NextBackup: " + viewModel.Config.NextScheduledBackup);

            BackupConfig config = viewModel.Config;

            if (config == null || config.NextScheduledBackup > DateTime.Now)
            {
                return;
            }

            BackupTask backupTask = viewModel.BackupTask;

            if (config.IsBackupEnabled && (backupTask == null || backupTask.Result.HasValue))
            {
                await BackupAsync();
            }
        }
Example #2
0
        public static IEnumerable <DebugEvent> GetEvents(string eventsDataString)
        {
            var array = Split(eventsDataString, eventSplitter).ToArray();

            foreach (string eventDataString in array)
            {
                DebugEvent debugEvent = null;

                try
                {
                    debugEvent = new DebugEvent(eventDataString);
                }
                catch { }

                if (debugEvent != null)
                {
                    yield return(debugEvent);
                }
            }
        }
Example #3
0
 private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
 {
     DebugEvent.SaveText("DispatcherUnhandledException", e.Exception.ToString(), e.Exception.StackTrace);
 }