Skip to content

Commit

Permalink
Added ability to retrieve configuration file paths
Browse files Browse the repository at this point in the history
  • Loading branch information
yt3trees committed Nov 18, 2023
1 parent 9fc51dc commit 9d2c751
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions msbuild-gui/VersionWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
Width="155"
Text="Version:"
Grid.Column="1"
MouseLeftButtonDown="VersionText_MouseLeftButtonDown"
Grid.Row="1"
Margin="1,0,0,0" />
<TextBox x:Name="githubURLText"
Expand Down
7 changes: 7 additions & 0 deletions msbuild-gui/VersionWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,12 @@ private void Window_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
this.Close();
}
}

private void VersionText_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
string exeConfigurationPath = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath;
Clipboard.SetText(exeConfigurationPath);
ModernWpf.MessageBox.Show("Configuration file path copied to clipboard.", "Information", MessageBoxButton.OK, MessageBoxImage.Information);
}
}
}

0 comments on commit 9d2c751

Please sign in to comment.