Skip to content

Commit

Permalink
Merge pull request #125 from Settlers4Modding/feature/s4-configuration
Browse files Browse the repository at this point in the history
Added S4 Config open button
  • Loading branch information
Pumpline authored Feb 10, 2021
2 parents b4225e4 + 846e12e commit 9f10844
Show file tree
Hide file tree
Showing 9 changed files with 161 additions and 90 deletions.
1 change: 1 addition & 0 deletions docs/en-EN/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
* Fixed problem with maximized form
* Report bug button working now
* Added button for S4Editor
* Added button for Settlers HE Configuration
* Added button for texture change
* Maximize/Minimize on menu bar double click

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System.Collections.Generic;
using System.IO;
using CommunityPatchLauncherFramework.Settings.Manager;

namespace CommunityPatchLauncher.Commands.Os
{
/// <summary>
/// starts the settlers 4 he configuration file
/// </summary>
class StartSettlersConfigCommand : StartProgramCommand
{
/// <summary>
/// The settings manager to use
/// </summary>
private SettingManager settingManager;

/// <summary>
/// Starts the settlers 4 he configuration file
/// </summary>
/// <param name="settingManager"></param>
public StartSettlersConfigCommand(SettingManager settingManager)
{
string gameFolder = settingManager.GetValue<string>("GameFolder");
string configPath = gameFolder + Properties.Settings.Default.ConfigBaseFolder + "Settlers4Config.exe";

this.settingManager = settingManager;
programPath = configPath;
}
}
}
1 change: 1 addition & 0 deletions src/CommunityPatchLauncher/CommunityPatchLauncher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
<Compile Include="Commands\Os\StartEditorCommand.cs" />
<Compile Include="Commands\Os\StartProgramCommand.cs" />
<Compile Include="Commands\Os\MoveFolderCommand.cs" />
<Compile Include="Commands\Os\StartSettlersConfigCommand.cs" />
<Compile Include="Commands\TaskCommands\DownloadAllPatchesCommand.cs" />
<Compile Include="Commands\ApplicationWindow\OpenLinkCommand.cs" />
<Compile Include="Commands\ApplicationWindow\OpenNewWindowCommand.cs" />
Expand Down
Loading

0 comments on commit 9f10844

Please sign in to comment.