Skip to content

Commit

Permalink
Some changes. Still borked!
Browse files Browse the repository at this point in the history
  • Loading branch information
taljaards committed Oct 9, 2014
1 parent 1990fb9 commit 7883042
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Expand Down Expand Up @@ -138,6 +141,7 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="My Project\app.manifest" />
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Imports System.Runtime.InteropServices
' Review the values of the assembly attributes

<Assembly: AssemblyTitle("Kill It With Fire!")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyDescription("A program meant to end annoying, unnecessary processes.")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Kill It With Fire!")>
<Assembly: AssemblyCopyright("Copyright © 2014")>
Expand All @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>
<Assembly: AssemblyVersion("0.1")>
<Assembly: AssemblyFileVersion("0.1")>
115 changes: 73 additions & 42 deletions Kill It With Fire!/Kill It With Fire!/Prompt.Designer.vb

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

23 changes: 23 additions & 0 deletions Kill It With Fire!/Kill It With Fire!/Prompt.vb
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
Public Class Prompt

Private Sub btn_yes_Click(sender As Object, e As EventArgs) Handles btn_yes.Click
If chk_all.Checked = True Then
promptResult = "YesAll"
Else
promptResult = "Yes"
End If

Me.Close()
End Sub

Private Sub btn_no_Click(sender As Object, e As EventArgs) Handles btn_no.Click
If chk_all.Checked = True Then
promptResult = "NoAll"
Else
promptResult = "No"
End If

Me.Close()
End Sub

Private Sub Prompt_Load(sender As Object, e As EventArgs) Handles MyBase.Load
panel_buttons.Location = New Point((Me.Width - panel_buttons.Width) / 2, panel_buttons.Location.Y)
End Sub
End Class
18 changes: 13 additions & 5 deletions Kill It With Fire!/Kill It With Fire!/kill.vb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Module kill
Public promptResult As String

Public Sub kill()
Dim listProcesses(,) As String = _
{ _
Expand All @@ -24,15 +26,21 @@

For i = 0 To listProcesses.Length / 2 - 1
If Strings.StrComp(currentProcess, listProcesses(i, 0)) = 0 Then
Dim r As MsgBoxResult
r = MsgBox("Are you sure you want to Kill the following process? " & vbNewLine & currentProcess, MsgBoxStyle.YesNoCancel Or MsgBoxStyle.ApplicationModal Or MsgBoxStyle.MsgBoxSetForeground)
Dim str As String = "Are you sure you want to kill " & p.ProcessName & "? "

If promptResult <> "YesAll" Or promptResult <> "NoAll" Then
Prompt.label_procCurrent.Text = str
Prompt.label_procDetails.Text = "(" & currentProcess & ")"
Prompt.ShowDialog()
End If

If r = MsgBoxResult.Cancel Then
If promptResult = "No" Then
Exit For
ElseIf r = MsgBoxResult.Yes Then
ElseIf promptResult = "NoAll" Then
Exit Sub
Else '"Yes" or "YesAll"
p.Kill()
p.WaitForExit() ' // possibly with a timeout
MsgBox("Done")
End If
End If
Next
Expand Down

0 comments on commit 7883042

Please sign in to comment.