Skip to content

Commit

Permalink
Merge pull request #3 from cyberofficial/2.19.0.441
Browse files Browse the repository at this point in the history
2.19.0.441

Release Features:
* Added request admin button
* Application will check for updates after it is ran (so incase update server is offline you can still run it)
* Application is now 'oneclick' ready
* Setup Installer checks for updates
* Desktop Icon is created
* Start Menu folder is now created
* Application requires manual activation now rather automatically starting.

Work in Progress:
* Ignore List [Hidden] - Add programs to ignore when boosting.
  • Loading branch information
cyberofficial committed Sep 26, 2022
2 parents 2f69416 + 4005c87 commit ba26f8d
Show file tree
Hide file tree
Showing 14 changed files with 667 additions and 126 deletions.
193 changes: 138 additions & 55 deletions wtfpsbooster/Form1.Designer.vb

Large diffs are not rendered by default.

81 changes: 45 additions & 36 deletions wtfpsbooster/Form1.vb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
Imports System.Runtime.InteropServices
Public Class Form1
Dim corecount As Integer
Dim status As String
Dim total As Integer
Dim cores As Integer
Dim n As Integer
Dim EAC_on As Boolean = False
Dim launcher1() As Process
Dim aces1() As Process
Dim eac() As Process
Dim IsWtRunning As Boolean
Dim IsLRunning As Boolean
Dim DidWtClose As Boolean
Dim ExBoost As Boolean
Dim WatchDogTimer As Integer
Dim wdtimer_counter As Integer
Private corecount As Integer
Private ReadOnly status As String
Private total As Integer
Private cores As Integer
Private n As Integer
Private EAC_on As Boolean = False
Private launcher1() As Process
Private aces1() As Process
Private eac() As Process
Private IsWtRunning As Boolean
Private IsLRunning As Boolean
Private DidWtClose As Boolean
Private ExBoost As Boolean
Private WatchDogTimer As Integer
Private ReadOnly wdtimer_counter As Integer

Public Const WM_NCLBUTTONDOWN As Integer = &HA1
Public Const HT_CAPTION As Integer = &H2
Expand All @@ -29,8 +29,8 @@ Public Class Form1

Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown, LeftPanel.MouseDown, pcstatus_txt.MouseDown, wtstatus.MouseDown, WatchDogTxt.MouseDown
If e.Button = Windows.Forms.MouseButtons.Left Then
ReleaseCapture()
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0)
Dim unused1 = ReleaseCapture()
Dim unused = SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0)
End If
End Sub

Expand All @@ -49,7 +49,7 @@ Public Class Form1
' Use this form loading for code
' ----------------------------------
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.KeyPreview = True
KeyPreview = True

splash.ShowDialog()

Expand All @@ -61,7 +61,7 @@ Public Class Form1
corecount = 0
While corecount <= System.Environment.ProcessorCount.ToString - 1
corecount += 1
cs.Items.Add(corecount - 1)
Dim unused1 = cs.Items.Add(corecount - 1)
End While
MainControlPanel.TabPages.Remove(TabPage2)

Expand All @@ -78,7 +78,7 @@ Public Class Form1
' ---------------------------------------------------------------

If Application.ExecutablePath.Contains("wtfpsbooster.exe") = False Then
MessageBox.Show("It seems like the file name was changed, please rename back to: wtfpsbooster.exe" & vbNewLine & "The name is hard coded to the filename and this helps makes things easier, You can always make a shortcut though :)")
Dim unused = MessageBox.Show("It seems like the file name was changed, please rename back to: wtfpsbooster.exe" & vbNewLine & "The name is hard coded to the filename and this helps makes things easier, You can always make a shortcut though :)")
Application.Exit()
End If
End Sub
Expand Down Expand Up @@ -117,7 +117,7 @@ Public Class Form1
total = 0
EAC_on = True
cores = System.Environment.ProcessorCount.ToString
n = 2 ^ cores - 1
n = (2 ^ cores) - 1

' Prepare all applications by setting a value to the lowest first.

Expand Down Expand Up @@ -147,7 +147,7 @@ Public Class Form1
End Try
Next
cores = System.Environment.ProcessorCount.ToString
n = 2 ^ cores - 1
n = (2 ^ cores) - 1
For Each proc In Process.GetProcesses
Try
' Exclusion List
Expand Down Expand Up @@ -230,12 +230,10 @@ Public Class Form1

