Ejemplo n.º 1
0
        /// <summary>
        /// Muestra el mensage
        /// </summary>
        /// <param name="pMessage">Mensage a mostrar</param>
        /// <returns>DialogResult</returns>
        public DialogResult Show(String pSource, String pMessage, String pDetail, bool pLogError)
        {
            _FwkMessageView.Source  = pSource;
            _FwkMessageView.Message = pMessage;
            _FwkMessageView.Detail  = pDetail;
            _FwkMessageView.ShowDialog();


            if (pLogError)
            {
                Event wEvent = new Event(EventType.Error, Fwk.Bases.ConfigurationsHelper.HostApplicationName, _FwkMessageView.Detail);
                wEvent.AppId  = Fwk.Bases.ConfigurationsHelper.HostApplicationName;
                wEvent.Source = Fwk.Bases.ConfigurationsHelper.HostApplicationName;
                StaticLogger.Log(wEvent);
            }
            return(_FwkMessageView.DialogResult);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Muestra el Mensaje
        /// </summary>
        /// <param name="pMessage">Mensaje a mostrar</param>
        /// <param name="pMessageBoxButtons">Specifies constants defining which buttons to display on a System.Windows.Forms.MessageBox.</param>
        /// <param name="MessageBoxIcon">Specifies constants defining which information to display.</param>
        /// <returns>DialogResult</returns>
        public static DialogResult Show(String pSource, String pMessage, String pDetail, String pTitle)
        {
            using (ExceptionView wfrmMessageView = new ExceptionView())
            {
                wfrmMessageView.Text    = pTitle;
                wfrmMessageView.Message = pMessage;
                wfrmMessageView.Source  = pSource;
                wfrmMessageView.Detail  = pDetail;
                wfrmMessageView.ShowDialog();

                return(wfrmMessageView.DialogResult);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Muestra el Mensaje
        /// </summary>
        /// <param name="pMessage">Mensaje a mostrar</param>
        /// <param name="pMessageBoxButtons">Specifies constants defining which buttons to display on a System.Windows.Forms.MessageBox.</param>
        /// <param name="MessageBoxIcon">Specifies constants defining which information to display.</param>
        /// <returns>DialogResult</returns>
        public static DialogResult Show(Exception e, String pTitle)
        {
            using (ExceptionView wfrmMessageView = new ExceptionView())
            {
                wfrmMessageView.Detail  = string.Concat("Codigo de error : ", Fwk.Exceptions.ExceptionHelper.GetFwkErrorId(e), Environment.NewLine, Fwk.Exceptions.ExceptionHelper.GetAllMessageException(e));
                wfrmMessageView.Message = e.Message;
                wfrmMessageView.Source  = e.Source;

                if (!String.IsNullOrEmpty(pTitle))
                {
                    wfrmMessageView.Text = pTitle;
                }
                wfrmMessageView.ShowDialog();
                return(wfrmMessageView.DialogResult);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Muestra el Mensaje
        /// </summary>
        /// <param name="pMessage">Mensaje a mostrar</param>
        /// <param name="pMessageBoxButtons">Specifies constants defining which buttons to display on a System.Windows.Forms.MessageBox.</param>
        /// <param name="MessageBoxIcon">Specifies constants defining which information to display.</param>
        /// <returns>DialogResult</returns>
        public static DialogResult Show(String pSource, String pMessage, String pDetail, String pTitle)
        {
            using (ExceptionView wfrmMessageView = new ExceptionView())
            {
                wfrmMessageView.Text = pTitle;
                wfrmMessageView.Message = pMessage;
                wfrmMessageView.Source = pSource;
                wfrmMessageView.Detail = pDetail;
                wfrmMessageView.ShowDialog();

                return wfrmMessageView.DialogResult;
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Muestra el Mensaje
        /// </summary>
        /// <param name="pMessage">Mensaje a mostrar</param>
        /// <param name="pMessageBoxButtons">Specifies constants defining which buttons to display on a System.Windows.Forms.MessageBox.</param>
        /// <param name="MessageBoxIcon">Specifies constants defining which information to display.</param>
        /// <returns>DialogResult</returns>
        public static DialogResult Show(Exception e, String pTitle)
        {

            using (ExceptionView wfrmMessageView = new ExceptionView())
            {

                wfrmMessageView.Detail =string.Concat("Codigo de error : ",Fwk.Exceptions.ExceptionHelper.GetFwkErrorId(e),Environment.NewLine, Fwk.Exceptions.ExceptionHelper.GetAllMessageException(e));
                wfrmMessageView.Message = e.Message;
                wfrmMessageView.Source = e.Source;

                if (!String.IsNullOrEmpty(pTitle))
                    wfrmMessageView.Text = pTitle;
                wfrmMessageView.ShowDialog();
                return wfrmMessageView.DialogResult;
            }
        }