Exemplo n.º 1
0
 private void DefaultFTPTaskErrorHandler(FTPResponseException exception, object tag)
 {
     Dispatcher.Invoke(new Action(() => {
         if (tag == null || tag.GetType() != typeof(TaskInfoUI))
         {
             return;
         }
         var fi             = tag as TaskInfoUI;
         fi.Message         = exception.Message;
         fi.IsErrorHappened = true;
     }));
 }
Exemplo n.º 2
0
 private void DefaultFTPErrorHandler(FTPResponseException exception)
 {
     if (exception.Recoverable)
     {
         Dispatcher.Invoke(new Action(() => {
             TextStatus.Text = exception.Message;
         }));
         return;
     }
     Dispatcher.Invoke(new Action(() => {
         TextStatus.Text  = exception.Message + "\r\n连接没有成功或连接已断开,请重新连接。";
         connectionStatus = ConnectionStatus.Closed; ButtonConnect.Content = "连接";
     }));
 }