Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Batch Tools - Form1.vb

Form1.vb

Caricato da: R0gerblack
Scarica il programma completo

  1. Public Class Form1
  2.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  3.         TB1.Text = "@echo off"
  4.     End Sub
  5.  
  6.     Private Sub EliminaUnFileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EliminaUnFileToolStripMenuItem.Click
  7.         TB1.Text += "DEL" + InputBox("Immetti la locazione del file da cancellare")
  8.     End Sub
  9.  
  10.     Private Sub EliminaUnaCartellaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EliminaUnaCartellaToolStripMenuItem.Click
  11.         TB1.Text += "Deltree" + InputBox("Immetti la locazione dela cartella da cancellare")
  12.     End Sub
  13.  
  14.     Private Sub RinominaFileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RinominaFileToolStripMenuItem.Click
  15.         TB1.Text += vbNewLine + "REN" + " " + InputBox("Immetti il nome del file") + " (" + InputBox("Immetti la locazione") + ") " + InputBox("Immetti nuovo nome") + " (" + InputBox("Immetti la locazione") + ")"
  16.     End Sub
  17.  
  18.     Private Sub SpegniIlPCToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SpegniIlPCToolStripMenuItem.Click
  19.         TB1.Text += vbNewLine + "Shutdown -s -t"
  20.     End Sub
  21.  
  22.     Private Sub CreaUnFileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreaUnFileToolStripMenuItem.Click
  23.         TB1.Text += vbNewLine + "echo " + InputBox("Immetti il nome del file") + " >>" + InputBox("Immetti la locazione")
  24.     End Sub
  25.  
  26.     Private Sub TerminaProcessoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TerminaProcessoToolStripMenuItem.Click
  27.         TB1.Text += vbNewLine + "taskkill /F /IM " + InputBox("Immetti il nome del processo")
  28.     End Sub
  29.  
  30.     Private Sub NuovoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NuovoToolStripMenuItem.Click
  31.         TB1.Clear()
  32.         TB1.Text = "@echo off"
  33.     End Sub
  34.  
  35.     Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
  36.         TB1.Clear()
  37.         TB1.Text = "@echo off"
  38.     End Sub
  39.  
  40.     Private Sub SalvaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SalvaToolStripMenuItem.Click
  41.         Dim save As New SaveFileDialog
  42.         save.Filter = "File di Script|.bat"
  43.         If save.ShowDialog = Windows.Forms.DialogResult.OK Then
  44.             Dim c As New IO.StreamWriter(save.FileName)
  45.             c.WriteLine(TB1.Text)
  46.             c.Close()
  47.         End If
  48.     End Sub
  49.  
  50.     Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click
  51.         Dim save As New SaveFileDialog
  52.         save.Filter = "File di Script|.bat"
  53.         If save.ShowDialog = Windows.Forms.DialogResult.OK Then
  54.             Dim c As New IO.StreamWriter(save.FileName)
  55.             c.WriteLine(TB1.Text)
  56.             c.Close()
  57.         End If
  58.     End Sub
  59.  
  60.     Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
  61.         Dim Open As New OpenFileDialog
  62.         Open.Filter = "File di Script|.bat"
  63.         'Metti che si apre l'OpenFileDialog e apra
  64.         If Open.ShowDialog = Windows.Forms.DialogResult.OK Then
  65.             Dim c As New IO.StreamReader(Open.FileName)
  66.             TB1.Text = c.ReadToEnd
  67.             c.Close()
  68.         End If
  69.     End Sub
  70.  
  71.     Private Sub CaricaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CaricaToolStripMenuItem.Click
  72.         Dim Open As New OpenFileDialog
  73.         Open.Filter = "File di Script|.bat"
  74.         'Metti che si apre l'OpenFileDialog e apra
  75.         If Open.ShowDialog = Windows.Forms.DialogResult.OK Then
  76.             Dim c As New IO.StreamReader(Open.FileName)
  77.             TB1.Text = c.ReadToEnd
  78.             c.Close()
  79.         End If
  80.     End Sub
  81.  
  82.     Private Sub EsciToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EsciToolStripMenuItem.Click
  83.         Application.Exit()
  84.     End Sub
  85.  
  86.     Private Sub RifaiToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RifaiToolStripMenuItem.Click
  87.         TB1.Undo()
  88.     End Sub
  89.  
  90.     Private Sub TagliaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TagliaToolStripMenuItem.Click
  91.         TB1.Cut()
  92.     End Sub
  93.  
  94.     Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton4.Click
  95.         TB1.Cut()
  96.     End Sub
  97.  
  98.     Private Sub CopiaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CopiaToolStripMenuItem.Click
  99.         TB1.Copy()
  100.     End Sub
  101.  
  102.     Private Sub ToolStripButton5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton5.Click
  103.         TB1.Copy()
  104.     End Sub
  105.  
  106.     Private Sub IncollaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles IncollaToolStripMenuItem.Click
  107.         TB1.Paste()
  108.     End Sub
  109.  
  110.     Private Sub ToolStripButton6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton6.Click
  111.         TB1.Paste()
  112.     End Sub
  113.  
  114.     Private Sub SelezionaTuttoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SelezionaTuttoToolStripMenuItem.Click
  115.         TB1.SelectAll()
  116.     End Sub
  117. End Class