mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-24 03:45:30 +00:00
improve impex (#2649)
- copy execution command to clipboard - add tooltips to import & export menu items
This commit is contained in:
parent
bddf57bcee
commit
a397f20ac6
@ -41,6 +41,8 @@ function Invoke-WPFImpex {
|
||||
if ($type -eq "export") {
|
||||
$jsonFile = Get-WinUtilCheckBoxes -unCheck $false
|
||||
$jsonFile | ConvertTo-Json | Out-File $FileBrowser.FileName -Force
|
||||
$runscript = "iex ""& { `$(irm christitus.com/win) } -Config '$($FileBrowser.FileName)'"""
|
||||
$runscript | Set-Clipboard
|
||||
}
|
||||
if ($type -eq "import") {
|
||||
$jsonFile = Get-Content $Config | ConvertFrom-Json
|
||||
|
@ -782,8 +782,16 @@
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top">
|
||||
<Border Background="{MainBackgroundColor}" BorderBrush="{MainForegroundColor}" BorderThickness="1" CornerRadius="0" Margin="0">
|
||||
<StackPanel Background="{MainBackgroundColor}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="Import" Name="ImportMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="Export" Name="ExportMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="Import" Name="ImportMenuItem" Foreground="{MainForegroundColor}">
|
||||
<MenuItem.ToolTip>
|
||||
<ToolTip Content="Import Configuration from exported file."/>
|
||||
</MenuItem.ToolTip>
|
||||
</MenuItem>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="Export" Name="ExportMenuItem" Foreground="{MainForegroundColor}">
|
||||
<MenuItem.ToolTip>
|
||||
<ToolTip Content="Export Selected Elements and copy execution command to clipboard."/>
|
||||
</MenuItem.ToolTip>
|
||||
</MenuItem>
|
||||
<Separator/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="About" Name="AboutMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="Sponsors" Name="SponsorMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
|
Loading…
Reference in New Issue
Block a user