コード例 #1
0
        private void runAllDllRegister()
        {
            try
            {
                if (_dtXML.Rows[0]["FlashScreen"].ToString() == "true")
                {
                    ShowSplash();
                }
                if (_dtXML.Rows[0]["Auto_Download"].ToString() == "true")
                {
                    Auto_Download frmDownload = new Auto_Download();
                    frmDownload.DowloadFile();
                }

                _dt = SEL_GET_FORM(_dtXML.Rows[0]["grpForm"].ToString());
                ComVar.Var.ValueChanged += new ComVar.Var.ValueChangedEventHandler(callForm);
                // _dtnForm = new Dictionary<int,string>;
                for (int i = 0; i < _dt.Rows.Count; i++)
                {
                    if (_dt.Rows[i]["SHOW_YN"].ToString() == "Y")
                    {
                        addForm(_dt.Rows[i]["DLL_NM"].ToString(), _dt.Rows[i]["CLASS_NM"].ToString());
                        // _dtnForm.Add(i,
                        // pnMain.Controls[i].Show();
                    }
                }

                ComVar.Var._Frm_Curr = pnMain.Controls[0].Name;
                pnMain.Controls[0].Show();
            }
            catch (Exception ex)
            {
                ComVar.Var.writeToLog(this.Name + "/InitForm  :   " + ex.ToString());
            }
        }
コード例 #2
0
        /*
         * private void runSingleForm()
         * {
         *  Assembly assembly = Assembly.LoadFile(Application.StartupPath + @"\DLL\TMS_PREFIT.DLL");
         *  Type type = assembly.GetType("FORM.FRM_VJ_MAPS");
         *  _dt = SEL_GET_FORM_DLL("FRM_VJ_MAPS");
         *
         *  //add Event Call Form
         *  ComVar.Var.ValueChanged += new ComVar.Var.ValueChangedEventHandler(callForm);
         *  //add Form
         *  Form form = (Form)Activator.CreateInstance(type);
         *  form.FormBorderStyle = FormBorderStyle.None;
         *  form.TopLevel = false;
         *  form.AutoScroll = false;
         *  pnMain.Controls.Add(form);
         *  form.Show();
         *  ComVar.Var._Frm_Curr = pnMain.Controls[0].Name;
         * }
         */

        #region Run Group Form

        private void runGroupForm()
        {
            try
            {
                _dtXML           = ComVar.Func.ReadXML(Application.StartupPath + "\\Config.XML", "MAIN");
                ComVar.Var._Area = string.Concat(_dtXML.Rows[0]["LOC"].ToString(), "_", _dtXML.Rows[0]["LOCNM"].ToString());
                if (_dtXML.Rows[0]["FlashScreen"].ToString() == "true")
                {
                    ShowSplash();
                }
                if (_dtXML.Rows[0]["Auto_Download"].ToString() == "true")
                {
                    Auto_Download frmDownload = new Auto_Download();
                    frmDownload.DowloadFile();
                }
                ComVar.Var._strValue3 = _dtXML.Rows[0]["OP_CD"].ToString();
                ComVar.Var._strValue4 = _dtXML.Rows[0]["CMP_CD"].ToString();
                ComVar.Var._strValue5 = _dtXML.Rows[0]["CMP_NM"].ToString();
                _dt = SEL_GET_FORM(_dtXML.Rows[0]["grpForm"].ToString());
                ComVar.Var.ValueChanged += new ComVar.Var.ValueChangedEventHandler(callForm);
                if (_dt != null && _dt.Rows.Count > 0)
                {
                    for (int i = 0; i < _dt.Rows.Count; i++)
                    {
                        if (_dt.Rows[i]["SHOW_YN"].ToString() == "Y")
                        {
                            addForm(_dt.Rows[i]["DLL_NM"].ToString(), _dt.Rows[i]["CLASS_NM"].ToString());

                            // pnMain.Controls[i].Show();
                        }
                    }
                }
                ComVar.Var._Frm_Curr = pnMain.Controls[0].Name;
                pnMain.Controls[0].Show();
            }
            catch (Exception ex)
            {
                ComVar.Var.writeToLog(this.Name + "/InitForm  :   " + ex.ToString());
            }
        }