From 38a216712618583ac95ba41f75840b1ff06cbb15 Mon Sep 17 00:00:00 2001 From: Fahim-zzz Date: Wed, 16 Oct 2024 21:02:46 -0400 Subject: [PATCH] =?UTF-8?q?Revert=20"Fixed=20backend=20and=20UI=20load=20f?= =?UTF-8?q?unctions=20to=20correctly=20recognize=20and=20apply=20=E2=80=A6?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9d8f70d7f147ff9445522be210ae0f4594eb90ee. --- DAIRemote/DAIRemoteApplicationUI.cs | 12 +--------- DisplayProfileManager/DisplayConfig.cs | 31 -------------------------- 2 files changed, 1 insertion(+), 42 deletions(-) diff --git a/DAIRemote/DAIRemoteApplicationUI.cs b/DAIRemote/DAIRemoteApplicationUI.cs index 2b9713d..1d960b0 100644 --- a/DAIRemote/DAIRemoteApplicationUI.cs +++ b/DAIRemote/DAIRemoteApplicationUI.cs @@ -97,17 +97,7 @@ private void BtnSaveDisplayConfig_Click(object sender, EventArgs e) private void BtnLoadDisplayConfig_Click(object sender, EventArgs e) { - string fileName = profileNameTextBox.Text; - if (fileName != "") - { - DisplayConfig.SetDisplaySettings(fileName + ".json"); - } - else - { - MessageBox.Show("Invalid input, name cannot be empty"); - } - - profileNameTextBox.Clear(); + DisplayConfig.SetDisplaySettings("displayConfig" + ".json"); } } } diff --git a/DisplayProfileManager/DisplayConfig.cs b/DisplayProfileManager/DisplayConfig.cs index aa04d68..8a105f5 100644 --- a/DisplayProfileManager/DisplayConfig.cs +++ b/DisplayProfileManager/DisplayConfig.cs @@ -1020,15 +1020,6 @@ public static bool LoadDisplaySettings(string fileName, out DISPLAYCONFIG_PATH_I public static bool SetDisplaySettings(string fileName) { - string appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); - string folderPath = Path.Combine(appDataPath, "DAIRemote"); - - if (!Directory.Exists(folderPath)) - { - Directory.CreateDirectory(folderPath); - } - fileName = Path.Combine(folderPath, fileName); - debugMsg("Loading display settings from file: " + fileName); if (!File.Exists(fileName)) { @@ -1304,28 +1295,6 @@ public static bool SaveDisplaySettings(string fileName) return false; } - - /*public static bool DeleteDisplaySettings(string fileName) - { - string appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); - string folderPath = Path.Combine(appDataPath, "DAIRemote"); - - if (!Directory.Exists(folderPath)) - { - Directory.CreateDirectory(folderPath); - } - fileName = Path.Combine(folderPath, fileName); - - debugMsg("Deleting display settings on file: " + fileName); - if (!File.Exists(fileName)) - { - Debug.WriteLine("ERROR: Display settings file does not exist: " + fileName); - return false; - } - - File.Delete(fileName); - return false; - }*/ static void Main(string[] args) {