Ejemplo n.º 1
0
 void Instance_SynchronizationError(object sender, SyncErrorEventArgs e)
 {
     if (InvokeRequired)
         this.Invoke(new EventHandler<SyncErrorEventArgs>(this.Instance_SynchronizationError), new object[] { sender, e });
     else
     {
         //synchroControl1.Visible = false;
         btnSynchronizacja.Enabled = true;
         loginControl1.Enabled = true;
     }
 }
Ejemplo n.º 2
0
        public void LogSyncError(SyncErrorEventArgs errorEventArgs)
        {
            string[] logLines = new string[]
            {
                GetTimeStamp() + errorEventArgs.Severity.ToString() + " Error: " + errorEventArgs.ErrorMessage,
                "Elemento: " + errorEventArgs.NameOfElement + " - " + errorEventArgs.TypeOfElement,
                "Eccezione: " + errorEventArgs.Exception?.Message,
            };

            CreateLogEntry(logLines, new FileInfo(_settings.ErrorLogPath));
        }
Ejemplo n.º 3
0
        protected virtual void RaiseError(
            Exception e         = null,
            string errorMessage = null,
            SyncErrorEventArgs.ErrorSeverity errorSeverity = SyncErrorEventArgs.ErrorSeverity.Minor)
        {
            SyncErrorEventArgs args = new SyncErrorEventArgs()
            {
                Exception     = e,
                Severity      = errorSeverity,
                ErrorMessage  = errorMessage,
                TimeStamp     = DateTime.Now,
                TypeOfElement = GetType()
            };

            ErrorRaised?.Invoke(this, args);
        }
Ejemplo n.º 4
0
 protected virtual void OnSyncErrorRaised(object sender, SyncErrorEventArgs e)
 => _logger.LogError(e.Exception, "Errore di sincronizzazione", new object[] { });
Ejemplo n.º 5
0
 private void HandleSyncError(object sender, SyncErrorEventArgs e) {
     RunOnUiThread(() => {
         _bottomInfoDisplayer.Show(InformationMessage.UploadFailure, MessageSnackbarDisplayer.LongDuration);
     });
 }
Ejemplo n.º 6
0
 protected virtual void OnSyncErrorRaised(object sender, SyncErrorEventArgs e)
 {
     SyncErrorRaised?.Invoke(sender, e);
 }
Ejemplo n.º 7
0
 void Instance_SynchronizationError(object sender, SyncErrorEventArgs e)
 {
     DialogClose();
 }
Ejemplo n.º 8
0
 protected virtual void OnErrorRaised(object sender, SyncErrorEventArgs e)
 {
 }
Ejemplo n.º 9
0
 private void HandleSyncManagerSyncError(object sender, SyncErrorEventArgs e)
 {
     SyncErrorReported.Raise(this, e);
 }
Ejemplo n.º 10
0
 void Instance_SynchronizationError(object sender, SyncErrorEventArgs e)
 {
     //this.SwitchSyncUIEffects(false);
     ClearHandlers();
     UIHelper.ShowError("Błąd podczas synchronizacji. " + e.ExceptionObject.Message);
     OnSynchroEnds();
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Method to be called when sync encountered an error
 /// </summary>
 /// <param name="sender"> The sender of the event</param>
 /// <param name="e">Event with the specific error</param>
 public void OnSyncError(object sender, SyncErrorEventArgs e)
 {
     /* string error = e.Error.Message;
      * Toast.MakeText(this, "Sync finished with error: " + error, ToastLength.Long).Show(); */
 }
Ejemplo n.º 12
0
 private void HandleSyncError(object sender, SyncErrorEventArgs e)
 {
     InvokeOnMainThread(() => {
         this.Show(InformationMessage.UploadFailure, AlertViewController.LongDuration);
     });
 }