Here are the objects:
public partial class projectorForm : Form
{
private static string comPort = "COM1";
private SerialPort sp = new SerialPort(comPort, 115200);
public static Settings defaultSettings = new Settings();
public static Settings proposedSettings = new Settings();
public static Settings currentSettings = new Settings();
...
}
Each Settings object keeps track of various settings, such as brightness. If I change the value of brightness in the "proposedSettings" object, for some reason the "currentSettings" brightness value changes as well. This doesn't happen to the "defaultSettings" object.
private void brightnessSlider_Scroll(object sender, EventArgs e)
{
brightnessAmount.Text = "" + brightnessSlider.Value;
proposedSettings.brightness.value = brightnessSlider.Value;
//As soon as the previous line executes, both proposedSettings.brightness.value and currentSettings.brightness.value get changed.
}
What is going on???

New Topic/Question
Reply




MultiQuote






|