Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 3
0
 private void OnEndSync(EndSyncEventArgs arg)
 {
     _endSync.OnNext(arg);
 }
Exemplo n.º 4
0
 private void OnEndSync(EndSyncEventArgs arg)
 {
     _endSync.OnNext(arg);
 }