winutil/functions/public/Invoke-ScratchDialog.ps1

29 lines
706 B
PowerShell
Raw Permalink Normal View History

Test 2024 01 30 (#1541) * applications.jsonAdded Foxit Reader app and updated Foxit Editor to show the difference. * applications.json Added Foxit Reader app and updated Foxit Editor to show the difference. * Compile Winutil * Fix Broken Link and add syncthingtray (#1508) * Compile Winutil * Remove Nano-Removed bugged Nano package for now * Remove Nano -Removed bugged Nano package for now * Compile Winutil * tweaks and fetures tabs clean up automation from inputXML.xaml * tweaks and fetures tabs clean up automation from inputXML.xaml * fixed some commas in tweaks.json file * recompile * Update tweaks.json * Compile Winutil * Choosing Alternate Scartch Path and Busy Messages * Choosing Alternate Scartch Path and Busy Messages * Change Selected index to be pro * Compile Winutil * Improve detection for Pro editions of Windows (#1539) * Update applications.json Fake app add made by linux fanboy * Compile Winutil * Update files - Add detections for whether the image to be processed by MicroWin is Windows 10 or later - Add procedure to clear the indexes ComboBox (WinForms term) every time an ISO is specified * Update screen-install.png (#1464) * Compile Winutil * Improve detection for Professional editions --------- Co-authored-by: Chris Titus <dfm.titus@gmail.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Fix features not being installed and winget reinstall (#1537) * Fix typo in features variable This fucker caused every. single. feature in config tab to not install * Add argument "--force" to winget reinstall Some users reported not being able to reinstall winget without this argument. * Revert "Add argument "--force" to winget reinstall" This reverts commit b331460340d0936f87051230c0bc45b7aedc0d94. * Add "--force" argument when reinstalling winget --------- Co-authored-by: Chris Titus <contact@christitus.com> * RE: Add Adobe Creative Cloud Cleaner tool (#1532) * Add a new function for handling the new tool Implement a new function called Invoke-WPFRunAdobeCCCleanerTool which will download, run the tool and delete it afterwards. * Add the button invocation to call the new function If this is not done, the button will do nothing if the user clicks on it. * Add the button to the XML code * Add button using the new way Using inputXAML.xml is the old way. * Compile Winutil * application are evenly distributed to 5 columns (#1534) * Exclude compiled winutil * Fix unit tests --------- Co-authored-by: LoopTJ <34551682+LoopTJ@users.noreply.github.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: Roc Wang <rocwang911@gmail.com> Co-authored-by: Jes Herring <123990927+jesjess243@users.noreply.github.com> Co-authored-by: ogfrm <96927197+ogfrm@users.noreply.github.com> Co-authored-by: LeeDowA <157072913+LeeDowA@users.noreply.github.com> Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com> Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com> Co-authored-by: Yuri Gabriel <97139700+Yuuh15@users.noreply.github.com> Co-authored-by: Ken Hoo <158048821+mrkenhoo@users.noreply.github.com>
2024-02-02 16:22:08 -06:00
function Invoke-ScratchDialog {
<#
.SYNOPSIS
Enable Editable Text box Alternate Scartch path
.PARAMETER Button
#>
$sync.WPFMicrowinISOScratchDir.IsChecked
Test 2024 01 30 (#1541) * applications.jsonAdded Foxit Reader app and updated Foxit Editor to show the difference. * applications.json Added Foxit Reader app and updated Foxit Editor to show the difference. * Compile Winutil * Fix Broken Link and add syncthingtray (#1508) * Compile Winutil * Remove Nano-Removed bugged Nano package for now * Remove Nano -Removed bugged Nano package for now * Compile Winutil * tweaks and fetures tabs clean up automation from inputXML.xaml * tweaks and fetures tabs clean up automation from inputXML.xaml * fixed some commas in tweaks.json file * recompile * Update tweaks.json * Compile Winutil * Choosing Alternate Scartch Path and Busy Messages * Choosing Alternate Scartch Path and Busy Messages * Change Selected index to be pro * Compile Winutil * Improve detection for Pro editions of Windows (#1539) * Update applications.json Fake app add made by linux fanboy * Compile Winutil * Update files - Add detections for whether the image to be processed by MicroWin is Windows 10 or later - Add procedure to clear the indexes ComboBox (WinForms term) every time an ISO is specified * Update screen-install.png (#1464) * Compile Winutil * Improve detection for Professional editions --------- Co-authored-by: Chris Titus <dfm.titus@gmail.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Fix features not being installed and winget reinstall (#1537) * Fix typo in features variable This fucker caused every. single. feature in config tab to not install * Add argument "--force" to winget reinstall Some users reported not being able to reinstall winget without this argument. * Revert "Add argument "--force" to winget reinstall" This reverts commit b331460340d0936f87051230c0bc45b7aedc0d94. * Add "--force" argument when reinstalling winget --------- Co-authored-by: Chris Titus <contact@christitus.com> * RE: Add Adobe Creative Cloud Cleaner tool (#1532) * Add a new function for handling the new tool Implement a new function called Invoke-WPFRunAdobeCCCleanerTool which will download, run the tool and delete it afterwards. * Add the button invocation to call the new function If this is not done, the button will do nothing if the user clicks on it. * Add the button to the XML code * Add button using the new way Using inputXAML.xml is the old way. * Compile Winutil * application are evenly distributed to 5 columns (#1534) * Exclude compiled winutil * Fix unit tests --------- Co-authored-by: LoopTJ <34551682+LoopTJ@users.noreply.github.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: Roc Wang <rocwang911@gmail.com> Co-authored-by: Jes Herring <123990927+jesjess243@users.noreply.github.com> Co-authored-by: ogfrm <96927197+ogfrm@users.noreply.github.com> Co-authored-by: LeeDowA <157072913+LeeDowA@users.noreply.github.com> Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com> Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com> Co-authored-by: Yuri Gabriel <97139700+Yuuh15@users.noreply.github.com> Co-authored-by: Ken Hoo <158048821+mrkenhoo@users.noreply.github.com>
2024-02-02 16:22:08 -06:00
[System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null
$Dialog = New-Object System.Windows.Forms.FolderBrowserDialog
$Dialog.SelectedPath = $sync.MicrowinScratchDirBox.Text
$Dialog.ShowDialog()
Test 2024 01 30 (#1541) * applications.jsonAdded Foxit Reader app and updated Foxit Editor to show the difference. * applications.json Added Foxit Reader app and updated Foxit Editor to show the difference. * Compile Winutil * Fix Broken Link and add syncthingtray (#1508) * Compile Winutil * Remove Nano-Removed bugged Nano package for now * Remove Nano -Removed bugged Nano package for now * Compile Winutil * tweaks and fetures tabs clean up automation from inputXML.xaml * tweaks and fetures tabs clean up automation from inputXML.xaml * fixed some commas in tweaks.json file * recompile * Update tweaks.json * Compile Winutil * Choosing Alternate Scartch Path and Busy Messages * Choosing Alternate Scartch Path and Busy Messages * Change Selected index to be pro * Compile Winutil * Improve detection for Pro editions of Windows (#1539) * Update applications.json Fake app add made by linux fanboy * Compile Winutil * Update files - Add detections for whether the image to be processed by MicroWin is Windows 10 or later - Add procedure to clear the indexes ComboBox (WinForms term) every time an ISO is specified * Update screen-install.png (#1464) * Compile Winutil * Improve detection for Professional editions --------- Co-authored-by: Chris Titus <dfm.titus@gmail.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Fix features not being installed and winget reinstall (#1537) * Fix typo in features variable This fucker caused every. single. feature in config tab to not install * Add argument "--force" to winget reinstall Some users reported not being able to reinstall winget without this argument. * Revert "Add argument "--force" to winget reinstall" This reverts commit b331460340d0936f87051230c0bc45b7aedc0d94. * Add "--force" argument when reinstalling winget --------- Co-authored-by: Chris Titus <contact@christitus.com> * RE: Add Adobe Creative Cloud Cleaner tool (#1532) * Add a new function for handling the new tool Implement a new function called Invoke-WPFRunAdobeCCCleanerTool which will download, run the tool and delete it afterwards. * Add the button invocation to call the new function If this is not done, the button will do nothing if the user clicks on it. * Add the button to the XML code * Add button using the new way Using inputXAML.xml is the old way. * Compile Winutil * application are evenly distributed to 5 columns (#1534) * Exclude compiled winutil * Fix unit tests --------- Co-authored-by: LoopTJ <34551682+LoopTJ@users.noreply.github.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: Roc Wang <rocwang911@gmail.com> Co-authored-by: Jes Herring <123990927+jesjess243@users.noreply.github.com> Co-authored-by: ogfrm <96927197+ogfrm@users.noreply.github.com> Co-authored-by: LeeDowA <157072913+LeeDowA@users.noreply.github.com> Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com> Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com> Co-authored-by: Yuri Gabriel <97139700+Yuuh15@users.noreply.github.com> Co-authored-by: Ken Hoo <158048821+mrkenhoo@users.noreply.github.com>
2024-02-02 16:22:08 -06:00
$filePath = $Dialog.SelectedPath
Write-Host "No ISO is chosen+ $filePath"
Code Formatting of Repo - Add Preprocessing to Compilation Process - Introduction of Dev/Build Tools to WinUtil (Although very simple at the moment) (#2383) * Replace Tabs with Spaces to follow the conventions * Add Preprocessing in Compiler * Compile from Anywhere you want - Running 'Compile.ps1' Works in any directory you call it from * Code Formatting Changes * Result of Preprocessing Step in 'Compile.ps1' Script - Remove Trailing Whitespace Characters * Make Preprocessing more advanced * Move Preprocessing to a separate script file * Make Self Modification impossible for 'tools/Do-PreProcessing.ps1' Script - Make the workingdir same as sync.PSScriptRoot for consistency * Revert commit b5dffd671ff4f870026e4d384f393c0491692ab7 * Patched a Bug of some Excluded Files not actually get excluded in 'Get-ChildItem' PS Cmdlet * Update Replace Regex for Code Formatting in 'Do-PreProcessing' Script Tool * Rename 'Do-PreProcessing' to 'Invoke-Preprocessing' - Update some Comments * Make 'Invoke-Preprocessing' Modular - Update RegEx to handle more cases - Update Documentation - Add Validations & Useful feedback upon error * Replace Tabs with Spaces to follow the conventions - 'applications.json' File * Code Formatting Changes - 'Copy-Files' Private Function * Update Replace Regex for Code Formatting in 'Invoke-Preprocessing' Script Tool * Replace Tabs with Spaces to follow the conventions - Make 'ExcludedFiles' validation step check all filepaths before finally checking if any has failed * Result of 'Invoke-Preprocessing' Script * Update Replace Regex for Code Formatting in 'Invoke-Preprocessing' Script Tool
2024-08-06 15:35:17 -05:00
if ([string]::IsNullOrEmpty($filePath)) {
Test 2024 01 30 (#1541) * applications.jsonAdded Foxit Reader app and updated Foxit Editor to show the difference. * applications.json Added Foxit Reader app and updated Foxit Editor to show the difference. * Compile Winutil * Fix Broken Link and add syncthingtray (#1508) * Compile Winutil * Remove Nano-Removed bugged Nano package for now * Remove Nano -Removed bugged Nano package for now * Compile Winutil * tweaks and fetures tabs clean up automation from inputXML.xaml * tweaks and fetures tabs clean up automation from inputXML.xaml * fixed some commas in tweaks.json file * recompile * Update tweaks.json * Compile Winutil * Choosing Alternate Scartch Path and Busy Messages * Choosing Alternate Scartch Path and Busy Messages * Change Selected index to be pro * Compile Winutil * Improve detection for Pro editions of Windows (#1539) * Update applications.json Fake app add made by linux fanboy * Compile Winutil * Update files - Add detections for whether the image to be processed by MicroWin is Windows 10 or later - Add procedure to clear the indexes ComboBox (WinForms term) every time an ISO is specified * Update screen-install.png (#1464) * Compile Winutil * Improve detection for Professional editions --------- Co-authored-by: Chris Titus <dfm.titus@gmail.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Fix features not being installed and winget reinstall (#1537) * Fix typo in features variable This fucker caused every. single. feature in config tab to not install * Add argument "--force" to winget reinstall Some users reported not being able to reinstall winget without this argument. * Revert "Add argument "--force" to winget reinstall" This reverts commit b331460340d0936f87051230c0bc45b7aedc0d94. * Add "--force" argument when reinstalling winget --------- Co-authored-by: Chris Titus <contact@christitus.com> * RE: Add Adobe Creative Cloud Cleaner tool (#1532) * Add a new function for handling the new tool Implement a new function called Invoke-WPFRunAdobeCCCleanerTool which will download, run the tool and delete it afterwards. * Add the button invocation to call the new function If this is not done, the button will do nothing if the user clicks on it. * Add the button to the XML code * Add button using the new way Using inputXAML.xml is the old way. * Compile Winutil * application are evenly distributed to 5 columns (#1534) * Exclude compiled winutil * Fix unit tests --------- Co-authored-by: LoopTJ <34551682+LoopTJ@users.noreply.github.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: Roc Wang <rocwang911@gmail.com> Co-authored-by: Jes Herring <123990927+jesjess243@users.noreply.github.com> Co-authored-by: ogfrm <96927197+ogfrm@users.noreply.github.com> Co-authored-by: LeeDowA <157072913+LeeDowA@users.noreply.github.com> Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com> Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com> Co-authored-by: Yuri Gabriel <97139700+Yuuh15@users.noreply.github.com> Co-authored-by: Ken Hoo <158048821+mrkenhoo@users.noreply.github.com>
2024-02-02 16:22:08 -06:00
Write-Host "No Folder had chosen"
return
}
Test 2024 01 30 (#1541) * applications.jsonAdded Foxit Reader app and updated Foxit Editor to show the difference. * applications.json Added Foxit Reader app and updated Foxit Editor to show the difference. * Compile Winutil * Fix Broken Link and add syncthingtray (#1508) * Compile Winutil * Remove Nano-Removed bugged Nano package for now * Remove Nano -Removed bugged Nano package for now * Compile Winutil * tweaks and fetures tabs clean up automation from inputXML.xaml * tweaks and fetures tabs clean up automation from inputXML.xaml * fixed some commas in tweaks.json file * recompile * Update tweaks.json * Compile Winutil * Choosing Alternate Scartch Path and Busy Messages * Choosing Alternate Scartch Path and Busy Messages * Change Selected index to be pro * Compile Winutil * Improve detection for Pro editions of Windows (#1539) * Update applications.json Fake app add made by linux fanboy * Compile Winutil * Update files - Add detections for whether the image to be processed by MicroWin is Windows 10 or later - Add procedure to clear the indexes ComboBox (WinForms term) every time an ISO is specified * Update screen-install.png (#1464) * Compile Winutil * Improve detection for Professional editions --------- Co-authored-by: Chris Titus <dfm.titus@gmail.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com> * Fix features not being installed and winget reinstall (#1537) * Fix typo in features variable This fucker caused every. single. feature in config tab to not install * Add argument "--force" to winget reinstall Some users reported not being able to reinstall winget without this argument. * Revert "Add argument "--force" to winget reinstall" This reverts commit b331460340d0936f87051230c0bc45b7aedc0d94. * Add "--force" argument when reinstalling winget --------- Co-authored-by: Chris Titus <contact@christitus.com> * RE: Add Adobe Creative Cloud Cleaner tool (#1532) * Add a new function for handling the new tool Implement a new function called Invoke-WPFRunAdobeCCCleanerTool which will download, run the tool and delete it afterwards. * Add the button invocation to call the new function If this is not done, the button will do nothing if the user clicks on it. * Add the button to the XML code * Add button using the new way Using inputXAML.xml is the old way. * Compile Winutil * application are evenly distributed to 5 columns (#1534) * Exclude compiled winutil * Fix unit tests --------- Co-authored-by: LoopTJ <34551682+LoopTJ@users.noreply.github.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: Roc Wang <rocwang911@gmail.com> Co-authored-by: Jes Herring <123990927+jesjess243@users.noreply.github.com> Co-authored-by: ogfrm <96927197+ogfrm@users.noreply.github.com> Co-authored-by: LeeDowA <157072913+LeeDowA@users.noreply.github.com> Co-authored-by: CodingWonders <101426328+CodingWonders@users.noreply.github.com> Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com> Co-authored-by: Yuri Gabriel <97139700+Yuuh15@users.noreply.github.com> Co-authored-by: Ken Hoo <158048821+mrkenhoo@users.noreply.github.com>
2024-02-02 16:22:08 -06:00
$sync.MicrowinScratchDirBox.Text = Join-Path $filePath "\"
}