Skip to content
This repository has been archived by the owner on Feb 1, 2025. It is now read-only.

Commit

Permalink
Merge pull request #130 from SibTiger/PSCAT-Version-1.2.0
Browse files Browse the repository at this point in the history
Added Update PSCAT in Main Menu; #129
  • Loading branch information
SibTiger authored Jan 18, 2025
2 parents 01aab6b + 6b865e2 commit 7e16c4a
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions Scripts/MainMenu.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class MainMenu
if ($showOptionWebpage)
{
[CommonCUI]::DrawMenuItem('H', `
"Access the project's, $([ProjectInformation]::GetProjectName()), webpage", `
"Access the project's, $([ProjectInformation]::GetProjectName()), webpage.", `
[ProjectInformation]::GetProjectWebsite(), `
$NULL, `
$true);
Expand All @@ -163,9 +163,17 @@ class MainMenu
$true);


# Update Program
[CommonCUI]::DrawMenuItem('U', `
"Check for $($GLOBAL:_PROGRAMNAME_) updates.", `
$GLOBAL:_PROGRAMSITEDOWNLOADS_, `
$NULL, `
$true);


# Help Documentation
[CommonCUI]::DrawMenuItem('?', `
"Help Documentation", `
"Help documentation", `
"Access the $($GLOBAL:_PROGRAMNAMESHORT_) Wiki documentation online.", `
$NULL, `
$true);
Expand Down Expand Up @@ -288,6 +296,26 @@ class MainMenu
} # Load Project into Program


# Check for program updates
{($_ -eq "U") -or `
($_ -eq "Update") -or `
($_ -eq "Update $($GLOBAL:_PROGRAMNAME_)") -or `
($_ -eq "Update $($GLOBAL:_PROGRAMNAMESHORT_)")}
{
# Initiate the Update Protocol
if (![WebsiteResources]::AccessWebSite_Update($GLOBAL:_PROGRAMSITEDOWNLOADS_, ` # Program's Release Page
"$($GLOBAL:_PROGRAMNAME_) Update Page")) # Show Page Title
{
# Alert the user that the web functionality did not successfully work as intended.
[NotificationAudible]::Notify([NotificationAudibleEventType]::Error);
} # if : Failed to Open Webpage


# Finished
break;
} # Update Program


# Access the Program's Help Documentation
{($_ -eq "?") -or `
($_ -eq "help") -or `
Expand Down

0 comments on commit 7e16c4a

Please sign in to comment.