Example #1
0
        private void radioButton2_MouseClick(object sender, MouseEventArgs e)
        {
            clsXMLData  settings1 = new clsXMLData();
            xmlSettings settings  = new xmlSettings();
            pathset     set3      = new pathset();

            flag = 0;

            if (var == "ePlus Basic Edition")
            {
                set3.xmlPath = @"C:\Users\Amritha\AppData\Roaming\ePlus Basic Edition";
                set3         = settings1.readPath(set3.xmlPath);
            }
            if (var == "ePlus Proffessional Edition")
            {
                set3.xmlPath = @"C:\Users\Amritha\AppData\Roaming\ePlus Professional Edition";
                set3         = settings1.readPath(set3.xmlPath);
            }
            if (var == "ePlus Standard Edition")
            {
                set3.xmlPath = @"C:\Users\Amritha\AppData\Roaming\ePlus Standard Edition";
                set3         = settings1.readPath(set3.xmlPath);
            }
            settings      = settings1.ReadSettings();
            textBox1.Text = settings.userName;
            textBox2.Text = settings.serverName;
            textBox3.Text = settings.dbName;
            textBox4.Text = settings.dbPort;
        }
        private void radioButton1_MouseClick(object sender, MouseEventArgs e)
        {
            string      SFolder   = @"C:\ProgramData";
            clsXMLData  settings1 = new clsXMLData();
            xmlSettings settings  = new xmlSettings();
            pathset     set3      = new pathset();

            flag          = 1;
            set3.xmlPath  = SFolder + "\\" + comboBox1.Text;
            set3          = settings1.readPath(set3.xmlPath);
            settings      = settings1.ReadSettings();
            textBox1.Text = settings.userName;
            textBox2.Text = settings.serverName;
            textBox3.Text = settings.dbName;
            textBox4.Text = settings.dbPort;
        }
        private void radioButton2_MouseClick(object sender, MouseEventArgs e)
        {
            string      SpecialFolder = @"C:\Users\";
            string      SpecialData   = @"AppData\Roaming";
            clsXMLData  settings1     = new clsXMLData();
            xmlSettings settings      = new xmlSettings();
            pathset     set3          = new pathset();

            flag          = 0;
            set3.xmlPath  = SpecialFolder + (Environment.UserName) + "\\" + SpecialData + "\\" + comboBox1.Text;
            set3          = settings1.readPath(set3.xmlPath);
            settings      = settings1.ReadSettings();
            textBox1.Text = settings.userName;
            textBox2.Text = settings.serverName;
            textBox3.Text = settings.dbName;
            textBox4.Text = settings.dbPort;
        }
Example #4
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");
        }