using System; using System.Drawing; public static class DisplayFusionFunction { public static void Run(IntPtr windowHandle) { if (BFS.ScriptSettings.ReadValue("ProfileToggle") == "on" || BFS.ScriptSettings.ReadValue("ProfileToggle") == "") { BFS.ScriptSettings.WriteValue("ProfileToggle", "off"); } else if (BFS.ScriptSettings.ReadValue("ProfileToggle") == "off" ) { BFS.DisplayFusion.RunFunction("Update Monitor Profile Automatically"); <-should stay on but doesn't BFS.ScriptSettings.WriteValue("ProfileToggle", "on"); } else { BFS.Dialog.ShowMessageErrorMonospaced("Value of ProfileToggle Script Setting is incorrect."); } BFS.Dialog.ShowMessageInfo(BFS.ScriptSettings.ReadValue("ProfileToggle")); } }