Пример #1
0
        private string ReadLinks(string strLinks)
        {
            string   strLink  = null;
            string   filePath = Path.GetFullPath(@"Links.ini");
            INIClass iniClass = new INIClass(filePath);

            if (strLinks == "link1")
            {
                strLink = iniClass.IniReadValue("Links", "link1");
            }
            if (strLinks == "link2")
            {
                strLink = iniClass.IniReadValue("Links", "link2");
            }
            if (strLinks == "link3")
            {
                strLink = iniClass.IniReadValue("Links", "link3");
            }
            if (strLinks == "link4")
            {
                strLink = iniClass.IniReadValue("Links", "link4");
            }
            if (strLinks == "link5")
            {
                strLink = iniClass.IniReadValue("Links", "link5");
            }
            if (strLinks == "link6")
            {
                strLink = iniClass.IniReadValue("Links", "link6");
            }
            return(strLink);
        }
Пример #2
0
        private void LoadLinks()
        {
            string   filePath = Path.GetFullPath(@"Links.ini");
            INIClass iniClass = new INIClass(filePath);

            textBox_Link19.Text = iniClass.IniReadValue("Links", "link1");
            textBox_Link20.Text = iniClass.IniReadValue("Links", "link2");
            textBox_Link21.Text = iniClass.IniReadValue("Links", "link3");
            textBox_Link22.Text = iniClass.IniReadValue("Links", "link4");
            textBox_Link23.Text = iniClass.IniReadValue("Links", "link5");
            textBox_Link24.Text = iniClass.IniReadValue("Links", "link6");
        }