development #1

Merged
mysticmomba merged 9 commits from development into master 2024-12-31 00:11:34 -05:00
3 changed files with 31 additions and 36 deletions
+1
View File
@@ -0,0 +1 @@
target/
+25 -31
View File
@@ -1317,12 +1317,12 @@ $Form1.FormBorderStyle = [System.Windows.Forms.FormBorderStyle]::FixedDialog
$Form1.MaximizeBox = $false
$Form1.Name = "Form1"
$Form1.StartPosition = [System.Windows.Forms.FormStartPosition]::CenterParent
$Form1.Text = "CHAMP - 2024.2.19"
$Form1.Text = "CHAMP - 2024.12.30"
Function preflight () {
$preflightCounter = [int] 0
$preflightDependancies = ""
Write-Host "Running Pre-Flight checks...`n"
$currentVersion = "2024.2.19"
$currentVersion = "2024.12.30"
$version = Invoke-WebRequest -URI https://git.racooncity.org/brotoskyj/CHAMP/raw/branch/master/version.txt | Select-Object -ExpandProperty Content
Write-Host "Version Check:"
Write-Host "Local Version: $currentVersion"
@@ -1856,7 +1856,6 @@ Function findUserName () {
$main.Refresh()
}
}
}
function userPopout {
function Get-ScriptDirectory {
@@ -1980,23 +1979,12 @@ function userPopout {
findUserName($UNBox)
}
function OnFormClosing_Form1 {
# $this parameter is equal to the sender (object)
# $_ is equal to the parameter e (eventarg)
# The CloseReason property indicates a reason for the closure :
# if (($_).CloseReason -eq [System.Windows.Forms.CloseReason]::UserClosing)
#Sets the value indicating that the event should be canceled.
($_).Cancel = $False
}
$Form2.Add_FormClosing( { OnFormClosing_Form1 } )
$Form2.Add_Shown({ $Form2.Activate() })
$ModalResult = $Form2.ShowDialog()
# Release the Form
$Form2.Dispose()
}
$Clear.Add_Click(
{
@@ -2020,7 +2008,6 @@ $Clear.Add_Click(
$AEBox.BackColor = ""
$PEBox.BackColor = ""
$UNBox.Clear()
}
)
@@ -2101,7 +2088,6 @@ function LAPS () {
}
}
Function REMOTE () {
$pcTag = $textBox1.Text
$pcTagSani = $pcTag.Trim()
if (( $null -eq $pcTagSani ) -or ($pcTagSani -eq "")) {
@@ -2191,7 +2177,19 @@ function geoLocationForm() {
$countryTextBox.Location = New-Object System.Drawing.Point(275, 60)
$countryTextLabel = New-Object System.Windows.Forms.Label
$countryTextLabel.Text = "Country: "
$countryTextLabel.Location = New-Object System.Drawing.Size(225, 60)
$countryTextLabel.Location = New-Object System.Drawing.Point(225, 60)
$stateTextBox = New-Object System.Windows.Forms.TextBox
$stateTextBox.Size = New-Object System.Drawing.Size(165, 35)
$stateTextBox.Location = New-Object System.Drawing.Point(275,100)
$stateTextLabel = New-Object System.Windows.Forms.Label
$stateTextLabel.Text = "State:"
$stateTextLabel.Location = New-Object System.Drawing.Point(225, 100)
$cityTextBox = New-Object System.Windows.Forms.TextBox
$cityTextBox.Size = New-Object System.Drawing.Size(165, 35)
$cityTextBox.Location = New-Object System.Drawing.Point(275,140)
$cityTextLabel = New-Object System.Windows.Forms.Label
$cityTextLabel.Text = "City:"
$cityTextLabel.Location = New-Object System.Drawing.Point(225, 140)
$ipLocationSearchButton = New-Object System.Windows.Forms.Button
$ipLocationSearchButton.Size = New-Object System.Drawing.Size(50, 23)
$ipLocationSearchButton.Location = New-Object System.Drawing.Size(10, 75)
@@ -2213,6 +2211,10 @@ function geoLocationForm() {
$ispTextLabel,
$countryTextBox,
$countryTextLabel,
$stateTextBox,
$stateTextLabel,
$cityTextBox,
$cityTextLabel
$ipLocationSearchButton
)
)
@@ -2220,28 +2222,20 @@ function geoLocationForm() {
$ispTextBox.Clear()
$countryTextBox.Clear()
$ipToSearch = $ipSearchBox.Text
$response = Invoke-RestMethod -Method GET -URI "https://api.iplocation.net/?ip=$ipToSearch"
$ispTextBox.Text = $response.ISP
$countryTextBox.Text = $response.Country_Name
$response = Invoke-RestMethod -Method GET -URI "http://ip-api.com/json/$ipToSearch"
$ispTextBox.Text = $response.isp
$countryTextBox.Text = $response.country
$stateTextBox.Text = $response.regionName
$cityTextBox.Text = $response.city
}
$geoLocationFormBox.ShowDialog()
}
function OnFormClosing_Form1 {
# $this parameter is equal to the sender (object)
# $_ is equal to the parameter e (eventarg)
# The CloseReason property indicates a reason for the closure :
(($_).CloseReason -eq [System.Windows.Forms.CloseReason]::UserClosing)
#Sets the value indicating that the event should be canceled.
#($_).Cancel = $False
}
$Form1.Add_FormClosing( { OnFormClosing_Form1 } )
preflight
# Release of resources
$Reader.Close()
# Release the Form
$Form1.Dispose()
+1 -1
View File
@@ -1 +1 @@
2024.2.19
2024.12.30