private void client_OnLogonError(object sender, IMsTscAxEvents_OnLogonErrorEvent e) { int errorCode = e.lError; string message = RdpClientErrorMessages.ToLogonMessage(errorCode); string finalMsg = String.Format("There was a logon error returned from the RDP Connection, details:\n\nLogon Code:{0}\n\nLogon Description:{1}", errorCode, message); Logging.Error(finalMsg); }
private void client_OnWarning(object sender, IMsTscAxEvents_OnWarningEvent e) { int warningCode = e.warningCode; string message = RdpClientErrorMessages.ToWarningMessage(warningCode); string finalMsg = String.Format("There was a warning returned from the RDP Connection, details:\n\nWarning Code:{0}\n\nWarning Description:{1}", warningCode, message); Logging.Warn(finalMsg); }
private void client_OnFatalError(object sender, IMsTscAxEvents_OnFatalErrorEvent e) { int errorCode = e.errorCode; string message = RdpClientErrorMessages.ToFatalErrorMessage(errorCode); string finalMsg = String.Format("There was a fatal error returned from the RDP Connection, details:\n\nError Code:{0}\n\nError Description:{1}", errorCode, message); MessageBox.Show(finalMsg); Logging.Fatal(finalMsg); }
private void ShowDisconnetMessageBox(IMsTscAxEvents_OnDisconnectedEvent e) { int reason = e.discReason; string error = RdpClientErrorMessages.ToDisconnectMessage(this.client, reason); if (!String.IsNullOrEmpty(error)) { string message = String.Format("Error connecting to {0}\n\n{1}", this.client.Server, error); MessageBox.Show(this, message, "Terminals", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private void client_OnFatalError(object sender, IMsTscAxEvents_OnFatalErrorEvent e) { int errorCode = e.errorCode; string message = RdpClientErrorMessages.ToFatalErrorMessage(errorCode); string finalMsg = string.Format("There was a fatal error returned from the RDP connection \"{0}\".", errorCode, message); Log.Fatal(errorCode.ToString()); if (!string.IsNullOrEmpty(finalMsg) && !string.IsNullOrEmpty(finalMsg.Trim())) { MessageBox.Show(finalMsg); } Log.Fatal(finalMsg); }
private void client_OnLogonError(object sender, IMsTscAxEvents_OnLogonErrorEvent e) { int errorCode = e.lError; string message = RdpClientErrorMessages.ToLogonMessage(errorCode); string finalMsg = string.Format("There was a logon error returned from the RDP connection.\nLogon code: {0}\nLogon description: {1}", errorCode, message); if (errorCode != -2) { Log.Error(finalMsg); } else { Log.Debug(finalMsg); } }