private void button7_Click(object sender, EventArgs e) { VideoSettings sett = new VideoSettings(); sett.Show(); }
private void button2_Click_1(object sender, EventArgs e) { if (Antifx.Checked == true) { Properties.Settings.Default.Anti = "True"; } else { Properties.Settings.Default.Anti = "False"; } if (Bloomfx.Checked == true) { Properties.Settings.Default.Blur = "True"; } else { Properties.Settings.Default.Blur = "False"; } if (Ambient.Checked == true) { Properties.Settings.Default.Ambient = "True"; } else { Properties.Settings.Default.Ambient = "False"; } if (checkBox1.Checked == true) { Properties.Settings.Default.Bloom = "True"; } else { Properties.Settings.Default.Bloom = "False"; } if (checkBox2.Checked == true) { Properties.Settings.Default.Dof = "True"; } else { Properties.Settings.Default.Dof = "False"; } Properties.Settings.Default.Gras = trackValue; Properties.Settings.Default.Terrain = trackValue2; Properties.Settings.Default.Mesh = trackValue3; Properties.Settings.Default.Shader = trackValue4; Properties.Settings.Default.Distance = trackValue5; var thisLine = File.ReadAllLines(@"Rust\cfg\client.cfg"); thisLine[8] = "effect.aa " + "\"" + Properties.Settings.Default.Anti + "\""; thisLine[12] = "effect.motionblur " + "\"" + Properties.Settings.Default.Blur + "\""; thisLine[9] = "effect.ao " + "\"" + Properties.Settings.Default.Ambient + "\""; thisLine[10] = "effect.bloom " + "\"" + Properties.Settings.Default.Bloom + "\""; thisLine[31] = "graphics.dof " + "\"" + Properties.Settings.Default.Dof + "\""; thisLine[38] = "grass.quality " + "\"" + trackValue + "\""; thisLine[45] = "terrain.quality " + "\"" + trackValue2 + "\""; thisLine[43] = "mesh.quality " + "\"" + trackValue3 + "\""; thisLine[33] = "graphics.shaderlod " + "\"" + trackValue4 + "\""; thisLine[27] = "graphics.drawdistance " + "\"" + trackValue5 + "\""; File.WriteAllLines(@"Rust\cfg\client.cfg", thisLine); Properties.Settings.Default.Save(); VideoSettings set = this; set.Close(); button1.Enabled = true; }