Open config file
MODIFY
WalletWasabi.Gui/Tabs/SettingsView.xaml
WalletWasabi.Gui/Tabs/SettingsView.xaml
</StackPanel>
</StackPanel>
</controls:GroupBox>
+ <Button Content="Open config file" Command="{Binding OpenConfigFileCommand}" />
<StackPanel IsVisible="{Binding IsModified}">
<TextBlock Text="Heads Up!" FontWeight="Bold" Classes="warningMessage" />
<TextBlock Classes="warningMessage">Changes will be applied after restarting the application.</TextBlock>

MODIFY
WalletWasabi.Gui/Tabs/SettingsViewModel.cs
WalletWasabi.Gui/Tabs/SettingsViewModel.cs
@@ -8,6 +8,7 @@ using WalletWasabi.Gui.ViewModels.Validation;
using System.Net;
using System.Threading.Tasks;
using System.Net.Sockets;
+using System.IO;
namespace WalletWasabi.Gui.Tabs
{
@@ -34,6 +35,8 @@ namespace WalletWasabi.Gui.Tabs
IsModified = await Global.Config.CheckFileChangeAsync();
});
+
+ OpenConfigFileCommand = ReactiveCommand.Create(OpenConfigFile);
}
public IEnumerable<string> Networks
@@ -143,5 +146,12 @@ namespace WalletWasabi.Gui.Tabs
return "Invalid port.";
}
+
+ public ReactiveCommand OpenConfigFileCommand { get; }
+
+ private void OpenConfigFile()
+ {
+ IoHelpers.OpenFileInTextEditor(Global.Config.FilePath);
+ }
}
}

MODIFY
WalletWasabi/Helpers/IoHelpers.cs
WalletWasabi/Helpers/IoHelpers.cs
@@ -265,6 +265,25 @@ namespace System.IO
}
}
+ public static void OpenFileInTextEditor(string filePath)
+ {
+ if (File.Exists(filePath))
+ {
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ {
+ Process.Start(new ProcessStartInfo { FileName = "notepad.exe", Arguments = $"\"{filePath}\"" });
+ }
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ {
+ Process.Start(new ProcessStartInfo { FileName = "gedit", Arguments = filePath, CreateNoWindow = true });
+ }
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ {
+ Process.Start(new ProcessStartInfo { FileName = "open", Arguments = "-e " + filePath, CreateNoWindow = true });
+ }
+ }
+ }
+
public static void CopyFilesRecursively(DirectoryInfo source, DirectoryInfo target)
{
foreach (DirectoryInfo dir in source.GetDirectories())

Open config file