Skip to content
This repository has been archived by the owner on May 15, 2022. It is now read-only.

Commit

Permalink
Add button to open config path
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantomGamers committed Jun 12, 2020
1 parent 58debc0 commit 42578fa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Forms/SettingsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button x:Name="SaveSettings" Content="Save Settings" Height="auto" HorizontalContentAlignment="Center"
Foreground="White" Background="#FF3D3D3E" Click="SaveSettings_Click" Margin="0,10,10,0"
Expand All @@ -284,7 +285,11 @@
TextOptions.TextHintingMode="Fixed" />
<Button x:Name="ResetToDefaults" Content="Reset To Defaults" Grid.Column="2" Height="auto"
HorizontalContentAlignment="Center" Foreground="White" Background="#FF3D3D3E"
Click="ResetToDefaults_Click" Margin="0,10,0,0" FontSize="14" BorderBrush="{x:Null}"
Click="ResetToDefaults_Click" Margin="0,10,10,0" FontSize="14" BorderBrush="{x:Null}"
Padding="10" TextOptions.TextHintingMode="Fixed" />
<Button x:Name="OpenConfigPath" Content="Open Config Path" Grid.Column="3" Height="auto"
HorizontalContentAlignment="Center" Foreground="White" Background="#FF3D3D3E"
Click="OpenConfigPath_Click" Margin="0,10,10,0" FontSize="14" BorderBrush="{x:Null}"
Padding="10" TextOptions.TextHintingMode="Fixed" />
</Grid>
</Grid>
Expand Down
7 changes: 7 additions & 0 deletions Forms/SettingsWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
using System.Windows;
using System.Windows.Controls;
using SteamFriendsPatcher.Properties;
using System.Diagnostics;
using System.Configuration;

namespace SteamFriendsPatcher.Forms
{
Expand Down Expand Up @@ -89,5 +91,10 @@ private void CancelChanges_Click(object sender, RoutedEventArgs e)
{
Close();
}

private void OpenConfigPath_Click(object sender, RoutedEventArgs e)
{
Process.Start(Path.GetDirectoryName(ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath));
}
}
}
1 change: 1 addition & 0 deletions SteamFriendsPatcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
Expand Down

0 comments on commit 42578fa

Please sign in to comment.