End Sub
Private Sub BoostWorker_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BoostWorker.RunWorkerCompleted
If ExBoost = False Then
pcstatus_txt.Text = "War Thunder Status: Boosted" & vbNewLine & "PC Status: Most resources are dedicated to War Thunder"
Else
pcstatus_txt.Text = "War Thunder Status: Extra Boosted" & vbNewLine & "PC Status: Almost everything is slowed for War Thunder"
End If
Me.Enabled = True
pcstatus_txt.Text = If(ExBoost = False,
"War Thunder Status: Boosted" & vbNewLine & "PC Status: Most resources are dedicated to War Thunder",
"War Thunder Status: Extra Boosted" & vbNewLine & "PC Status: Almost everything is slowed for War Thunder")
Enabled = True
End Sub
Private Sub RestoreWorker_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles RestoreWorker.DoWork
For Each proc In Process.GetProcesses
Expand All @@ -252,13 +250,13 @@ Public Class Form1
End Sub
Private Sub RestoreWorker_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles RestoreWorker.RunWorkerCompleted
pcstatus_txt.Text = "PC Status: Normal"
Me.Enabled = True
Enabled = True
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles RestoreBtn.Click
Me.Enabled = False
Enabled = False
Try
cores = System.Environment.ProcessorCount.ToString
n = 2 ^ cores - 1
n = (2 ^ cores) - 1
RestoreWorker.RunWorkerAsync()

Catch ex As Exception
Expand All @@ -270,7 +268,7 @@ Public Class Form1
For Each proc In Process.GetProcesses
Try
If Not pclist.Items.Contains(proc.ProcessName) Then
pclist.Items.Add(proc.ProcessName)
Dim unused = pclist.Items.Add(proc.ProcessName)
End If
Catch ex As Exception

Expand Down Expand Up @@ -345,7 +343,7 @@ Public Class Form1
WatchDogTxt.Text = "Watch Dog: Offline"
Try
cores = System.Environment.ProcessorCount.ToString
n = 2 ^ cores - 1
n = (2 ^ cores) - 1
RestoreWorker.RunWorkerAsync()
Catch ex As Exception
End Try
Expand Down Expand Up @@ -418,9 +416,9 @@ Public Class Form1
proc.Kill()

If ExBoost = True Then
MessageBox.Show("Seems like War Thunder had a Panic Attack, I forced it closed. It also seems like the extra boost was ticked, try again with out extra boost. IF problem still exists please contact me on reddit [user/cyb3rofficial] or github [github.com/cyberofficial]. Possible fix: Try increasing the watch dog timer.")
Dim unused1 = MessageBox.Show("Seems like War Thunder had a Panic Attack, I forced it closed. It also seems like the extra boost was ticked, try again with out extra boost. IF problem still exists please contact me on reddit [user/cyb3rofficial] or github [github.com/cyberofficial]. Possible fix: Try increasing the watch dog timer.")
Else
MessageBox.Show("Seems like War Thunder had a Panic Attack, I forced it closed. Possible fix: Try increasing the watch dog timer.")
Dim unused = MessageBox.Show("Seems like War Thunder had a Panic Attack, I forced it closed. Possible fix: Try increasing the watch dog timer.")
End If
End If
End If
Expand All @@ -431,10 +429,21 @@ Public Class Form1
WatchDogTxt.Text = "Watch Dog: Frozen | Waiting before panic attac: " & wdtimer_counter.ToString
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.WindowState = System.Windows.Forms.FormWindowState.Minimized
WindowState = System.Windows.Forms.FormWindowState.Minimized
End Sub

Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
WatchDog_Settings.ShowDialog()
End Sub

Private Sub ignorelist_btn_Click(sender As Object, e As EventArgs) Handles ignorelist_btn.Click
ignorelistform.ShowDialog()
End Sub

Private Sub start_btn_Click(sender As Object, e As EventArgs) Handles start_btn.Click
MessageBox.Show("Please make sure to close out war thunder first before closing this program. Other wise, things will be super slow and a restart of the pc will be required.")
wtstatus.Text = "Waiting for Launcher..."
tauto.Enabled = True
start_btn.Visible = False
End Sub
End Class
4 changes: 2 additions & 2 deletions wtfpsbooster/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("2.19.0.44")>
<Assembly: AssemblyFileVersion("2.19.0.44")>
<Assembly: AssemblyVersion("2.19.0.441")>
<Assembly: AssemblyFileVersion("2.19.0.441")>

<Assembly: NeutralResourcesLanguageAttribute("en-US")>
2 changes: 1 addition & 1 deletion wtfpsbooster/My Project/Resources.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion wtfpsbooster/My Project/Settings.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions wtfpsbooster/WatchDog_Settings.vb
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
My.Settings.Save()
My.Settings.Reload()
Form1.WatchDog.Interval = WDS_Num.Value
Me.Hide()
Hide()
End Sub

Private Sub WatchDog_Settings_Load(sender As Object, e As EventArgs) Handles MyBase.Load
WDS_Num.Value = My.Settings.watchdog_timer.ToString
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles wdgod_settings_exit_btn.Click
Me.Close()
Close()
WDS_Num.Value = My.Settings.watchdog_timer
End Sub
End Class
Loading

0 comments on commit ba26f8d

Please sign in to comment.