mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-03 03:23:31 -05:00
Formatting
This commit is contained in:
@ -45,7 +45,6 @@ class GenericException : Exception {
|
||||
[string]$additionalData
|
||||
GenericException($Message) : base($Message) {}
|
||||
}
|
||||
log_time_taken "Main.ps1 class setup line 48"
|
||||
|
||||
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window'
|
||||
|
||||
@ -582,7 +581,5 @@ $sync["SponsorMenuItem"].Add_Click({
|
||||
Show-CustomDialog -Title "Sponsors" -Message $authorInfo -EnableScroll $true
|
||||
})
|
||||
|
||||
|
||||
log_time_taken "Main.ps1 before ShowDialog"
|
||||
$sync["Form"].ShowDialog() | out-null
|
||||
Stop-Transcript
|
||||
|
@ -12,16 +12,6 @@ param (
|
||||
[switch]$Run
|
||||
)
|
||||
|
||||
function log_time_taken {
|
||||
param (
|
||||
[string]$description
|
||||
)
|
||||
$current_time = Get-Date
|
||||
$time_taken = $current_time - $sync.start_time
|
||||
Write-Output "[$time_taken] $description" >> $sync.log
|
||||
$sync.start_time = $current_time
|
||||
}
|
||||
|
||||
# Set DebugPreference based on the -Debug switch
|
||||
if ($Debug) {
|
||||
$DebugPreference = "Continue"
|
||||
@ -44,8 +34,6 @@ Add-Type -AssemblyName System.Windows.Forms
|
||||
|
||||
# Variable to sync between runspaces
|
||||
$sync = [Hashtable]::Synchronized(@{})
|
||||
$sync.log = "$ENV:USERPROFILE\Desktop\winutil.log"
|
||||
$sync.start_time = Get-Date
|
||||
$sync.PSScriptRoot = $PSScriptRoot
|
||||
$sync.version = "#{replaceme}"
|
||||
$sync.configs = @{}
|
||||
@ -100,5 +88,3 @@ Start-Transcript -Path "$logdir\winutil_$dateTime.log" -Append -NoClobber | Out-
|
||||
# Set PowerShell window title
|
||||
$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Admin)"
|
||||
clear-host
|
||||
Write-Output "" > $sync.log
|
||||
log_time_taken "Start.ps1 finished"
|
Reference in New Issue
Block a user