private void EndSync(EndSyncEventArgs args)
        {
            switch (args.Result)
            {
                case SyncResult.Finished:
                    if (args.StatisticsContainer.IsEmpty())
                        return;

                    ServiceProvider.ShowNotification(
                        SyncNotificationResources.SyncFinish,
                        args.StatisticsContainer.GetFormattedValues(ServiceProvider),
                        NotificationType.Info);

                    if (Config.Instance.SoundConfig.MakeSound)
                        Beeper.DoBeep(Config.Instance.SoundConfig.SoundFile);
                    break;

                case SyncResult.Failed:
                    ServiceProvider.ShowNotification(
                        SyncNotificationResources.SyncError,
                        args.Exception.Message,
                        NotificationType.Error);
                    break;
            }
        }
        private void EndSync(EndSyncEventArgs args)
        {
            switch (args.Result)
            {
            case SyncResult.Finished:
                if (args.StatisticsContainer.IsEmpty())
                {
                    return;
                }

                ServiceProvider.ShowNotification(
                    SyncNotificationResources.SyncFinish,
                    args.StatisticsContainer.GetFormattedValues(ServiceProvider),
                    NotificationType.Info);

                if (Config.Instance.SoundConfig.MakeSound)
                {
                    Beeper.DoBeep(Config.Instance.SoundConfig.SoundFile);
                }
                break;

            case SyncResult.Failed:
                ServiceProvider.ShowNotification(
                    SyncNotificationResources.SyncError,
                    args.Exception.Message,
                    NotificationType.Error);
                break;
            }
        }
Exemple #3
0
 private void OnEndSync(EndSyncEventArgs arg)
 {
     _endSync.OnNext(arg);
 }
Exemple #4
0
 private void OnEndSync(EndSyncEventArgs arg)
 {
     _endSync.OnNext(arg);
 }