Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Runspaces #12

Merged
merged 2 commits into from
May 17, 2022
Merged

WIP: Runspaces #12

merged 2 commits into from
May 17, 2022

Conversation

DeveloperDurp
Copy link
Contributor

I created a sample of how I do runspaces in the scripts I have out in production. I like to keep the main form inside the initial thread and call runspaces from there. Not as pretty but I also don't use the xaml files like you do.

@DeveloperDurp DeveloperDurp changed the title Example of how I do runspaces WIP: Runspaces May 16, 2022
@DeveloperDurp
Copy link
Contributor Author

Figured out the runspaces with your design, working on converting it into a working version.

@ChrisTitusTech ChrisTitusTech changed the base branch from main to test May 17, 2022 15:33
@ChrisTitusTech
Copy link
Owner

Thank you so much for this.

@ChrisTitusTech ChrisTitusTech merged commit b670968 into ChrisTitusTech:test May 17, 2022
ChrisTitusTech added a commit that referenced this pull request Sep 5, 2022
* xml decouple

* Typos: Documents, Start installs (#18)

Document -> Documents
Start install -> Start installs

Co-authored-by: Chris Titus <[email protected]>

* Added DISM command and button to tool (#19)

* Added DISM command and button to tool

* Added additional scans and colours to make it clear when each scan type starts

Co-authored-by: Chris Titus <[email protected]>

* Fix issue in #14 (#20)

* Fix issue in #14

 - It seems that Chris forgot to add a button for the Repair Windows Update Script and accidentally put it under the Default Windows Update Settings button.
   - Fixed by adding the $WPFFixesUpdate.Add_Click function before the Reset Script
   - Fixes #14

* decoupling xaml and ps1 (#7)

Co-authored-by: Chris Titus <[email protected]>

Co-authored-by: Rahul Somasundaram <[email protected]>
Co-authored-by: Chris Titus <[email protected]>

* Add winget check and installer (#21)

* Add winget check and installer

 - Adds Check if winget is installed
   - If not installed, checks if the computer is running 1809+ and if the computer is running Windows Server or LTSC
    - If running pre-1809, winget install stops as it is not supported
    - If running Windows Server or Windows LTSC, runs alternative installer compatible with those editions of Windows

* decoupling xaml and ps1 (#7)

Co-authored-by: Chris Titus <[email protected]>

Co-authored-by: Rahul Somasundaram <[email protected]>
Co-authored-by: Chris Titus <[email protected]>

* Small Fixes. (#22)

* Update winutil.ps1

* Use Curl instead of Bits transfer for O&O Shutup.

* Update winutil.ps1

* decoupling xaml and ps1 (#7)

Co-authored-by: Chris Titus <[email protected]>

Co-authored-by: Rahul Somasundaram <[email protected]>
Co-authored-by: Chris Titus <[email protected]>

* upload example (#12)

Co-authored-by: Chris Titus <[email protected]>

* code format using powershell VS code extension (#28)

* Working runspaces (#32)

* upload example

* decoupling xaml and ps1 (#7)

Co-authored-by: Chris Titus <[email protected]>

* Update README.md

* convert to runspaces

* add security updates to invoke-button

* Update README.md

removed extra text about test branch

* initial commit to test restmethod

* formatting

Co-authored-by: Rahul Somasundaram <[email protected]>
Co-authored-by: Chris Titus <[email protected]>

* Fix bug in #39 (#40)

- Closes #39
  - $arch is not set to a value in the script, and it throws an error when the If-Statement is called
    - Fixed by replacing the $arch variable check with a wmic check

* Fix and Tweak #19 (#43)

* Fix Issue in #19

 - Pull Request #19 didn't add an entry for PanelDISM into MainWindow.xaml, causing an error to be thrown when the script if executed and a button to not be created
   - Fixed by adding an entry into MainWIndow.xaml that creates the needed button under the FixesUpdate button
   - Note: To see the fix, you need to comment line 9 and uncomment line 8 to use the local MainWindow.xaml instead of the one in the Main Branch

* Fix Formatting and Tweak Things

 - Fixed the formatting
 - Tweaked Write-Host's
   - Added newlines (`n) to space out the Statuses
   - Added progress indicators
     - Required "s and 's to be swapped so x/4 does not perform an operation

* Slight Tweak

* Added Uncheck all button in the Install tab (#29)

* Revert "Added Uncheck all button in the Install tab (#29)" (#72)

This reverts commit 8338371.

* Throw warning if no programs are selected for installation (#30)

Co-authored-by: Chris Titus <[email protected]>

* Fix a few spelling errors (#44)

- Fixed a few spelling errors
   - dependancies -> dependencies
   - Evnronment -> Environment
   - haved -> have
   - Hibernte -> Hibernate
   - histroy -> history
   - extentions -> extensions

* Arguments (#52)

* Implement Arguments

- Using $env:args, the script scans for arguments; then if found, Invokes the Runspace associated with said arg. Or in the case of the old panels, just opens the panel.
  - \b is to prevent mutual words from causing issues (Ex: Install and InstallUpgrade would conflict without \b)

* Actually add \b

Forgot to save before previous commit  : |

* Fix Order Issue

- The arg check occurred too early, causing an error

* Remove Invoke-Runspace

- Replaced Invoke-Runspace with Invoke-Command as there is no need to worry about the gui when running unattended

* Add Program Install Arg Check

 - Added arg check for Install
   - Format is 'Install: company.program,.company.program2'

Co-authored-by: Chris Titus <[email protected]>

* Replace all instances of "incase" to "in case" (#60)

Co-authored-by: Chris Titus <[email protected]>

* Added  -NoRestart to WindowsOptionalFeature (#65)

* Handled UAC exit on install and upgrade (#31)

Co-authored-by: ChrisTitusTech <[email protected]>
Co-authored-by: Ayoub Hebbaj <[email protected]>
Co-authored-by: Jards <[email protected]>
Co-authored-by: Carter <[email protected]>
Co-authored-by: Rahul Somasundaram <[email protected]>
Co-authored-by: Aetopia <[email protected]>
Co-authored-by: DeveloperDurp <[email protected]>
Co-authored-by: Rahul Somasundaram <[email protected]>
Co-authored-by: GrahamboJangles <[email protected]>
Co-authored-by: PWall <[email protected]>
ChrisTitusTech added a commit that referenced this pull request Mar 1, 2025
* initial visual implementation

- remove idiotic border logic from Invoke-WPFUIElements
- add "application" type & style
- add "radiobutton" type & style
- remove prefer choco checkbox (did not modify logic outside of xaml, so i currently get errors due to that)

* add image support via choco db

- add image support via choco db
- backup image should be taken from unigetui db
- backup backup image is some random package one rn

* add compatibility for every app

* performance improvements

- move get logo to runspace (not working rn)
- readd choco checkbox to mute errors

* add border name

* fix scrollviewer & reimplement logo logic into ui elements

* noimage fix

* add notes

* cleanup & remove nav from search effects

* add button action

* rename buttons

* add sort by options

* move scrollviewer & app buttons into uielements logic

* format logic for app action buttons

* fix app action button logic & move get & clear to sidepanel

* change category of new buttons

* add virtualisation & layouting fixes

- commented out prefer choco logic
- add virtualisation
- layouting improvements

* fix radiobuttons

* LETS GOOO  (#12)

* Add Selected Apps Label, Reshuffel the nesting of the checkbox and the label to be able to reference the name from the actual checkbox

* Add visual selection and allow click on the whole app section

* Fix Theme definition to work with theme change

* Fix Highlight on if label or icon is clicked

* change applications.json to powershell object list and refactor UI Creation logic

* Optimization and Add Collapsable Categories

* Add Button functionality for install, uninstall, info, install selected, uninstall selected, clear and implement search

* Rest application.json to Main

* Reset Compile to main

* Pretty much revamp_apps but without changes to applications.json

* Small fixes

* Add Get-Installed Loading Indicator + small fixes

* Re-Add Choco Preference

* Remove Logic from Invoke-WPFUIElements that is Moved to Invoke-WPFUIApps

* Remove Alphabetical List, Sort Apps inside Category Alphabetically

* Small fixes to the Get-Installed function and formatting stuff

* Style for Hidden Checkbox but visible Content

* Hotfix for Category Expansion during search

* Replace Category Label with ToggleButton, Fix Search Bugs

* First Try at implementing a Compact Mode for the App page

* Fix Whitespace when using Search

* Keep the search status when switching between compact and full view

* Fix weird buggy behaviour in regards to switching the Display Mode and using Show-SelectedOnly

* Improve Togglebutton

- add initial implementation of togglebutton style
- add togglebuttons to appnavigation.json
- refractor UI element creation for Togglebutton
- commit preprocessing changes

* Togglebutton fixes

- move dot to the right in style
- cleanup code
- fix arrangement of content

* Add logic to the new ToggleButtons in the sidebar of the install tab and remove old buttons

* reorder buttons & fix Togglebutton toggling if action not possible

- reorder getinstalled and clearselection
- set togglebutton back if no app is selected

* Slight modificatoin to togglebutton style & fix sidebar width

* Add hover effect for the app tiles

* ToggleButtonStyle animation

- add hover animation to white dot
- remove IsPressed trigger
- improve some comments

* disable show selected filter on clear selection

* Add a Popup Dropdown for Selected Apps with the ability to deselect them

* Split up the functions to seperate files like the rest of the repo

* Fix Bug where Scrollviewer dosnt work

* disable autofallback checkbox

* run preprocessing

* remove installation scope

- remove all 3 radiobuttons from appnavigation.json

* remove scrollviewer from WPFUIElements

* toggle showselected on GetInstalled

* remove unused autofallback

---------

Co-authored-by: Martin Wiethan <[email protected]>
Co-authored-by: Chris Titus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants