Beispiel #1
0
        private void frmOption_Load(object sender, EventArgs e)
        {
            //this.Icon = _core.RemoteObject..icon;
            string mstrRegPath    = ISM.CUser.Remote.mstrRegPath;
            string DefaultPathIn  = _core.ApplicationPath;
            string DefaultPathOut = _core.ApplicationPath;
            string TerminalSkin   = _core.TerminalSkin;
            string WindowType     = _core.WindowType;


            txtLockTimeOut.EditValue      = _core.CacheGet("frmOption_LockTimeOut", 60);
            txtCheckInterval.EditValue    = _core.CacheGet("frmOption_CheckInterVal", 60);
            txtWaitTimeout.EditValue      = _core.CacheGet("frmOption_WaitTimeout", 60);
            txtTempPath.EditValue         = _core.CacheGet("frmOption_TempPath", "");
            txtReportPathIn.EditValue     = _core.CacheGet("frmOption_ReportPathIn", "");
            txtReportPathOut.EditValue    = _core.CacheGet("frmOption_ReportPathOut", "");
            txtDynamicPathIn.EditValue    = _core.CacheGet("frmOption_DynamicPathIn", "");
            txtDynamicPathOut.EditValue   = _core.CacheGet("frmOption_DynamicPathOut", "");
            txtSlipsPathIn.EditValue      = _core.CacheGet("frmOption_SlipsPathIn", "");
            txtSlipsPathOut.EditValue     = _core.CacheGet("frmOption_SlipsPathOut", "");
            txtCustReportPathIn.EditValue = _core.CacheGet("frmOption_CustReportPathIn", "");

            //txtWaitTimeout.EditValue = Static.ToStr(Static.RegisterGet(mstrRegPath, "Login", "WaitTimeout", "60"));
            //txtTempPath.EditValue = Static.ToStr(Static.RegisterGet(RegPath, "MainOptions", "TempPath", DefaultPathOut));
            //txtReportPathIn.EditValue = Static.ToStr(Static.RegisterGet(RegPath, "MainOptions", "ReportPathIn", DefaultPathIn + "\\Reports"));
            //txtReportPathOut.EditValue = Static.ToStr(Static.RegisterGet(RegPath, "MainOptions", "ReportPathOut", DefaultPathOut));
            //txtDynamicPathIn.EditValue = Static.ToStr(Static.RegisterGet(RegPath, "MainOptions", "DynamicPathIn", DefaultPathIn + "\\DynamicTemplates"));
            //txtDynamicPathOut.EditValue = Static.ToStr(Static.RegisterGet(RegPath, "MainOptions", "DynamicPathOut", DefaultPathOut));
            //txtSlipsPathIn.EditValue = Static.ToStr(Static.RegisterGet(RegPath, "MainOptions", "SlipsPathIn", DefaultPathIn + "\\Slips"));
            //txtSlipsPathOut.EditValue = Static.ToStr(Static.RegisterGet(RegPath, "MainOptions", "SlipsPathOut", DefaultPathOut));


            /*
             * Caramel - Бор саарал - 0
             * Black - Гүн хар - 1
             * Blue - Гүн цэнхэр - 2
             * DevExpress Style - Саарал - 3
             * Money Twins - Цэнхэр - 4
             * Lilian - Ягаан саарал - 5
             * DevExpress Dark Style - Хар - 6
             */

            FormUtility.LookUpEdit_SetList(ref cboStyle, 0, "Бор саарал");
            FormUtility.LookUpEdit_SetList(ref cboStyle, 1, "Гүн хар");
            FormUtility.LookUpEdit_SetList(ref cboStyle, 2, "Гүн цэнхэр");
            FormUtility.LookUpEdit_SetList(ref cboStyle, 3, "Саарал");
            FormUtility.LookUpEdit_SetList(ref cboStyle, 4, "Цэнхэр");
            FormUtility.LookUpEdit_SetList(ref cboStyle, 5, "Ягаан саарал");
            FormUtility.LookUpEdit_SetList(ref cboStyle, 6, "Хар");
            //int i = Static.ToInt(Static.RegisterGet(RegPath, "MainOptions", "TerminalSkin", TerminalSkin));
            int i = _core.CacheGetInt("frmOption_TerminalSkin", 3);

            cboStyle.EditValue = i;
            defaultLookAndFeel1.LookAndFeel.SetSkinStyle(GetSkinName(i));
            FormUtility.LookUpEdit_SetList(ref cboWindowType, 0, "Child");
            FormUtility.LookUpEdit_SetList(ref cboWindowType, 1, "Tab");
            FormUtility.LookUpEdit_SetValue(ref cboWindowType, WindowType);
        }
Beispiel #2
0
 private void frmIssue_Load(object sender, EventArgs e)
 {
     numUserno.EditValue    = _core.RemoteObject.User.UserNo;
     numReadDay.EditValue   = _core.CacheGetInt(this.Name + "_PROJECTREADDAY", 9);
     numUnReadDay.EditValue = _core.CacheGetInt(this.Name + "_PROJECTREADDAY", 99);
 }
Beispiel #3
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
        }