Ejemplo n.º 1
0
        private void ReadIni()
        {
            Ini ini = new Ini(inipath);

            Options.filetype = string.IsNullOrEmpty(ini.IniReadValue("RECORDER", "filetype").ToLower()) == false ? ini.IniReadValue("RECORDER", "filetype").ToLower() : "wav";
            Options.savedir = string.IsNullOrEmpty(ini.IniReadValue("RECORDER", "savedir")) == false ? ini.IniReadValue("RECORDER", "savedir") : string.Format(@"{0}\RecFiles", Options.usersdefaultpath);
            Options.dbserverip = string.IsNullOrEmpty(ini.IniReadValue("RECORDER", "dbserverip")) == false ? ini.IniReadValue("RECORDER", "dbserverip") : "127.0.0.1";
        }
Ejemplo n.º 2
0
        private void ReadIni()
        {
            path = string.Format(@"{0}\{1}", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MiniCRM");
            Ini ini = new Ini(string.Format(@"{0}\{1}", path, "env.ini"));

            pbxip = ini.IniReadValue("PBX", "IP");
            pbxport = ini.IniReadValue("PBX", "PORT");
            startpopup = string.IsNullOrEmpty(ini.IniReadValue("ETC", "STARTPOPUP")) == false ? bool.Parse(ini.IniReadValue("ETC", "STARTPOPUP").ToString()) : false;

            chbPopup.IsChecked = startpopup;
            txtIpAddr.Text = pbxip;
            txtPort.Text = pbxport;
            txtIpAddr.Focus();
        }
Ejemplo n.º 3
0
        private void ReadIni(string path)
        {
            Ini ini = new Ini(string.Format(@"{0}\{1}", path, "env.ini"));

            pbxip = ini.IniReadValue("PBX", "IP");
            //pbxport = ini.IniReadValue("PBX", "PORT");

            txtIPAddress.Text = pbxip;
            //txtPort.Text = pbxport;
            txtIPAddress.Focus();
        }
Ejemplo n.º 4
0
        private void InitializeWindowsPosition()
        {
            Ini ini = new Ini(@".\pms.ini");
            this.Width = string.IsNullOrEmpty(ini.IniReadValue("POSITION", "WIDTH")) ? 800 : double.Parse(ini.IniReadValue("POSITION", "WIDTH"));
            this.Height = string.IsNullOrEmpty(ini.IniReadValue("POSITION", "HEIGHT")) ? 600 : double.Parse(ini.IniReadValue("POSITION", "HEIGHT"));
            this.Left = string.IsNullOrEmpty(ini.IniReadValue("POSITION", "LEFT")) ? 50 : double.Parse(ini.IniReadValue("POSITION", "LEFT"));
            this.Top = string.IsNullOrEmpty(ini.IniReadValue("POSITION", "TOP")) ? 50 : double.Parse(ini.IniReadValue("POSITION", "TOP"));

            util.PBXIP = string.IsNullOrEmpty(ini.IniReadValue("SERVER", "PBXIP")) ? "127.0.0.1" : ini.IniReadValue("SERVER", "PBXIP");
            util.DBIP = string.IsNullOrEmpty(ini.IniReadValue("SERVER", "DBIP")) ? "127.0.0.1" : ini.IniReadValue("SERVER", "DBIP");
        }
Ejemplo n.º 5
0
        private void InitializeProperties()
        {
            Ini ini = new Ini(@".\cdr.ini");
            string _start = ini.IniReadValue("ETC", "RUNSTART");
            _runstart = string.IsNullOrEmpty(_start) == true ? false : bool.Parse(_start);
            props_etc_01.IsChecked = _runstart;
            
            /*
            StringBuilder sb = new StringBuilder();
            sb.Append("insert into international_rate ( areacode, firms_idx, lrate, lsec, mrate, msec )");
            sb.Append(" values ");
            sb.Append("( {0}, 74, {1}, {2}, {3}, {4} )");
            string query = string.Empty;

            foreach (var item in _cdrprops.CDRInternational)
            {
                query = string.Format(sb.ToString(), item.Kind, item.LRate, item.LSec, item.MRate, item.MSec);
                using (FirebirdDBHelper db = new FirebirdDBHelper(query, util.strDBConn))
                {
                    int _count = db.GetEffectedCount();
                }
            }
            */

            /*
            StringBuilder sb = new StringBuilder();
            sb.Append("insert into international");
            sb.Append("( areacode, nation_num, nation_local_num, natione, nationk, lm )");
            sb.Append(" values ");
            sb.Append("( {0}, '{1}', '{2}', '{3}', '{4}', '{5}' )");
            string query = string.Empty;

            foreach (var item in _cdrprops.CDRInterRegion)
            {
                query = string.Format(sb.ToString(), item.Kind, item.NationCode, item.AreaCode, item.NameEn, item.NameKo, item.LM);
                using (FirebirdDBHelper db = new FirebirdDBHelper(query, util.strDBConn))
                {
                    int _count = db.GetEffectedCount();
                }
            }
            */

            /*
            StringBuilder sb = new StringBuilder();
            sb.Append("insert into DOMESTIC_RATE");
            sb.Append("( prefix, firms_idx, type, rate, sec )");
            sb.Append(" values ");
            sb.Append("( '{0}', 1, '{1}', {2}, {3} )");
            string query = string.Empty;

            foreach (var item in _cdrprops.CDRProperties)
            {
                string _type = string.Empty;
                if (item.Type == "이동")
                {
                    _type = "M";
                }
                else if (item.Type == "시내")
                {
                    _type = "I";
                }
                else if (item.Type == "시외")
                {
                    _type = "O";
                }

                query = string.Format(sb.ToString(), item.Prefix, _type, item.Rate, item.Sec);
                using (FirebirdDBHelper db = new FirebirdDBHelper(query, util.strDBConn))
                {
                    int _count = db.GetEffectedCount();
                }
            }
            */
        }
Ejemplo n.º 6
0
        private void ReadIni()
        {
            userdatapath = string.Format(@"{0}\{1}", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "CorePMS");

            Ini ini = new Ini(string.Format(@"{0}\{1}", userdatapath, "pms.ini"));

            this.Width = string.IsNullOrEmpty(ini.IniReadValue("POSITION", "WIDTH")) ? 800 : double.Parse(ini.IniReadValue("POSITION", "WIDTH"));
            this.Height = string.IsNullOrEmpty(ini.IniReadValue("POSITION", "HEIGHT")) ? 600 : double.Parse(ini.IniReadValue("POSITION", "HEIGHT"));
            this.Left = string.IsNullOrEmpty(ini.IniReadValue("POSITION", "LEFT")) ? 50 : double.Parse(ini.IniReadValue("POSITION", "LEFT"));
            this.Top = string.IsNullOrEmpty(ini.IniReadValue("POSITION", "TOP")) ? 50 : double.Parse(ini.IniReadValue("POSITION", "TOP"));

            util.PBXIP = string.IsNullOrEmpty(ini.IniReadValue("PBX", "IP")) ? "127.0.0.1" : ini.IniReadValue("PBX", "IP");
            util.DBIP = string.IsNullOrEmpty(ini.IniReadValue("DB", "IP")) ? "127.0.0.1" : ini.IniReadValue("DB", "IP");
            util.DBPATH = string.IsNullOrEmpty(ini.IniReadValue("DB", "FILEPATH")) ? @"D:\FBDB\KCTV_JEJU.FDB" : ini.IniReadValue("DB", "FILEPATH");

            sitecode = ini.IniReadValue("SITE", "code");

            fk_cleanroom = ini.IniReadValue("FUNCTIONKEYS", "fk_cleanroom");
            fk_dnd = ini.IniReadValue("FUNCTIONKEYS", "fk_dnd");
            fk_laundry = ini.IniReadValue("FUNCTIONKEYS", "fk_laundry");
            fk_roomservice = ini.IniReadValue("FUNCTIONKEYS", "fk_roomservice");
            fk_cleaningroom_complete = ini.IniReadValue("FUNCTIONKEYS", "fk_cleaningroom_complete");
            fk_cleaningroom_inspection = ini.IniReadValue("FUNCTIONKEYS", "fk_cleaningroom_inspection");
            fk_emergency = ini.IniReadValue("FUNCTIONKEYS", "fk_emergency");
        }
Ejemplo n.º 7
0
        private void ReadIni()
        {
            userdatapath = string.Format(@"{0}\{1}", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MiniCRM");

            Ini ini = new Ini(string.Format(@"{0}\{1}", userdatapath, "env.ini"));

            top = string.IsNullOrEmpty(ini.IniReadValue("MAIN", "TOP")) == false ? double.Parse(ini.IniReadValue("MAIN", "TOP")) : 0.0d;
            left = string.IsNullOrEmpty(ini.IniReadValue("MAIN", "LEFT")) == false ? double.Parse(ini.IniReadValue("MAIN", "LEFT")) : 0.0d;

            startpopup = string.IsNullOrEmpty(ini.IniReadValue("ETC", "STARTPOPUP")) == false ? bool.Parse(ini.IniReadValue("ETC", "STARTPOPUP").ToString()) : false;
        }
Ejemplo n.º 8
0
        private void ReadIni()
        {
            userdatapath = string.Format(@"{0}\{1}", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "CorePMS");

            Ini ini = new Ini(string.Format(@"{0}\{1}", userdatapath, "pms.ini"));

            sitecode = ini.IniReadValue("SITE", "code");

            fk_cleanroom = ini.IniReadValue("FUNCTIONKEYS", "fk_cleanroom");
            fk_dnd = ini.IniReadValue("FUNCTIONKEYS", "fk_dnd");
            fk_laundry = ini.IniReadValue("FUNCTIONKEYS", "fk_laundry");
            fk_roomservice = ini.IniReadValue("FUNCTIONKEYS", "fk_roomservice");
            fk_cleaningroom_complete = ini.IniReadValue("FUNCTIONKEYS", "fk_cleaningroom_complete");
            fk_cleaningroom_inspection = ini.IniReadValue("FUNCTIONKEYS", "fk_cleaningroom_inspection");
            fk_emergency = ini.IniReadValue("FUNCTIONKEYS", "fk_emergency");
        }
Ejemplo n.º 9
0
        private void ReadIni()
        {
            userdatapath = string.Format(@"{0}\{1}", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MiniCRM");

            Ini ini = new Ini(string.Format(@"{0}\{1}", userdatapath, "env.ini"));

            top = string.IsNullOrEmpty(ini.IniReadValue("PHONEBOOK", "TOP")) == false ? double.Parse(ini.IniReadValue("PHONEBOOK", "TOP")) : 0.0d;
            left = string.IsNullOrEmpty(ini.IniReadValue("PHONEBOOK", "LEFT")) == false ? double.Parse(ini.IniReadValue("PHONEBOOK", "LEFT")) : 0.0d;
            width = string.IsNullOrEmpty(ini.IniReadValue("PHONEBOOK", "WIDTH")) == false ? double.Parse(ini.IniReadValue("PHONEBOOK", "WIDTH")) : 0.0d;
            height = string.IsNullOrEmpty(ini.IniReadValue("PHONEBOOK", "HEIGHT")) == false ? double.Parse(ini.IniReadValue("PHONEBOOK", "HEIGHT")) : 0.0d;
        }
Ejemplo n.º 10
0
        private void ReadIni()
        {
            userdatapath = string.Format(@"{0}\{1}", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MiniCRM");

            Ini ini = new Ini(string.Format(@"{0}\{1}", userdatapath, "env.ini"));

            CoupleModeInfo.pbxipaddress = ini.IniReadValue("PBX", "IP");
            CoupleModeInfo.pbxport = string.IsNullOrEmpty(ini.IniReadValue("PBX", "PORT")) == false ? int.Parse(ini.IniReadValue("PBX", "PORT")) : 31001;
            saveid = string.IsNullOrEmpty(ini.IniReadValue("LOGON", "SAVEID")) == false ? bool.Parse(ini.IniReadValue("LOGON", "SAVEID")) : false;
            autologon = string.IsNullOrEmpty(ini.IniReadValue("LOGON", "AUTOLOGON")) == false ? bool.Parse(ini.IniReadValue("LOGON", "AUTOLOGON")) : false;
            top = string.IsNullOrEmpty(ini.IniReadValue("LOGON", "TOP")) == false ? double.Parse(ini.IniReadValue("LOGON", "TOP")) : 0.0d;
            left = string.IsNullOrEmpty(ini.IniReadValue("LOGON", "LEFT")) == false ? double.Parse(ini.IniReadValue("LOGON", "LEFT")) : 0.0d;

            CoupleModeInfo.userid = ini.IniReadValue("LOGON", "ID");
        }
Ejemplo n.º 11
0
        private void ReadIni()
        {
            Ini inifile = new Ini(inifilepath);
            string _top = inifile.IniReadValue("POSITION", "TOP");
            string _left = inifile.IniReadValue("POSITION", "LEFT");
            string _width = inifile.IniReadValue("SIZE", "WIDTH");
            string _height = inifile.IniReadValue("SIZE", "HEIGHT");
            string _state = inifile.IniReadValue("ETC", "STATE");

            this.Top = string.IsNullOrEmpty(_top) ? 50.0d : double.Parse(_top);
            this.Left = string.IsNullOrEmpty(_left) ? 50.0d : double.Parse(_left);
            this.Width = string.IsNullOrEmpty(_width) ? 800.0d : double.Parse(_width);
            this.Height = string.IsNullOrEmpty(_height) ? 600.0d : double.Parse(_height);
            this.WindowState = string.IsNullOrEmpty(_state) ? System.Windows.WindowState.Normal : (System.Windows.WindowState)Enum.Parse(typeof(System.Windows.WindowState), _state);
        }