Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public selected As Integer = -1
- Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
- If (System.IO.File.Exists(appPath & "files\" & song_filename(selected))) Then
- If ComboBox1.Text = "" Then
- MsgBox("You need to select a audio file that you would like to restore.")
- Else
- System.IO.File.Copy(appPath & "files\" & song_filename(selected), gmod & song_detail(selected), True)
- MsgBox("Done!")
- End If
- Else
- If ComboBox1.Text = "" Then
- MsgBox("You need to select a audio file that you would like to restore.")
- Else
- Dim sound_loc = ""
- For Each pre As String In Split(sound_list_database, vbCrLf)
- Dim sound() = Split(pre, "|")
- Dim files() = Split(My.Settings.audio_files_filename, "!=!")
- MsgBox(sound(0) & files(selected).ToString & selected)
- If (sound(0).Equals(files(selected))) Then
- Dim out = MsgBox("It appears you have not already downloaded the file for this sound. Would you like to download the sound now to continue this process?", vbYesNo, "No file")
- If out = DialogResult.Yes Then
- My.Computer.Network.DownloadFile(sound(1), appPath & "files\" & files(selected))
- System.IO.File.Copy(appPath & "files\" & files(selected), gmod & song_detail(selected), True)
- MsgBox("Done!")
- Exit For
- End If
- End If
- Next
- End If
- End If
- End Sub
- Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
- selected = ComboBox1.SelectedIndex
- MsgBox(selected)
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement