Пример #1
0
 private void InitAll()
 {
     #region [ Build param ]
     _core.InitAll();
     #endregion
     #region [ SetStatusBar ]
     SetStatusBar();
     #endregion
     _core.TempPath = _core.CacheGetStr("frmOption_TempPath", "");
 }
Пример #2
0
        private void InitAll()
        {
            #region [ Building events ... ]
            MainForm._splash.SetStatus("Building events ...");
            System.Windows.Forms.Application.DoEvents();

            InitEvents();
            #endregion
            #region [ Building lock timeout ... ]
            MainForm._splash.SetStatus("Building timer ...");
            System.Windows.Forms.Application.DoEvents();

            _directClose = true;

            int locktimeout = 1;
            try
            {
                locktimeout = _core.CacheGetInt("frmOption_LockTimeOut", 99);
            }
            catch { }

            _timer          = new System.Windows.Forms.Timer();
            _timer.Interval = 1000;
            _timer.Tick    += _timer_Tick;
            _timer.Enabled  = true;
            #endregion
            #region [ Build param ]
            MainForm._splash.SetStatus("Building parameter...");
            System.Windows.Forms.Application.DoEvents();

            //_core.RemoteObject.InitALL();
            _core.InitAll();
            #endregion
            #region [ Set status ]
            MainForm._splash.SetStatus("Building status ...");
            System.Windows.Forms.Application.DoEvents();

            //Stream stream = _core.Resource.GetStream("hpro_icon");

            //_core.icon = new System.Drawing.Icon(stream);

            this.Text = "InfoPos";
            //this.Icon = _core.icon;

            #endregion
            #region [ Set Menu Settings ]
            MainForm._splash.SetStatus("Building menu ...");
            System.Windows.Forms.Application.DoEvents();

            #endregion
            #region [ Set Outlook menu Settings ]
            SetLeftMenu();
            #endregion
            #region [ Set StatusBar ]
            SetStatusBar();
            #endregion
            #region [ Building dictionary ... ]
            MainForm._splash.SetStatus("Building dictionary ...");
            System.Windows.Forms.Application.DoEvents();

            try
            {
                string          filename = "ism.dicdata.dll";
                BinaryFormatter bf       = new BinaryFormatter();
                using (FileStream fs = new FileStream(filename, FileMode.Open))
                {
                    _core.Dictionary = (DataSet)bf.Deserialize(fs);
                    fs.Flush();
                    fs.Close();
                }
            }
            catch (Exception ex)
            {
                this.Close();
            }
            #endregion
            _core.MainForm = this;
            _directClose   = false;
            //frmDashboard frm = new frmDashboard(_core);
            //frm.MdiParent = _core.MainForm;
            //frm.Dock = DockStyle.Fill;
            //frm.Show();
            _core.TempPath = _core.CacheGetStr("frmOption_TempPath", "");
            //_core.TxnDateChanged += new InfoPos.Core.Core.dlgServerDateChanged(_core_TxnDateChanged);
            //_core.MsgRecv += new InfoPos.Core.Core.dlgMsgRecv(_core_MsgRecv);
            #region [Terminal Message]
            timer       = new System.Windows.Forms.Timer();
            timer.Tick += timer_Tick;
            //_core.HeavenProMessages += new InfoPos.Core.Core.dlgHeavenProMessages(_core_HeavenProMessages);
            timer.Interval = 1000;
            timer.Enabled  = true;
            #endregion
        }
Пример #3
0
        private void frmDashBSettings_Load(object sender, EventArgs e)
        {
            appname  = _core.ApplicationName;
            formname = "Parameter." + this.Name;
            FormName = this;
            try
            {
                string[] name =
                {
                    "Шинэ хэлцэл болон гэрээт баталгаа",
                    "Хугацаа дөхсөн даатгалын хэлцэл",
                    "Хугацаа дөхсөн давхар даатгалын хэлцэл",
                    "Том нөхөн төлбөр",
                    _core.CacheGetStr("frmFinalStatement_Name",        ""),
                    "Final Statements1",
                    "Хэрэглэгчийн хариуцсан хэлцлийн мэдээлэл",
                    "Хэрэглэгчийн хариуцсан нөхөн төлбөрийн мэдээлэл",
                    "Ажлын төлөвлөгөө сануулга (CRM & Issue Tracking)",
                    "Шинээр гэрээ хийгдэж байгаа явц",
                    "Төлбөр хувааж төлөх хуваарь",
                    "Давхар даатгалд өгөх хэлцэл",
                    "Х/Б харилцагчийн явцын үе шат",
                    "Нээлттэй төсөл",
                    "Дуудлага"
                };
                string[] status =
                {
                    //_core.CacheGetStr("frmNewDeal_NewDeal", "Visible"),
                    //_core.CacheGetStr("frmOldContract_OldContract", "Visible"),
                    //_core.CacheGetStr("frmReInsurance_ReInsurance", "Visible"),
                    //_core.CacheGetStr("frmTopClaim_TopClaim", "Visible"),
                    //_core.CacheGetStr("frmFinalStatements_FinalStatements", "Hidden"),
                    //_core.CacheGetStr("frmFinalStatements1_FinalStatements1", "Hidden"),
                    //_core.CacheGetStr("frmNewDeal_NewDeal", "Visible"),
                    //_core.CacheGetStr("frmNewDeal_NewDeal", "Visible"),
                    //_core.CacheGetStr("frmNewDeal_NewDeal", "Visible"),
                    //_core.CacheGetStr("frmNewDeal_NewDeal", "Visible"),
                    //_core.CacheGetStr("frmNewDeal_NewDeal", "Visible"),
                    //_core.CacheGetStr("frmNewDeal_NewDeal", "Visible"),
                    //_core.CacheGetStr("frmNewDeal_NewDeal", "Visible"),
                    //_core.CacheGetStr("frmNewDeal_NewDeal", "Visible"),

                    //Static.ToStr(Static.RegisterGet(_core.RegPath , "Dashboard\\Visible", "OldContract", "Visible")),
                    //Static.ToStr(Static.RegisterGet(_core.RegPath , "Dashboard\\Visible", "ReInsurance", "Visible")),
                    //Static.ToStr(Static.RegisterGet(_core.RegPath , "Dashboard\\Visible", "TopClaim", "Visible")),
                    //Static.ToStr(Static.RegisterGet(_core.RegPath , "Dashboard\\Visible", "Final Statements", "Hidden")),
                    //Static.ToStr(Static.RegisterGet(_core.RegPath , "Dashboard\\Visible", "Final Statements1", "Hidden")),
                    //Static.ToStr(Static.RegisterGet(_core.RegPath , "Dashboard\\Visible", "Deal Report", "Hidden")),
                    //Static.ToStr(Static.RegisterGet(_core.RegPath , "Dashboard\\Visible", "Claim Report", "Hidden")),
                    //Static.ToStr(Static.RegisterGet(_core.RegPath , "Dashboard\\Visible", "Issue", "Visible")),
                    //Static.ToStr(Static.RegisterGet(_core.RegPath , "Dashboard\\Visible", "NewContract", "Visible")),
                    //Static.ToStr(Static.RegisterGet(_core.RegPath , "Dashboard\\Visible", "DealPay", "Visible")),
                    //Static.ToStr(Static.RegisterGet(_core.RegPath , "Dashboard\\Visible", "MoveReDeal", "Visible")),
                    //Static.ToStr(Static.RegisterGet(_core.RegPath , "Dashboard\\Visible", "ContactStep", "Visible")),
                    //Static.ToStr(Static.RegisterGet(_core.RegPath , "Dashboard\\Visible", "Project", "Visible")),
                    //Static.ToStr(Static.RegisterGet(_core.RegPath , "Dashboard\\Visible", "Operator", "Visible"))
                };

                DataTable DT = new DataTable();
                DataRow   dr = null;
                DT.Columns.Add("status", typeof(string)); //Төлөв
                DT.Columns.Add("name", typeof(string));   //Панелийн нэр
                for (int i = 0; i < name.Length; i++)
                {
                    dr           = DT.NewRow();
                    dr["status"] = status[i];
                    dr["name"]   = name[i];
                    DT.Rows.Add(dr);
                }

                grdSettings.DataSource            = DT;
                gvwSettings.Columns[0].Caption    = "Төлөв";
                gvwSettings.Columns[0].ColumnEdit = CreateRepositoryCheckEdit();
                gvwSettings.Columns[1].Caption    = "Панелийн нэр";
                gvwSettings.Columns[1].OptionsColumn.AllowEdit = false;
                FormUtility.RestoreStateForm(appname, ref FormName);
                FormUtility.RestoreStateGrid(appname, formname, ref gvwSettings);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }