diff --git a/README.md b/README.md index 9059bd1..3696a11 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SLAM +# SLAM (UPDATED) [Source Live Audio Mixer home page](http://slam.flankers.net/) diff --git a/SLAM/Form1.Designer.vb b/SLAM/Form1.Designer.vb index dc31379..c8c8c67 100644 --- a/SLAM/Form1.Designer.vb +++ b/SLAM/Form1.Designer.vb @@ -39,7 +39,7 @@ Partial Class Form1 Me.ProgressBar1 = New System.Windows.Forms.ProgressBar() Me.WavWorker = New System.ComponentModel.BackgroundWorker() Me.PollRelayWorker = New System.ComponentModel.BackgroundWorker() - Me.ChangeDirButton = New System.Windows.Forms.Button() + Me.SettingsButton = New System.Windows.Forms.Button() Me.TrackContextMenu = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ContextDelete = New System.Windows.Forms.ToolStripMenuItem() Me.GoToToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() @@ -174,15 +174,15 @@ Partial Class Form1 Me.PollRelayWorker.WorkerReportsProgress = True Me.PollRelayWorker.WorkerSupportsCancellation = True ' - 'ChangeDirButton + 'SettingsButton ' - Me.ChangeDirButton.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.ChangeDirButton.Location = New System.Drawing.Point(497, 10) - Me.ChangeDirButton.Name = "ChangeDirButton" - Me.ChangeDirButton.Size = New System.Drawing.Size(75, 23) - Me.ChangeDirButton.TabIndex = 7 - Me.ChangeDirButton.Text = "Settings" - Me.ChangeDirButton.UseVisualStyleBackColor = True + Me.SettingsButton.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.SettingsButton.Location = New System.Drawing.Point(497, 10) + Me.SettingsButton.Name = "SettingsButton" + Me.SettingsButton.Size = New System.Drawing.Size(75, 23) + Me.SettingsButton.TabIndex = 7 + Me.SettingsButton.Text = "Settings" + Me.SettingsButton.UseVisualStyleBackColor = True ' 'TrackContextMenu ' @@ -318,7 +318,7 @@ Partial Class Form1 Me.Controls.Add(Me.YTButton) Me.Controls.Add(Me.StatusLabel) Me.Controls.Add(Me.PlayKeyButton) - Me.Controls.Add(Me.ChangeDirButton) + Me.Controls.Add(Me.SettingsButton) Me.Controls.Add(Me.ProgressBar1) Me.Controls.Add(Me.StartButton) Me.Controls.Add(Me.TrackList) @@ -348,7 +348,7 @@ Partial Class Form1 Friend WithEvents ProgressBar1 As System.Windows.Forms.ProgressBar Friend WithEvents WavWorker As System.ComponentModel.BackgroundWorker Friend WithEvents PollRelayWorker As System.ComponentModel.BackgroundWorker - Friend WithEvents ChangeDirButton As System.Windows.Forms.Button + Friend WithEvents SettingsButton As System.Windows.Forms.Button Friend WithEvents TrackContextMenu As System.Windows.Forms.ContextMenuStrip Friend WithEvents ContextDelete As System.Windows.Forms.ToolStripMenuItem Friend WithEvents ContextRefresh As System.Windows.Forms.ToolStripMenuItem diff --git a/SLAM/Form1.vb b/SLAM/Form1.vb index 8e3afc0..5e7cba4 100644 --- a/SLAM/Form1.vb +++ b/SLAM/Form1.vb @@ -198,7 +198,8 @@ Public Class Form1 End Sub Private Sub YTButton_Click(sender As Object, e As EventArgs) Handles YTButton.Click - If File.Exists("NAudio.dll") AndAlso File.Exists("Newtonsoft.Json.dll") AndAlso File.Exists("NReco.VideoConverter.dll") AndAlso File.Exists("YoutubeExtractor.dll") Then + 'If File.Exists("NAudio.dll") AndAlso File.Exists("Newtonsoft.Json.dll") AndAlso File.Exists("NReco.VideoConverter.dll") AndAlso File.Exists("YoutubeExtractor.dll") Then + If File.Exists("NAudio.dll") AndAlso File.Exists("Newtonsoft.Json.dll") AndAlso File.Exists("NReco.VideoConverter.dll") AndAlso File.Exists("libvideo.dll") Then DisableInterface() Dim YTImporter As New YTImport If YTImporter.ShowDialog() = DialogResult.OK Then @@ -210,7 +211,7 @@ Public Class Form1 End If Else - MessageBox.Show("You are missing either NAudio.dll, Newtonsoft.Json.dll, NReco.VideoConverter.dll, or YoutubeExtractor.dll! Cannot import from YouTube without them!", "Missing File(s)", MessageBoxButtons.OK, MessageBoxIcon.Error) + MessageBox.Show("You are missing either NAudio.dll, Newtonsoft.Json.dll, NReco.VideoConverter.dll, or libvideo.dll! Cannot import from YouTube without them!", "Missing File(s)", MessageBoxButtons.OK, MessageBoxIcon.Error) End If End Sub @@ -824,9 +825,36 @@ Public Class Form1 End Sub Private Sub TrackList_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles TrackList.MouseDoubleClick - If TrackList.FocusedItem.Bounds.Contains(e.Location) AndAlso status = WORKING Then - LoadTrack(GetCurrentGame, TrackList.SelectedItems(0).Index) - DisplayLoaded(TrackList.SelectedItems(0).Index) + Const TRACK = 1 + Const BIND = 2 + Const VOLUME = 3 + Const TRIMMED = 4 + + If TrackList.FocusedItem.Bounds.Contains(e.Location) Then + + Dim HitTestInfo As ListViewHitTestInfo = TrackList.HitTest(e.Location) + Dim SelectedSubItem As Integer = HitTestInfo.Item.SubItems.IndexOf(HitTestInfo.SubItem) + + If status = WORKING Then + Select Case SelectedSubItem + Case VOLUME + SetVolumeToolStripMenuItem_Click(sender, Nothing) + Case Else + LoadTrack(GetCurrentGame, TrackList.SelectedItems(0).Index) + DisplayLoaded(TrackList.SelectedItems(0).Index) + End Select + Else + Select Case SelectedSubItem + Case TRACK + RenameToolStripMenuItem_Click(sender, Nothing) + Case BIND + ContextHotKey_Click(sender, Nothing) + Case VOLUME + SetVolumeToolStripMenuItem_Click(sender, Nothing) + Case TRIMMED + TrimToolStripMenuItem_Click(sender, Nothing) + End Select + End If End If End Sub @@ -916,6 +944,13 @@ Public Class Form1 Private Sub SetVolumeToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SetVolumeToolStripMenuItem.Click Dim SetVolumeDialog As New SetVolume + Const STANDARD_VOLUME = 100 + + If TrackList.SelectedItems.Count > 1 Then + SetVolumeDialog.Volume = STANDARD_VOLUME + Else + SetVolumeDialog.Volume = GetCurrentGame.tracks(TrackList.SelectedIndices(0)).volume + End If If SetVolumeDialog.ShowDialog = Windows.Forms.DialogResult.OK Then @@ -1040,7 +1075,7 @@ Public Class Form1 End If End Sub - Private Sub ChangeDirButton_Click(sender As Object, e As EventArgs) Handles ChangeDirButton.Click + Private Sub SettingsButton_Click(sender As Object, e As EventArgs) Handles SettingsButton.Click SettingsForm.ShowDialog() End Sub diff --git a/SLAM/My Project/AssemblyInfo.vb b/SLAM/My Project/AssemblyInfo.vb index bebaef0..18174c0 100644 --- a/SLAM/My Project/AssemblyInfo.vb +++ b/SLAM/My Project/AssemblyInfo.vb @@ -1,4 +1,5 @@ -Imports System +Imports System.Resources +Imports System Imports System.Reflection Imports System.Runtime.InteropServices @@ -8,12 +9,12 @@ Imports System.Runtime.InteropServices ' Review the values of the assembly attributes - - - + + + - + @@ -31,5 +32,6 @@ Imports System.Runtime.InteropServices ' by using the '*' as shown below: ' - - + + + diff --git a/SLAM/My Project/Resources.Designer.vb b/SLAM/My Project/Resources.Designer.vb index 2844198..66c87ff 100644 --- a/SLAM/My Project/Resources.Designer.vb +++ b/SLAM/My Project/Resources.Designer.vb @@ -59,5 +59,15 @@ Namespace My.Resources resourceCulture = value End Set End Property + + ''' + ''' Looks up a localized resource of type System.Drawing.Bitmap. + ''' + Friend ReadOnly Property loader() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("loader", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property End Module End Namespace diff --git a/SLAM/My Project/Resources.resx b/SLAM/My Project/Resources.resx index 2f96abe..18711c7 100644 --- a/SLAM/My Project/Resources.resx +++ b/SLAM/My Project/Resources.resx @@ -118,4 +118,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\generated-image.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/SLAM/My Project/app.manifest b/SLAM/My Project/app.manifest index 7024a5f..a1705aa 100644 --- a/SLAM/My Project/app.manifest +++ b/SLAM/My Project/app.manifest @@ -1,6 +1,6 @@  - + @@ -18,29 +18,26 @@ --> + + + + - - - - - - - - - + \ No newline at end of file diff --git a/SLAM/RenameForm.Designer.vb b/SLAM/RenameForm.Designer.vb index 2faaba2..568c867 100644 --- a/SLAM/RenameForm.Designer.vb +++ b/SLAM/RenameForm.Designer.vb @@ -61,6 +61,8 @@ Partial Class RenameForm Me.Controls.Add(Me.DoneButton) Me.Controls.Add(Me.NameBox) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False Me.Name = "RenameForm" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent Me.Text = "Rename" diff --git a/SLAM/RenameForm.vb b/SLAM/RenameForm.vb index a5861b3..e1e93da 100644 --- a/SLAM/RenameForm.vb +++ b/SLAM/RenameForm.vb @@ -11,7 +11,17 @@ End If End Sub + Private Sub RenameForm_KeyDown(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown + Select Case e.KeyCode + Case Keys.Enter + DoneButton_Click(sender, Nothing) + Case Keys.Escape + DialogResult = Windows.Forms.DialogResult.Cancel + End Select + End Sub + Private Sub RenameForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load NameBox.Text = filename + KeyPreview = True End Sub End Class \ No newline at end of file diff --git a/SLAM/Resources/generated-image.gif b/SLAM/Resources/generated-image.gif new file mode 100644 index 0000000..ed65b70 Binary files /dev/null and b/SLAM/Resources/generated-image.gif differ diff --git a/SLAM/Resources/lg.-text-entering-comment-loader.gif b/SLAM/Resources/lg.-text-entering-comment-loader.gif new file mode 100644 index 0000000..5d5c0ff Binary files /dev/null and b/SLAM/Resources/lg.-text-entering-comment-loader.gif differ diff --git a/SLAM/Resources/loader.gif b/SLAM/Resources/loader.gif new file mode 100644 index 0000000..d07c656 Binary files /dev/null and b/SLAM/Resources/loader.gif differ diff --git a/SLAM/SLAM.vbproj b/SLAM/SLAM.vbproj index 542c0c3..9601308 100644 --- a/SLAM/SLAM.vbproj +++ b/SLAM/SLAM.vbproj @@ -24,8 +24,9 @@ false true 0 - 1.0.0.%2a + 1.7.0.%2a false + true true @@ -67,31 +68,58 @@ My Project\app.manifest + + 85D160D187C4B057694701055638D5A076F2B4D1 + + + SLAM_TemporaryKey.pfx + + + false + + + false + + + Internet + + + false + + + ..\packages\VideoLibrary.3.0.6\lib\netstandard1.1\libvideo.dll + + + ..\packages\VideoLibrary.Compat.3.0.6\lib\netstandard1.1\libvideo.compat.dll + lib\NAudio.dll - - lib\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll lib\NReco.VideoConverter.dll + + + + + ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll + - - lib\YoutubeExtractor.dll - @@ -214,8 +242,13 @@ Designer + + + + + @@ -235,9 +268,7 @@ false - - - +