Beispiel #1
0
        private void Form_SettingButtonClicked(object pSender, EventArgs pEventArgs)
        {
            try
            {
                CoFAS_DevExpressManager.SetCursor(this, Cursors.WaitCursor);

                CoFAS_MES.CORE.UserForm.frmPageSetting xfrmPageSetting = new CORE.UserForm.frmPageSetting();
                //xfrmPageSetting.PASS_CORP_CODE = _pCORP_CODE;
                xfrmPageSetting.PASS_PARENT_WINDOW_NAME = _pWINDOW_NAME;
                xfrmPageSetting.PASS_USER_CODE          = _pUSER_CODE;
                xfrmPageSetting.PASS_PARENT_LANGUAGE    = _pLANGUAGE_TYPE;
                xfrmPageSetting.PASS_PARENT_FONT        = _pFONT_SETTING;
                xfrmPageSetting.ShowDialog();

                if (xfrmPageSetting.PASS_RESULT)
                {
                    InitializeSetting();

                    xfrmPageSetting.Dispose();
                }
            }
            catch (ExceptionManager pExceptionManager)
            {
                CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString()));
            }
            finally
            {
                CoFAS_DevExpressManager.SetCursor(this, Cursors.Default);
            }
        }
        private void Form_SettingButtonClicked(object pSender, EventArgs pEventArgs)
        {
            try
            {
                CoFAS_MES.CORE.UserForm.frmPageSetting xfrmPageSetting = new CORE.UserForm.frmPageSetting();
                //xfrmPageSetting.PASS_CORP_CODE = _pCORP_CODE;
                xfrmPageSetting.PASS_PARENT_WINDOW_NAME = _pWINDOW_NAME;
                xfrmPageSetting.PASS_USER_CODE          = _pUSER_CODE;
                xfrmPageSetting.PASS_PARENT_LANGUAGE    = _pLANGUAGE_TYPE;
                xfrmPageSetting.PASS_PARENT_FONT        = _pFONT_SETTING;
                xfrmPageSetting.ShowDialog();

                //if (dashboardViewer.Dashboard == null)
                //{
                //    using (CoFAS_MES.CORE.UserForm.frmViewDesign designerForm = new CoFAS_MES.CORE.UserForm.frmViewDesign(null))
                //    {
                //        //designerForm.PASS_CORP_CODE = _pCORP_CODE;
                //        designerForm.PASS_PARENT_WINDOW_NAME = this.Text;
                //        designerForm.PASS_PARENT_WINDOW_ID = _pWINDOW_NAME;
                //        designerForm.PASS_USER_CODE = _pUSER_CODE;
                //        designerForm.PASS_PARENT_LANGUAGE = _pLANGUAGE_TYPE;
                //        designerForm.PASS_PARENT_FONT = _pFONT_SETTING;

                //        designerForm.ShowDialog();
                //    }
                //}

                //else
                //{
                //    using (Dashboard dashboard = CreateCopy(dashboardViewer.Dashboard))
                //    {
                //        using (CoFAS_MES.CORE.UserForm.frmViewDesign designerForm = new CoFAS_MES.CORE.UserForm.frmViewDesign(dashboard))
                //        {
                //            //designerForm.PASS_CORP_CODE = _pCORP_CODE;
                //            designerForm.PASS_PARENT_WINDOW_NAME = this.Text;
                //            designerForm.PASS_PARENT_WINDOW_ID = _pWINDOW_NAME;
                //            designerForm.PASS_USER_CODE = _pUSER_CODE;
                //            designerForm.PASS_PARENT_LANGUAGE = _pLANGUAGE_TYPE;
                //            designerForm.PASS_PARENT_FONT = _pFONT_SETTING;

                //            designerForm.ShowDialog();
                //            if (designerForm.SaveDashboard)
                //            {
                //                Dashboard = CreateCopy(designerForm.Dashboard);
                //                dashboardModified = true;
                //            }
                //        }
                //    }
                //}
            }
            catch (ExceptionManager pExceptionManager)
            {
                CoFAS_DevExpressManager.ShowErrorMessage(string.Format("{0}\n{1}", pExceptionManager.Exception.Message.ToString(), pExceptionManager.TargetSite.ToString()));
            }
            finally
            {
                CoFAS_DevExpressManager.SetCursor(this, Cursors.Default);
            }
        }
        private void _btPageSetting_Click(object sender, EventArgs e)
        {
            CoFAS_MES.CORE.UserForm.frmPageSetting xfrmPageSetting = new CORE.UserForm.frmPageSetting();

            xfrmPageSetting.PASS_PARENT_WINDOW_NAME = strPageSetting_WINDOW_NAME;
            xfrmPageSetting.PASS_USER_CODE          = strPageSetting_USER_CODE;
            xfrmPageSetting.PASS_PARENT_LANGUAGE    = strPageSetting_LANGUAGE;
            xfrmPageSetting.PASS_PARENT_FONT        = fntPageSetting_FONT;

            xfrmPageSetting.ShowDialog();

            if (xfrmPageSetting.PASS_RESULT)
            {
                xfrmPageSetting.Dispose();
            }
        }