Ejemplo n.º 1
0
        private void Update_Button_Click(object sender, EventArgs e)
        {
            clsXMLData  xdata     = new clsXMLData();
            xmlSettings xsettings = new xmlSettings();

            xsettings.userName   = textBox1.Text;
            xsettings.serverName = textBox2.Text;
            xsettings.dbName     = textBox3.Text;
            xsettings.dbPort     = textBox4.Text;
            if (flag == 1)
            {
                if (var == "ePlus Basic Edition")
                {
                    xsettings.xmllPath = @"C:\ProgramData\ePlus Basic Edition";
                }
                else if (var == "ePlus Proffessional Edition")
                {
                    xsettings.xmllPath = @"C:\ProgramData\ePlus Professional Edition";
                }
                else
                {
                    xsettings.xmllPath = @"C:\ProgramData\ePlus Standard Edition";
                }
            }
            if (flag == 0)
            {
                if (var == "ePlus Basic Edition")
                {
                    xsettings.xmllPath = @"C:\Users\Amritha\AppData\Roaming\ePlus Basic Edition";
                }
                else if (var == "ePlus Proffessional Edition")
                {
                    xsettings.xmllPath = @"C:\Users\Amritha\AppData\Roaming\ePlus Professional Edition";
                }
                else
                {
                    xsettings.xmllPath = @"C:\Users\Amritha\AppData\Roaming\ePlus Standard Edition";
                }
            }
            xsettings = xdata.writesettings(xsettings.userName, xsettings.serverName, xsettings.dbName, xsettings.dbPort, xsettings.xmllPath);
        }
        private void Update_Button_Click(object sender, EventArgs e)
        {
            string      SpecialFolder = @"C:\Users\";
            string      SpecialData   = @"AppData\Roaming";
            string      SFolder       = @"C:\ProgramData";
            clsXMLData  xdata         = new clsXMLData();
            xmlSettings xsettings     = new xmlSettings();

            xsettings.userName   = textBox1.Text;
            xsettings.serverName = textBox2.Text;
            xsettings.dbName     = textBox3.Text;
            xsettings.dbPort     = textBox4.Text;
            if (flag == 1)
            {
                xsettings.xmllPath = SFolder + "\\" + comboBox1.Text;
            }
            if (flag == 0)
            {
                xsettings.xmllPath = SpecialFolder + (Environment.UserName) + "\\" + SpecialData + "\\" + comboBox1.Text;
            }
            xsettings = xdata.writesettings(xsettings.userName, xsettings.serverName, xsettings.dbName, xsettings.dbPort, xsettings.xmllPath);
            MessageBox.Show("Successfully updated");
        }