Example #1
0
        /// <summary>
        /// Shows the dialog box
        /// </summary>
        /// <param name="caption">The caption.</param>
        /// <param name="message">The message.</param>
        /// <param name="details">The details.</param>
        /// <returns></returns>
        public static DialogResult ShowDialog(string caption, string message, string details)
        {
            ErrorBox error = new ErrorBox();
            error.lblError.Text = message;
            error.Text = caption;
            error.txtDetails.Text = details;

            try {
                Network.Messenger.SendPacket(PMU.Sockets.TcpPacket.CreatePacket("clienterror", details));
            } catch { }

            return error.ShowDialog();
        }
 /// <summary>
 /// Called when an exception occurs.
 /// </summary>
 /// <param name="ex">The exception.</param>
 public static void OnException(Exception ex)
 {
     ErrorBox.ShowDialog("Unhandled Exception", ex.Message, ex.ToString());
 }