예제 #1
0
 	private void loadConfig()
 	{
         Ini ini = new Ini(fileConfig);
         
         chbHide.Checked = Convert.ToBoolean(ini.IniReadValue("Global","HideWindows"));
         radApache.Checked = Convert.ToBoolean(ini.IniReadValue("Global","Apache"));
         radNginx.Checked = Convert.ToBoolean(ini.IniReadValue("Global","Nginx"));
         radMariaDB.Checked = Convert.ToBoolean(ini.IniReadValue("Global","MariaDB"));
         radMySQL.Checked = Convert.ToBoolean(ini.IniReadValue("Global","MySQL"));
         
         numNginxPort.Value = Convert.ToDecimal(ini.IniReadValue("Nginx","Port"));
         numMySQLPort.Value = Convert.ToDecimal(ini.IniReadValue("MySQL","Port"));
         numMemcachedPort.Value = Convert.ToDecimal(ini.IniReadValue("Memcached","Port"));
         
         numFCGIPort.Value = Convert.ToDecimal(ini.IniReadValue("PHP","Port"));
         numFCGIThreads.Value = Convert.ToDecimal(ini.IniReadValue("PHP","Threads"));
         numFCGIRequests.Value = Convert.ToDecimal(ini.IniReadValue("PHP","Requests"));
         
         txtDomainName.Text = Convert.ToString(ini.IniReadValue("Apache","DomainName"));
         txtServerName.Text = Convert.ToString(ini.IniReadValue("Apache","ServerName"));
         txtServerAdmin.Text = Convert.ToString(ini.IniReadValue("Apache","ServerAdmin"));
         numApachePort.Value = Convert.ToDecimal(ini.IniReadValue("Apache","Port"));
         numApachePortSSL.Value = Convert.ToDecimal(ini.IniReadValue("Apache","PortSSL"));
         txtSourceRoot.Text = Convert.ToString(ini.IniReadValue("Apache","SourceRoot"));
 	}
예제 #2
0
 	private void saveConfig()
 	{
         Ini ini = new Ini(fileConfig);
         
         ini.IniWriteValue("Global","HideWindows",chbHide.Checked.ToString());
         ini.IniWriteValue("Global","Apache",radApache.Checked.ToString());
         ini.IniWriteValue("Global","Nginx",radNginx.Checked.ToString());
         ini.IniWriteValue("Global","MariaDB",radMariaDB.Checked.ToString());
         ini.IniWriteValue("Global","MySQL",radMySQL.Checked.ToString());
         
         ini.IniWriteValue("Nginx","Port",numNginxPort.Value.ToString());
         ini.IniWriteValue("MySQL","Port",numMySQLPort.Value.ToString());
         ini.IniWriteValue("Memcached","Port",numMemcachedPort.Value.ToString());
         
         ini.IniWriteValue("PHP","Port",numFCGIPort.Value.ToString());
         ini.IniWriteValue("PHP","Threads",numFCGIThreads.Value.ToString());
         ini.IniWriteValue("PHP","Requests",numFCGIRequests.Value.ToString());
         
         ini.IniWriteValue("Apache","DomainName",txtDomainName.Text);
         ini.IniWriteValue("Apache","ServerName",txtServerName.Text);
         ini.IniWriteValue("Apache","ServerAdmin",txtServerAdmin.Text);
         ini.IniWriteValue("Apache","Port",numApachePort.Value.ToString());
         ini.IniWriteValue("Apache","PortSSL",numApachePortSSL.Value.ToString());
         ini.IniWriteValue("Apache","SourceRoot",txtSourceRoot.Text);
 	}