diff --git a/COM350/Project1/Project1/MainForm.Designer.vb b/COM350/Project1/Project1/MainForm.Designer.vb new file mode 100644 index 0000000..2161e5a --- /dev/null +++ b/COM350/Project1/Project1/MainForm.Designer.vb @@ -0,0 +1,230 @@ + _ +Partial Class MainForm + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.MenuStrip1 = New System.Windows.Forms.MenuStrip() + Me.FileToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ExitToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.OptionsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.DefaultToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ListBox1 = New System.Windows.Forms.ListBox() + Me.ListBox2 = New System.Windows.Forms.ListBox() + Me.Label1 = New System.Windows.Forms.Label() + Me.Label2 = New System.Windows.Forms.Label() + Me.Label3 = New System.Windows.Forms.Label() + Me.Label4 = New System.Windows.Forms.Label() + Me.Button1 = New System.Windows.Forms.Button() + Me.Button2 = New System.Windows.Forms.Button() + Me.Button3 = New System.Windows.Forms.Button() + Me.Button4 = New System.Windows.Forms.Button() + Me.GroupBox1.SuspendLayout() + Me.MenuStrip1.SuspendLayout() + Me.SuspendLayout() + ' + 'GroupBox1 + ' + Me.GroupBox1.Controls.Add(Me.Button4) + Me.GroupBox1.Controls.Add(Me.Button3) + Me.GroupBox1.Controls.Add(Me.Button2) + Me.GroupBox1.Controls.Add(Me.Button1) + Me.GroupBox1.Controls.Add(Me.Label3) + Me.GroupBox1.Controls.Add(Me.Label4) + Me.GroupBox1.Controls.Add(Me.Label2) + Me.GroupBox1.Controls.Add(Me.Label1) + Me.GroupBox1.Controls.Add(Me.ListBox2) + Me.GroupBox1.Controls.Add(Me.ListBox1) + Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Fill + Me.GroupBox1.Location = New System.Drawing.Point(0, 24) + Me.GroupBox1.Name = "GroupBox1" + Me.GroupBox1.Size = New System.Drawing.Size(686, 427) + Me.GroupBox1.TabIndex = 0 + Me.GroupBox1.TabStop = False + Me.GroupBox1.Text = "MP3 Player" + ' + 'MenuStrip1 + ' + Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.FileToolStripMenuItem, Me.OptionsToolStripMenuItem}) + Me.MenuStrip1.Location = New System.Drawing.Point(0, 0) + Me.MenuStrip1.Name = "MenuStrip1" + Me.MenuStrip1.Size = New System.Drawing.Size(686, 24) + Me.MenuStrip1.TabIndex = 1 + Me.MenuStrip1.Text = "MenuStrip1" + ' + 'FileToolStripMenuItem + ' + Me.FileToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ExitToolStripMenuItem}) + Me.FileToolStripMenuItem.Name = "FileToolStripMenuItem" + Me.FileToolStripMenuItem.Size = New System.Drawing.Size(37, 20) + Me.FileToolStripMenuItem.Text = "&File" + ' + 'ExitToolStripMenuItem + ' + Me.ExitToolStripMenuItem.Name = "ExitToolStripMenuItem" + Me.ExitToolStripMenuItem.Size = New System.Drawing.Size(92, 22) + Me.ExitToolStripMenuItem.Text = "E&xit" + ' + 'OptionsToolStripMenuItem + ' + Me.OptionsToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DefaultToolStripMenuItem}) + Me.OptionsToolStripMenuItem.Name = "OptionsToolStripMenuItem" + Me.OptionsToolStripMenuItem.Size = New System.Drawing.Size(61, 20) + Me.OptionsToolStripMenuItem.Text = "&Options" + ' + 'DefaultToolStripMenuItem + ' + Me.DefaultToolStripMenuItem.Name = "DefaultToolStripMenuItem" + Me.DefaultToolStripMenuItem.Size = New System.Drawing.Size(152, 22) + Me.DefaultToolStripMenuItem.Text = "&Default" + ' + 'ListBox1 + ' + Me.ListBox1.FormattingEnabled = True + Me.ListBox1.HorizontalScrollbar = True + Me.ListBox1.Location = New System.Drawing.Point(14, 79) + Me.ListBox1.Name = "ListBox1" + Me.ListBox1.ScrollAlwaysVisible = True + Me.ListBox1.Size = New System.Drawing.Size(269, 329) + Me.ListBox1.TabIndex = 0 + ' + 'ListBox2 + ' + Me.ListBox2.FormattingEnabled = True + Me.ListBox2.HorizontalScrollbar = True + Me.ListBox2.Location = New System.Drawing.Point(411, 79) + Me.ListBox2.Name = "ListBox2" + Me.ListBox2.ScrollAlwaysVisible = True + Me.ListBox2.Size = New System.Drawing.Size(263, 329) + Me.ListBox2.TabIndex = 1 + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.Location = New System.Drawing.Point(408, 60) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(71, 13) + Me.Label1.TabIndex = 2 + Me.Label1.Text = "Playlist Time: " + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.Location = New System.Drawing.Point(485, 60) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(28, 13) + Me.Label2.TabIndex = 3 + Me.Label2.Text = "0:00" + ' + 'Label3 + ' + Me.Label3.AutoSize = True + Me.Label3.Location = New System.Drawing.Point(80, 60) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(28, 13) + Me.Label3.TabIndex = 5 + Me.Label3.Text = "0:00" + ' + 'Label4 + ' + Me.Label4.AutoSize = True + Me.Label4.Location = New System.Drawing.Point(11, 60) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(63, 13) + Me.Label4.TabIndex = 4 + Me.Label4.Text = "Total Time: " + ' + 'Button1 + ' + Me.Button1.Location = New System.Drawing.Point(311, 116) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(75, 23) + Me.Button1.TabIndex = 6 + Me.Button1.Text = ">" + Me.Button1.UseVisualStyleBackColor = True + ' + 'Button2 + ' + Me.Button2.Location = New System.Drawing.Point(311, 145) + Me.Button2.Name = "Button2" + Me.Button2.Size = New System.Drawing.Size(75, 23) + Me.Button2.TabIndex = 7 + Me.Button2.Text = ">>" + Me.Button2.UseVisualStyleBackColor = True + ' + 'Button3 + ' + Me.Button3.Enabled = False + Me.Button3.Location = New System.Drawing.Point(311, 318) + Me.Button3.Name = "Button3" + Me.Button3.Size = New System.Drawing.Size(75, 23) + Me.Button3.TabIndex = 8 + Me.Button3.Text = "<<" + Me.Button3.UseVisualStyleBackColor = True + ' + 'Button4 + ' + Me.Button4.Enabled = False + Me.Button4.Location = New System.Drawing.Point(311, 347) + Me.Button4.Name = "Button4" + Me.Button4.Size = New System.Drawing.Size(75, 23) + Me.Button4.TabIndex = 9 + Me.Button4.Text = "<" + Me.Button4.UseVisualStyleBackColor = True + ' + 'MainForm + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.BackColor = System.Drawing.Color.White + Me.ClientSize = New System.Drawing.Size(686, 451) + Me.Controls.Add(Me.GroupBox1) + Me.Controls.Add(Me.MenuStrip1) + Me.MainMenuStrip = Me.MenuStrip1 + Me.Name = "MainForm" + Me.Text = "Project 1" + Me.GroupBox1.ResumeLayout(False) + Me.GroupBox1.PerformLayout() + Me.MenuStrip1.ResumeLayout(False) + Me.MenuStrip1.PerformLayout() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox + Friend WithEvents MenuStrip1 As System.Windows.Forms.MenuStrip + Friend WithEvents FileToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents OptionsToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents ExitToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents DefaultToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents Label3 As System.Windows.Forms.Label + Friend WithEvents Label4 As System.Windows.Forms.Label + Friend WithEvents Label2 As System.Windows.Forms.Label + Friend WithEvents Label1 As System.Windows.Forms.Label + Friend WithEvents ListBox2 As System.Windows.Forms.ListBox + Friend WithEvents ListBox1 As System.Windows.Forms.ListBox + Friend WithEvents Button4 As System.Windows.Forms.Button + Friend WithEvents Button3 As System.Windows.Forms.Button + Friend WithEvents Button2 As System.Windows.Forms.Button + Friend WithEvents Button1 As System.Windows.Forms.Button + +End Class diff --git a/COM350/Project1/Project1/MainForm.resx b/COM350/Project1/Project1/MainForm.resx new file mode 100644 index 0000000..bb70361 --- /dev/null +++ b/COM350/Project1/Project1/MainForm.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/COM350/Project1/Project1/MainForm.vb b/COM350/Project1/Project1/MainForm.vb new file mode 100644 index 0000000..7928628 --- /dev/null +++ b/COM350/Project1/Project1/MainForm.vb @@ -0,0 +1,18 @@ +Public Class MainForm + + + Private Sub ExitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ExitToolStripMenuItem.Click + Application.Exit() + End Sub + + Private Sub DefaultToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DefaultToolStripMenuItem.Click + Dim lnof = New OptionsForm(Me) + lnof.Show() + End Sub + + Public Sub SubFormCallback() + MessageBox.Show("Do we halt here", "I dunno", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) + End Sub + + +End Class diff --git a/COM350/Project1/Project1/Options.vb b/COM350/Project1/Project1/Options.vb new file mode 100644 index 0000000..050516a --- /dev/null +++ b/COM350/Project1/Project1/Options.vb @@ -0,0 +1,35 @@ +Module Options + + Private _Directory As String + Public Property Directory() As String + Get + Return _Directory + End Get + Set(ByVal value As String) + _Directory = value + End Set + End Property + + Private _PlaylistLength As Integer + Public Property PlaylistLength() As Integer + Get + Return _PlaylistLength + End Get + Set(ByVal value As Integer) + _PlaylistLength = value + End Set + End Property + + Private _SongGap As Integer + Public Property SongGap() As Integer + Get + Return _SongGap + End Get + Set(ByVal value As Integer) + _SongGap = value + End Set + End Property + + + +End Module diff --git a/COM350/Project1/Project1/OptionsForm.Designer.vb b/COM350/Project1/Project1/OptionsForm.Designer.vb new file mode 100644 index 0000000..bececa7 --- /dev/null +++ b/COM350/Project1/Project1/OptionsForm.Designer.vb @@ -0,0 +1,186 @@ + _ +Partial Class OptionsForm + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.Label1 = New System.Windows.Forms.Label() + Me.TextBox1 = New System.Windows.Forms.TextBox() + Me.Button1 = New System.Windows.Forms.Button() + Me.Label2 = New System.Windows.Forms.Label() + Me.NumericUpDown1 = New System.Windows.Forms.NumericUpDown() + Me.Label3 = New System.Windows.Forms.Label() + Me.Label4 = New System.Windows.Forms.Label() + Me.Label5 = New System.Windows.Forms.Label() + Me.Button2 = New System.Windows.Forms.Button() + Me.Button3 = New System.Windows.Forms.Button() + Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker() + Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog() + CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'Label1 + ' + Me.Label1.AutoSize = True + Me.Label1.Location = New System.Drawing.Point(25, 38) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(104, 13) + Me.Label1.TabIndex = 0 + Me.Label1.Text = "Directory with MP3s:" + ' + 'TextBox1 + ' + Me.TextBox1.Location = New System.Drawing.Point(135, 35) + Me.TextBox1.Name = "TextBox1" + Me.TextBox1.Size = New System.Drawing.Size(323, 20) + Me.TextBox1.TabIndex = 1 + ' + 'Button1 + ' + Me.Button1.Location = New System.Drawing.Point(472, 33) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(75, 23) + Me.Button1.TabIndex = 2 + Me.Button1.Text = "&Browse..." + Me.Button1.UseVisualStyleBackColor = True + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.Location = New System.Drawing.Point(68, 73) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(61, 13) + Me.Label2.TabIndex = 3 + Me.Label2.Text = "Song Gap: " + ' + 'NumericUpDown1 + ' + Me.NumericUpDown1.Location = New System.Drawing.Point(135, 71) + Me.NumericUpDown1.Name = "NumericUpDown1" + Me.NumericUpDown1.Size = New System.Drawing.Size(75, 20) + Me.NumericUpDown1.TabIndex = 4 + ' + 'Label3 + ' + Me.Label3.AutoSize = True + Me.Label3.Location = New System.Drawing.Point(216, 73) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(47, 13) + Me.Label3.TabIndex = 5 + Me.Label3.Text = "seconds" + ' + 'Label4 + ' + Me.Label4.AutoSize = True + Me.Label4.Location = New System.Drawing.Point(12, 105) + Me.Label4.Name = "Label4" + Me.Label4.Size = New System.Drawing.Size(117, 13) + Me.Label4.TabIndex = 6 + Me.Label4.Text = "Desired Playlist Length:" + ' + 'Label5 + ' + Me.Label5.AutoSize = True + Me.Label5.Location = New System.Drawing.Point(216, 105) + Me.Label5.Name = "Label5" + Me.Label5.Size = New System.Drawing.Size(121, 13) + Me.Label5.TabIndex = 8 + Me.Label5.Text = "hours, minutes, seconds" + ' + 'Button2 + ' + Me.Button2.Location = New System.Drawing.Point(188, 142) + Me.Button2.Name = "Button2" + Me.Button2.Size = New System.Drawing.Size(75, 23) + Me.Button2.TabIndex = 9 + Me.Button2.Text = "&Save" + Me.Button2.UseVisualStyleBackColor = True + ' + 'Button3 + ' + Me.Button3.DialogResult = System.Windows.Forms.DialogResult.Cancel + Me.Button3.Location = New System.Drawing.Point(292, 142) + Me.Button3.Name = "Button3" + Me.Button3.Size = New System.Drawing.Size(75, 23) + Me.Button3.TabIndex = 10 + Me.Button3.Text = "&Cancel" + Me.Button3.UseVisualStyleBackColor = True + ' + 'DateTimePicker1 + ' + Me.DateTimePicker1.CustomFormat = "HH:mm:ss" + Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom + Me.DateTimePicker1.Location = New System.Drawing.Point(135, 105) + Me.DateTimePicker1.Name = "DateTimePicker1" + Me.DateTimePicker1.ShowUpDown = True + Me.DateTimePicker1.Size = New System.Drawing.Size(75, 20) + Me.DateTimePicker1.TabIndex = 11 + Me.DateTimePicker1.Value = New Date(2015, 3, 31, 0, 20, 0, 0) + ' + 'FolderBrowserDialog1 + ' + Me.FolderBrowserDialog1.Description = "MP3 Folder" + Me.FolderBrowserDialog1.RootFolder = System.Environment.SpecialFolder.MyComputer + Me.FolderBrowserDialog1.ShowNewFolderButton = False + ' + 'OptionsForm + ' + Me.AcceptButton = Me.Button2 + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.CancelButton = Me.Button3 + Me.ClientSize = New System.Drawing.Size(559, 177) + Me.Controls.Add(Me.DateTimePicker1) + Me.Controls.Add(Me.Button3) + Me.Controls.Add(Me.Button2) + Me.Controls.Add(Me.Label5) + Me.Controls.Add(Me.Label4) + Me.Controls.Add(Me.Label3) + Me.Controls.Add(Me.NumericUpDown1) + Me.Controls.Add(Me.Label2) + Me.Controls.Add(Me.Button1) + Me.Controls.Add(Me.TextBox1) + Me.Controls.Add(Me.Label1) + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "OptionsForm" + Me.ShowIcon = False + Me.ShowInTaskbar = False + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent + Me.Text = "Options" + CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + Friend WithEvents Label1 As System.Windows.Forms.Label + Friend WithEvents TextBox1 As System.Windows.Forms.TextBox + Friend WithEvents Button1 As System.Windows.Forms.Button + Friend WithEvents Label2 As System.Windows.Forms.Label + Friend WithEvents NumericUpDown1 As System.Windows.Forms.NumericUpDown + Friend WithEvents Label3 As System.Windows.Forms.Label + Friend WithEvents Label4 As System.Windows.Forms.Label + Friend WithEvents Label5 As System.Windows.Forms.Label + Friend WithEvents Button2 As System.Windows.Forms.Button + Friend WithEvents Button3 As System.Windows.Forms.Button + Friend WithEvents DateTimePicker1 As System.Windows.Forms.DateTimePicker + Friend WithEvents FolderBrowserDialog1 As System.Windows.Forms.FolderBrowserDialog +End Class diff --git a/COM350/Project1/Project1/OptionsForm.resx b/COM350/Project1/Project1/OptionsForm.resx new file mode 100644 index 0000000..73bd48b --- /dev/null +++ b/COM350/Project1/Project1/OptionsForm.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/COM350/Project1/Project1/OptionsForm.vb b/COM350/Project1/Project1/OptionsForm.vb new file mode 100644 index 0000000..55e3295 --- /dev/null +++ b/COM350/Project1/Project1/OptionsForm.vb @@ -0,0 +1,33 @@ +Public Class OptionsForm + + Private CallbackForm As MainForm + + Sub New() + InitializeComponent() + End Sub + + Sub New(ByVal mainform As Form) + InitializeComponent() + CallbackForm = mainform + End Sub + + + Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click + CallbackForm.SubFormCallback() + Me.Close() + End Sub + + Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click + Options.Directory = TextBox1.Text + Options.SongGap = NumericUpDown1.Value + Options.PlaylistLength = 1 + CallbackForm.SubFormCallback() + Me.Close() + End Sub + + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + If (FolderBrowserDialog1.ShowDialog = Windows.Forms.DialogResult.OK) Then + TextBox1.Text = FolderBrowserDialog1.SelectedPath + End If + End Sub +End Class \ No newline at end of file