Пример #1
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");
        }
Пример #2
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";
        }
Пример #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();
        }
Пример #4
0
        private void SavePosition()
        {
            Ini ini = new Ini(@".\pms.ini");
            ini.IniWriteValue("POSITION", "WIDTH", this.Width.ToString());
            ini.IniWriteValue("POSITION", "HEIGHT", this.Height.ToString());
            ini.IniWriteValue("POSITION", "LEFT", this.Left.ToString());
            ini.IniWriteValue("POSITION", "TOP", this.Top.ToString());

            ini.IniWriteValue("SERVER", "PBXIP", util.PBXIP);
            ini.IniWriteValue("SERVER", "DBIP", util.DBIP);
        }
Пример #5
0
        private void SaveIni(string path)
        {
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }

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

            ini.IniWriteValue("PBX", "IP", txtIpAddr.Text.Trim());
            ini.IniWriteValue("PBX", "PORT", txtPort.Text.Trim());
            ini.IniWriteValue("ETC", "STARTPOPUP", chbPopup.IsChecked.ToString());
        }
Пример #6
0
        private void SaveIni(string path)
        {
            if (!Directory.Exists(path))
                Directory.CreateDirectory(path);

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

            ini.IniWriteValue("PBX", "IP", txtIPAddress.Text.Trim());
            ini.IniWriteValue("PBX", "PORT", txtPort.Text.Trim());

            CoupleModeInfo.pbxipaddress = txtIPAddress.Text.Trim();
            CoupleModeInfo.pbxport = string.IsNullOrEmpty(txtPort.Text.Trim()) == false ? int.Parse(txtPort.Text.Trim()) : 31001;
        }
Пример #7
0
        private void SaveIni()
        {
            Ini ini = new Ini(string.Format(@"{0}\{1}", userdatapath, "pms.ini"));

            ini.IniWriteValue("POSITION", "WIDTH", this.Width.ToString());
            ini.IniWriteValue("POSITION", "HEIGHT", this.Height.ToString());
            ini.IniWriteValue("POSITION", "LEFT", this.Left.ToString());
            ini.IniWriteValue("POSITION", "TOP", this.Top.ToString());

            ini.IniWriteValue("PBX", "IP", util.PBXIP);
            ini.IniWriteValue("DB", "IP", util.DBIP);
            ini.IniWriteValue("DB", "FILEPATH", util.DBPATH);
        }
Пример #8
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();
        }
Пример #9
0
        private void flyoutOptions_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            var obj = (Flyout)sender;

            if (obj.IsOpen)
            {
                if (tabFloor.IsEnabled)
                    tabFloor.IsEnabled = false;

                //list_floors = new FloorRs();
                //list_floors.CollectionChanged += list_floors_CollectionChanged;
                //options_floors.ItemsSource = list_floors;

                pbxip.Text = util.PBXIP;
                dbip.Text = util.DBIP;
            }
            else
            {
                int count = 0;
                foreach (Flyout item in this.Flyouts.Items)
                {
                    if (item.IsVisible)
                        count++;
                }

                if (count < 1)
                    tabFloor.IsEnabled = true;

                //options_floors.ItemsSource = null;
                //options_rooms.ItemsSource = null;
                //options_tels.ItemsSource = null;

                util.PBXIP = pbxip.Text.Trim();
                util.DBIP = dbip.Text.Trim();

                Ini ini = new Ini(@".\pms.ini");
                ini.IniWriteValue("SERVER", "PBXIP", util.PBXIP);
                ini.IniWriteValue("SERVER", "DBIP", util.DBIP);
            }
        }
Пример #10
0
 public void SaveProps()
 {
     Ini ini = new Ini(@".\cdr.ini");
     ini.IniWriteValue("ETC", "RUNSTART", _runstart.ToString());
 }
Пример #11
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();
                }
            }
            */
        }
Пример #12
0
        private void SaveIni(string path)
        {
            Ini ini = new Ini(string.Format(@"{0}\{1}", path, "env.ini"));

            if (chksaveid.IsChecked == true ? true : false) ini.IniWriteValue("LOGON", "ID", txtid.Text);
            ini.IniWriteValue("LOGON", "SAVEID", chksaveid.IsChecked.ToString());
            ini.IniWriteValue("LOGON", "AUTOLOGON", chkautologon.IsChecked.ToString());
            ini.IniWriteValue("LOGON", "TOP", this.Top.ToString());
            ini.IniWriteValue("LOGON", "LEFT", this.Left.ToString());
        }
Пример #13
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");
        }
Пример #14
0
        private void SaveIni()
        {
            Ini ini = new Ini(string.Format(@"{0}\{1}", userdatapath, "env.ini"));

            ini.IniWriteValue("MAIN", "TOP", this.Top.ToString());
            ini.IniWriteValue("MAIN", "LEFT", this.Left.ToString());
        }
Пример #15
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;
        }
Пример #16
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);
        }
Пример #17
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");
        }
Пример #18
0
        public void SaveIni()
        {
            Ini ini = new Ini(string.Format(@"{0}\{1}", userdatapath, "env.ini"));

            ini.IniWriteValue("PHONEBOOK", "TOP", this.Top.ToString());
            ini.IniWriteValue("PHONEBOOK", "LEFT", this.Left.ToString());
            ini.IniWriteValue("PHONEBOOK", "WIDTH", this.Width.ToString());
            ini.IniWriteValue("PHONEBOOK", "HEIGHT", this.Height.ToString());
        }
Пример #19
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;
        }
Пример #20
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");
        }
Пример #21
0
 private void WriteIni()
 {
     Ini inifile = new Ini(inifilepath);
     inifile.IniWriteValue("POSITION", "TOP", this.Top.ToString());
     inifile.IniWriteValue("POSITION", "LEFT", this.Left.ToString());
     inifile.IniWriteValue("SIZE", "WIDTH", this.Width.ToString());
     inifile.IniWriteValue("SIZE", "HEIGHT", this.Height.ToString());
     inifile.IniWriteValue("ETC", "STATE", this.WindowState.ToString());
 }