Пример #1
0
        public static void Show(ExPage _page, 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.page   = _page;
            ExMessageBox.errCtl = _errCtl;

            //MessageBox.Show(strMsg, "確認", MessageBoxButton.OK);
        }
Пример #2
0
        public static void ResultShowClr(ExPage _page, Control _errCtl)
        {
            ExMessageBox.page   = _page;
            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();
        }
        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);
        }
Пример #4
0
        private static void _dlg_Closed(object sender, EventArgs e)
        {
            if (ExMessageBox.utl != null)
            {
                utl.ResultMessageBox(ExMessageBox.errCtl);
            }
            else if (ExMessageBox.page != null)
            {
                page.ResultMessageBox(ExMessageBox.errCtl);
            }

            ExMessageBox.utl  = null;
            ExMessageBox.page = null;
        }
Пример #5
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);
        }
Пример #6
0
        public static void ResultShow(ExPage _page, Control _errCtl, string strMsg)
        {
            if (string.IsNullOrEmpty(strMsg))
            {
                return;
            }

            ExMessageBox.page   = _page;
            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);
        }
        public static void FoucsNextControlNoFocus(Control ctl)
        {
            ExPage page = (ExPage)ExVisualTreeHelper.FindPerentPage(ctl);

            if (page != null)
            {
                page.OnNextControl();
            }
            else
            {
                ExChildWindow _win = (ExChildWindow)ExVisualTreeHelper.FindPerentChildWindow(ctl);
                if (_win != null)
                {
                    _win.OnNextControl();
                }
            }
        }
Пример #8
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;
        }
        public static void Show(ExPage _page, 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.page = _page;
            ExMessageBox.errCtl = _errCtl;

            //MessageBox.Show(strMsg, "確認", MessageBoxButton.OK);
        }
        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;
        }
 public static void ResultShowClr(ExPage _page, Control _errCtl)
 {
     ExMessageBox.page = _page;
     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();
 }
        public static void ResultShow(ExPage _page, Control _errCtl, string strMsg)
        {
            if (string.IsNullOrEmpty(strMsg)) return;

            ExMessageBox.page = _page;
            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);
        }
        private static void _dlg_Closed(object sender, EventArgs e)
        {
            if (ExMessageBox.utl != null)
            {
                utl.ResultMessageBox(ExMessageBox.errCtl);
            }
            else if (ExMessageBox.page != null)
            {
                page.ResultMessageBox(ExMessageBox.errCtl);
            }

            ExMessageBox.utl = null;
            ExMessageBox.page = null;

        }
Пример #14
0
        protected override void OnKeyDown(KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.Enter:

                #region DataForm

                ExDataForm _df = (ExDataForm)ExVisualTreeHelper.FindPerentDataForm(this);
                if (_df != null)
                {
                    ExUserControl _utl = (ExUserControl)ExVisualTreeHelper.FindPerentUserControl(this);

                    #region DataForm EstimateDetail

                    Utl_DataFormEstimate utlEstimate = null;
                    try
                    {
                        utlEstimate = (Utl_DataFormEstimate)_utl;
                    }
                    catch
                    {
                    }
                    if (utlEstimate != null)
                    {
                        if (Keyboard.Modifiers == ModifierKeys.Shift)
                        {
                            utlEstimate.OnBeforeControl();
                            e.Handled = true;
                            return;
                        }
                        else
                        {
                            utlEstimate.OnNextControl();
                            e.Handled = true;
                            return;
                        }
                    }

                    #endregion

                    #region DataForm OrderDetail

                    Utl_DataFormOrder utlOrder = null;
                    try
                    {
                        utlOrder = (Utl_DataFormOrder)_utl;
                    }
                    catch
                    {
                    }
                    if (utlOrder != null)
                    {
                        if (Keyboard.Modifiers == ModifierKeys.Shift)
                        {
                            utlOrder.OnBeforeControl();
                            e.Handled = true;
                            return;
                        }
                        else
                        {
                            utlOrder.OnNextControl();
                            e.Handled = true;
                            return;
                        }
                    }

                    #endregion

                    #region DataForm SalesDetail

                    Utl_DataFormSales utlSales = null;
                    try
                    {
                        utlSales = (Utl_DataFormSales)_utl;
                    }
                    catch
                    {
                    }
                    if (utlSales != null)
                    {
                        if (Keyboard.Modifiers == ModifierKeys.Shift)
                        {
                            utlSales.OnBeforeControl();
                            e.Handled = true;
                            return;
                        }
                        else
                        {
                            utlSales.OnNextControl();
                            e.Handled = true;
                            return;
                        }
                    }

                    #endregion
                }

                #endregion

                #region DataGrid

                ExDataGrid _dg = (ExDataGrid)ExVisualTreeHelper.FindPerentDataGrid(this);
                if (_dg != null)
                {
                    if (Keyboard.Modifiers == ModifierKeys.Shift)
                    {
                        //_dg.MoveBeforeCell();
                        e.Handled = true;
                        return;
                    }
                    else
                    {
                        //_dg.MoveNextCell();
                        e.Handled = true;
                        return;
                    }
                }

                #endregion

                #region Page

                ExPage _page = (ExPage)ExVisualTreeHelper.FindPerentPage(this);
                if (_page != null)
                {
                    if (Keyboard.Modifiers == ModifierKeys.Shift)
                    {
                        _page.OnBeforeControl();
                        e.Handled = true;
                        return;
                    }
                    else
                    {
                        _page.OnNextControl();
                        e.Handled = true;
                        return;
                    }
                }

                #endregion

                #region ChildWindow

                ExChildWindow _win = (ExChildWindow)ExVisualTreeHelper.FindPerentChildWindow(this);
                if (_win != null)
                {
                    if (Keyboard.Modifiers == ModifierKeys.Shift)
                    {
                        _win.OnBeforeControl();
                        e.Handled = true;
                        return;
                    }
                    else
                    {
                        _win.OnNextControl();
                        e.Handled = true;
                        return;
                    }
                }

                #endregion

                break;
            }

            base.OnKeyDown(e);
        }