public static void writeDefaultConfiguration() { ConfigureHandler.WriteIniData("Default", "IP", "127.0.0.1"); ConfigureHandler.WriteIniData("Default", "Port", Convert.ToString(82)); ConfigureHandler.WriteIniData("Default", "MaxClientCount", Convert.ToString(10)); ConfigureHandler.WriteIniData("Default", "DataBase", "SKY-LAPTOP\\SQLEXPRESS"); ConfigureHandler.WriteIniData("Default", "Home", @"D:\RemoteDiskServer\"); }
private void btnOK_Click(object sender, EventArgs e) { IP = txtBoxIP.Text.Trim(); Port = txtBoxPort.Text.Trim(); HomePath = txtBoxHome.Text.Trim(); ConfigureHandler.WriteIniData("Configuration", "IP", IP); ConfigureHandler.WriteIniData("Configuration", "Port", Port); ConfigureHandler.WriteIniData("Configuration", "Home", HomePath); CommonStaticVariables.loadConfiguration(); this.Close(); }
private void btnOK_Click(object sender, EventArgs e) { IP = txtBoxIP.Text.Trim(); Port = txtBoxPort.Text.Trim(); MaxClientCount = txtBoxMaxClientCount.Text.Trim(); DataBase = txtBoxDataBase.Text.Trim(); HomePath = txtBoxHome.Text.Trim(); ConfigureHandler.WriteIniData("Configuration", "IP", IP); ConfigureHandler.WriteIniData("Configuration", "Port", Port); ConfigureHandler.WriteIniData("Configuration", "MaxClientCount", MaxClientCount); ConfigureHandler.WriteIniData("Configuration", "DataBase", DataBase); ConfigureHandler.WriteIniData("Configuration", "Home", HomePath); CommonStaticVariables.loadConfiguration(); MessageBox.Show("配置成功!\n下次启动机器时生效!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); }
public static void writeDefaultConfiguration() { ConfigureHandler.WriteIniData("Default", "IP", "127.0.0.1"); ConfigureHandler.WriteIniData("Default", "Port", Convert.ToString(82)); ConfigureHandler.WriteIniData("Default", "Home", @"D:\RemoteDiskClient\"); }