Advertisement
Guest User

Untitled

a guest
Jul 16th, 2017
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. Imports System.Runtime.InteropServices
  2.  
  3. Public Class Form1
  4.  
  5. Private WithEvents _commandExecutor As New CommandExecutor()
  6.  
  7. Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
  8. '_commandExecutor.Execute("cmd.exe", "/c c:\miner\claymore\EthDcrMiner64.exe -epool us2.ethermine.org:4444 -esm 1 -ewal {ADDRESS}.{RIGNAME} -epsw x")
  9. _commandExecutor.Execute("cmd.exe", "/c c:\miner\claymore\ping.bat")
  10. End Sub
  11.  
  12. Private Sub _commandExecutor_OutputRead(ByVal output As String) Handles _commandExecutor.OutputRead
  13. Me.Invoke(New processCommandOutputDelegate(AddressOf processCommandOutput), output)
  14. End Sub
  15.  
  16. Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
  17. _commandExecutor.Dispose()
  18. End Sub
  19.  
  20. Private Delegate Sub processCommandOutputDelegate(ByVal output As String)
  21.  
  22. Private Sub processCommandOutput(ByVal output As String)
  23. Debug.Print(output)
  24. End Sub
  25.  
  26. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement