Пример #1
0
        public static void Show(ExUserControl _utl, Control _errCtl, string strMsg, MessageBoxIcon Icon)
        {
            if (string.IsNullOrEmpty(strMsg))
            {
                return;
            }

            Dlg_MessagBox msg = null;

            if (Icon == MessageBoxIcon.Error)
            {
                msg = new Dlg_MessagBox("エラー確認", strMsg, MessageBoxButtons.Ok, Icon);
            }
            else
            {
                msg = new Dlg_MessagBox("確認", strMsg, MessageBoxButtons.Ok, Icon);
            }
            msg.Closed -= ExMessageBox._dlg_Closed;
            msg.Closed += ExMessageBox._dlg_Closed;
            msg.Show();
            ExMessageBox.utl    = _utl;
            ExMessageBox.errCtl = _errCtl;

            //MessageBox.Show(strMsg, "確認", MessageBoxButton.OK);
        }
Пример #2
0
        public static void ResultShowClr(ExChildWindow _win, Control _errCtl)
        {
            ExMessageBox.win    = _win;
            ExMessageBox.errCtl = _errCtl;
            Dlg_MessagBox msg = new Dlg_MessagBox("確認", "クリアします。" + "よろしいですか?", MessageBoxButtons.OkCancel, MessageBoxIcon.Question);

            msg.Closed -= ExMessageBox.dlg_ClosedClr;
            msg.Closed += ExMessageBox.dlg_ClosedClr;
            msg.Show();
        }
Пример #3
0
        public static void Show(string strMsg, string strTitle)
        {
            if (string.IsNullOrEmpty(strMsg))
            {
                return;
            }

            Dlg_MessagBox msg = new Dlg_MessagBox(strTitle, strMsg, MessageBoxButtons.Ok, MessageBoxIcon.Information);

            msg.Show();

            //MessageBox.Show(strMsg, strTitle, MessageBoxButton.OK);
        }
Пример #4
0
        public static void Show(ExPage _page, Control _errCtl, string strMsg)
        {
            if (string.IsNullOrEmpty(strMsg))
            {
                return;
            }

            Dlg_MessagBox msg = new Dlg_MessagBox("確認", strMsg, MessageBoxButtons.Ok, MessageBoxIcon.Information);

            msg.Closed -= ExMessageBox._dlg_Closed;
            msg.Closed += ExMessageBox._dlg_Closed;
            msg.Show();
            ExMessageBox.page   = _page;
            ExMessageBox.errCtl = _errCtl;

            //MessageBox.Show(strMsg, "確認", MessageBoxButton.OK);
        }
Пример #5
0
        public static void ResultShow(ExChildWindow _win, Control _errCtl, string strMsg)
        {
            if (string.IsNullOrEmpty(strMsg))
            {
                return;
            }

            ExMessageBox.win    = _win;
            ExMessageBox.errCtl = _errCtl;
            Dlg_MessagBox msg = new Dlg_MessagBox("確認", strMsg, MessageBoxButtons.OkCancel, MessageBoxIcon.Question);

            msg.Closed -= ExMessageBox.dlg_Closed;
            msg.Closed += ExMessageBox.dlg_Closed;
            msg.Show();

            //return MessageBox.Show(strMsg, "確認", MessageBoxButton.OKCancel);
        }
Пример #6
0
        private static void dlg_ClosedClr(object sender, EventArgs e)
        {
            Dlg_MessagBox msg = (Dlg_MessagBox)sender;

            msg.Closed -= ExMessageBox.dlg_ClosedClr;

            if (ExMessageBox.utl != null)
            {
                if (msg.Result == MessageBoxResult.OK)
                {
                    utl.ResultMessageBoxClr(msg.Result, null);
                }
                else
                {
                    utl.ResultMessageBoxClr(msg.Result, ExMessageBox.errCtl);
                }
            }
            else if (ExMessageBox.page != null)
            {
                if (msg.Result == MessageBoxResult.OK)
                {
                    page.ResultMessageBoxClr(msg.Result, null);
                }
                else
                {
                    page.ResultMessageBoxClr(msg.Result, ExMessageBox.errCtl);
                }
            }
            else if (ExMessageBox.win != null)
            {
                if (msg.Result == MessageBoxResult.OK)
                {
                    win.ResultMessageBoxClr(msg.Result, null);
                }
                else
                {
                    win.ResultMessageBoxClr(msg.Result, ExMessageBox.errCtl);
                }
            }

            ExMessageBox.utl  = null;
            ExMessageBox.page = null;
            ExMessageBox.win  = null;
        }
Пример #7
0
        public static void Show(string strMsg, MessageBoxIcon Icon)
        {
            if (string.IsNullOrEmpty(strMsg))
            {
                return;
            }

            Dlg_MessagBox msg = null;

            if (Icon == MessageBoxIcon.Error)
            {
                msg = new Dlg_MessagBox("エラー確認", strMsg, MessageBoxButtons.Ok, Icon);
            }
            else
            {
                msg = new Dlg_MessagBox("確認", strMsg, MessageBoxButtons.Ok, Icon);
            }
            msg.Show();

            //MessageBox.Show(strMsg, "確認", MessageBoxButton.OK);
        }
Пример #8
0
        public static void Show(string strMsg)
        {
            if (string.IsNullOrEmpty(strMsg))
            {
                return;
            }
            if (!string.IsNullOrEmpty(Common.gstrMsgSessionError))
            {
                return;
            }

            Dlg_MessagBox msg = new Dlg_MessagBox("確認", strMsg, MessageBoxButtons.Ok, MessageBoxIcon.Information);

            msg.Show();

            if (strMsg.IndexOf("セッションタイムアウトが発生しました。") != -1)
            {
                Common.gstrMsgSessionError = strMsg;
            }

            //MessageBox.Show(strMsg, "確認", MessageBoxButton.OK);
        }