Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fixed backend and UI load functions to correctly recognize and apply display config files" #60

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions DAIRemote/DAIRemoteApplicationUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}
31 changes: 0 additions & 31 deletions DisplayProfileManager/DisplayConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down Expand Up @@ -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)
{

Expand Down
Loading