commit ae9fbc6d97294e1638e9ca08ad9ccb479b36b814 Author: Dunestorm Date: Sun Mar 27 11:04:13 2022 +0100 HeadMeld 0.0.0.1 - Initial submit, functionality is incomplete diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..882890a --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +obj +bin +.vs diff --git a/App.xaml b/App.xaml new file mode 100644 index 0000000..ec0918d --- /dev/null +++ b/App.xaml @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/App.xaml.cs b/App.xaml.cs new file mode 100644 index 0000000..7f21d60 --- /dev/null +++ b/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace HeadMeld +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/AssemblyInfo.cs b/AssemblyInfo.cs new file mode 100644 index 0000000..8b5504e --- /dev/null +++ b/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/ConfigManager.cs b/ConfigManager.cs new file mode 100644 index 0000000..f331703 --- /dev/null +++ b/ConfigManager.cs @@ -0,0 +1,47 @@ +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace HeadMeld +{ + internal class ConfigManager + { + private readonly string configPath = @"C:\Program Files\EqualizerAPO\config\config.txt"; + internal List configFile = new(); + public ConfigManager() + { + configFile = File.ReadAllLines(configPath).ToList(); + /* + ToggleProfiles(new List + { + "# Include: ATH-M50x.txt", + "Include: 900ProX.txt" + }, false); + Write(); + */ + } + + public void Write() + { + File.WriteAllLines(configPath, configFile); + } + + public void ToggleProfiles(List profiles, bool enableProfile) + { + foreach (var profile in profiles) + { + string rawProfile = profile.Replace("# ", string.Empty); + var filter = configFile.FindIndex(x => x.Contains(rawProfile)); + + if (enableProfile) + { + configFile[filter] = rawProfile.Replace("# ", string.Empty); + } + else + { + configFile[filter] = rawProfile.Insert(0, "# "); + } + } + } + } +} diff --git a/HeadMeld.csproj b/HeadMeld.csproj new file mode 100644 index 0000000..9c8d19d --- /dev/null +++ b/HeadMeld.csproj @@ -0,0 +1,47 @@ + + + + WinExe + net5.0-windows10.0.18362.0 + enable + true + 0.0.0.1 + 0.0.0.1 + + + + + + + + + + True + True + Resources.resx + + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + + + Always + + + Always + + + Always + + + Always + + + + diff --git a/HeadMeld.csproj.user b/HeadMeld.csproj.user new file mode 100644 index 0000000..b34fcfe --- /dev/null +++ b/HeadMeld.csproj.user @@ -0,0 +1,22 @@ + + + + + + Designer + + + + + Code + + + + + Designer + + + Designer + + + \ No newline at end of file diff --git a/HeadMeld.sln b/HeadMeld.sln new file mode 100644 index 0000000..8d9be81 --- /dev/null +++ b/HeadMeld.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32319.34 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeadMeld", "HeadMeld.csproj", "{59252E1F-C598-4A62-8E03-26ED4D1468EF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {59252E1F-C598-4A62-8E03-26ED4D1468EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59252E1F-C598-4A62-8E03-26ED4D1468EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59252E1F-C598-4A62-8E03-26ED4D1468EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59252E1F-C598-4A62-8E03-26ED4D1468EF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9D75AEA6-B515-4F8F-B62E-5814099D0232} + EndGlobalSection +EndGlobal diff --git a/MainWindow.xaml b/MainWindow.xaml new file mode 100644 index 0000000..13a0fa6 --- /dev/null +++ b/MainWindow.xaml @@ -0,0 +1,22 @@ + + + + + + + + + + +