diff --git a/MusicPlayer/MusicPlayer/AudioHandler.cs b/MusicPlayer/MusicPlayer/AudioHandler.cs
index db37cef..e931125 100755
--- a/MusicPlayer/MusicPlayer/AudioHandler.cs
+++ b/MusicPlayer/MusicPlayer/AudioHandler.cs
@@ -38,7 +38,7 @@ namespace MusicPlayer
private Thread network;
private Thread audio;
- private Song CurrentSong;
+ public Song CurrentSong;
public AudioHandler()
{
diff --git a/MusicPlayer/MusicPlayer/Main.cs b/MusicPlayer/MusicPlayer/Main.cs
index c791b33..c1fc010 100755
--- a/MusicPlayer/MusicPlayer/Main.cs
+++ b/MusicPlayer/MusicPlayer/Main.cs
@@ -25,7 +25,7 @@ namespace MusicPlayer
audio = new AudioHandler();
table = new SongsTable();
form.SongsTableView.DataSource = table;
- form.SongsTableView.Columns[4].Visible = false;
+ form.SongsTableView.Columns[5].Visible = false;
Populate();
}
@@ -62,6 +62,24 @@ namespace MusicPlayer
table.Add(s);
});
}
+
+ public static string SecondsToTimestamp(int seconds)
+ {
+ string str = "";
+
+ //Hours
+ str += (seconds / 3600).ToString("D2") + ":";
+ seconds %= 3600;
+
+ //Minutes
+ str += (seconds / 60).ToString("D2") + ":";
+ seconds %= 60;
+
+ //Seconds
+ str += seconds.ToString("D2");
+
+ return str;
+ }
}
}
diff --git a/MusicPlayer/MusicPlayer/MainForm.Designer.cs b/MusicPlayer/MusicPlayer/MainForm.Designer.cs
index 5792ac0..c70b9d7 100644
--- a/MusicPlayer/MusicPlayer/MainForm.Designer.cs
+++ b/MusicPlayer/MusicPlayer/MainForm.Designer.cs
@@ -35,27 +35,31 @@
this.AlbumListView = new System.Windows.Forms.ListView();
this.ArtistListBox = new System.Windows.Forms.ListBox();
this.MainPanel = new System.Windows.Forms.Panel();
+ this.AlbumListLabel = new System.Windows.Forms.Label();
+ this.ArtistListLabel = new System.Windows.Forms.Label();
+ this.GenreListLabel = new System.Windows.Forms.Label();
+ this.PlaylistBox = new System.Windows.Forms.ListBox();
this.MenuStrip = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.playlistsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.overviewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ControlsPanel = new System.Windows.Forms.Panel();
+ this.CurrentSongLabel = new System.Windows.Forms.Label();
+ this.SeperatorLabel = new System.Windows.Forms.Label();
this.LabelTotalTime = new System.Windows.Forms.Label();
this.LabelCurrentTime = new System.Windows.Forms.Label();
this.PositionTrackBar = new System.Windows.Forms.TrackBar();
- this.PositionLabel = new System.Windows.Forms.Label();
this.BufferLabel = new System.Windows.Forms.Label();
- this.PositionBar = new System.Windows.Forms.ProgressBar();
this.BufferBar = new System.Windows.Forms.ProgressBar();
this.StopButton = new System.Windows.Forms.Button();
this.PauseButton = new System.Windows.Forms.Button();
this.PlayButton = new System.Windows.Forms.Button();
this.UpdateTimer = new System.Windows.Forms.Timer(this.components);
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
- this.playlistsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.overviewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.PlaylistBox = new System.Windows.Forms.ListBox();
+ this.PlaylistListLabel = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.SongsTableView)).BeginInit();
this.MainPanel.SuspendLayout();
this.MenuStrip.SuspendLayout();
@@ -74,14 +78,14 @@
this.SongsTableView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.SongsTableView.BackgroundColor = System.Drawing.SystemColors.Control;
this.SongsTableView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- this.SongsTableView.Location = new System.Drawing.Point(12, 153);
+ this.SongsTableView.Location = new System.Drawing.Point(12, 165);
this.SongsTableView.MultiSelect = false;
this.SongsTableView.Name = "SongsTableView";
this.SongsTableView.ReadOnly = true;
this.SongsTableView.RowHeadersVisible = false;
this.SongsTableView.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.SongsTableView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
- this.SongsTableView.Size = new System.Drawing.Size(760, 148);
+ this.SongsTableView.Size = new System.Drawing.Size(760, 175);
this.SongsTableView.TabIndex = 0;
this.SongsTableView.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.SongsTableView_CellDoubleClick);
//
@@ -89,9 +93,9 @@
//
this.GenreListBox.BackColor = System.Drawing.SystemColors.Control;
this.GenreListBox.FormattingEnabled = true;
- this.GenreListBox.Location = new System.Drawing.Point(12, 12);
+ this.GenreListBox.Location = new System.Drawing.Point(12, 25);
this.GenreListBox.Name = "GenreListBox";
- this.GenreListBox.Size = new System.Drawing.Size(124, 134);
+ this.GenreListBox.Size = new System.Drawing.Size(150, 134);
this.GenreListBox.Sorted = true;
this.GenreListBox.TabIndex = 1;
this.GenreListBox.SelectedIndexChanged += new System.EventHandler(this.GenreListBox_SelectedIndexChanged);
@@ -101,9 +105,9 @@
this.AlbumListView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.AlbumListView.BackColor = System.Drawing.SystemColors.Control;
- this.AlbumListView.Location = new System.Drawing.Point(272, 12);
+ this.AlbumListView.Location = new System.Drawing.Point(324, 25);
this.AlbumListView.Name = "AlbumListView";
- this.AlbumListView.Size = new System.Drawing.Size(500, 134);
+ this.AlbumListView.Size = new System.Drawing.Size(448, 134);
this.AlbumListView.Sorting = System.Windows.Forms.SortOrder.Ascending;
this.AlbumListView.TabIndex = 2;
this.AlbumListView.UseCompatibleStateImageBehavior = false;
@@ -113,9 +117,9 @@
//
this.ArtistListBox.BackColor = System.Drawing.SystemColors.Control;
this.ArtistListBox.FormattingEnabled = true;
- this.ArtistListBox.Location = new System.Drawing.Point(142, 12);
+ this.ArtistListBox.Location = new System.Drawing.Point(168, 25);
this.ArtistListBox.Name = "ArtistListBox";
- this.ArtistListBox.Size = new System.Drawing.Size(124, 134);
+ this.ArtistListBox.Size = new System.Drawing.Size(150, 134);
this.ArtistListBox.Sorted = true;
this.ArtistListBox.TabIndex = 3;
this.ArtistListBox.SelectedIndexChanged += new System.EventHandler(this.ArtistListBox_SelectedIndexChanged);
@@ -126,6 +130,10 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.MainPanel.BackColor = System.Drawing.SystemColors.Window;
+ this.MainPanel.Controls.Add(this.PlaylistListLabel);
+ this.MainPanel.Controls.Add(this.AlbumListLabel);
+ this.MainPanel.Controls.Add(this.ArtistListLabel);
+ this.MainPanel.Controls.Add(this.GenreListLabel);
this.MainPanel.Controls.Add(this.PlaylistBox);
this.MainPanel.Controls.Add(this.GenreListBox);
this.MainPanel.Controls.Add(this.ArtistListBox);
@@ -133,12 +141,50 @@
this.MainPanel.Controls.Add(this.SongsTableView);
this.MainPanel.Location = new System.Drawing.Point(0, 24);
this.MainPanel.Name = "MainPanel";
- this.MainPanel.Size = new System.Drawing.Size(784, 313);
+ this.MainPanel.Size = new System.Drawing.Size(784, 352);
this.MainPanel.TabIndex = 5;
//
+ // AlbumListLabel
+ //
+ this.AlbumListLabel.AutoSize = true;
+ this.AlbumListLabel.Location = new System.Drawing.Point(321, 9);
+ this.AlbumListLabel.Name = "AlbumListLabel";
+ this.AlbumListLabel.Size = new System.Drawing.Size(36, 13);
+ this.AlbumListLabel.TabIndex = 6;
+ this.AlbumListLabel.Text = "Album";
+ //
+ // ArtistListLabel
+ //
+ this.ArtistListLabel.AutoSize = true;
+ this.ArtistListLabel.Location = new System.Drawing.Point(165, 9);
+ this.ArtistListLabel.Name = "ArtistListLabel";
+ this.ArtistListLabel.Size = new System.Drawing.Size(30, 13);
+ this.ArtistListLabel.TabIndex = 5;
+ this.ArtistListLabel.Text = "Artist";
+ //
+ // GenreListLabel
+ //
+ this.GenreListLabel.AutoSize = true;
+ this.GenreListLabel.Location = new System.Drawing.Point(12, 9);
+ this.GenreListLabel.Name = "GenreListLabel";
+ this.GenreListLabel.Size = new System.Drawing.Size(36, 13);
+ this.GenreListLabel.TabIndex = 4;
+ this.GenreListLabel.Text = "Genre";
+ //
+ // PlaylistBox
+ //
+ this.PlaylistBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.PlaylistBox.FormattingEnabled = true;
+ this.PlaylistBox.Location = new System.Drawing.Point(12, 25);
+ this.PlaylistBox.Name = "PlaylistBox";
+ this.PlaylistBox.Size = new System.Drawing.Size(760, 134);
+ this.PlaylistBox.TabIndex = 4;
+ this.PlaylistBox.Visible = false;
+ //
// MenuStrip
//
- this.MenuStrip.BackColor = System.Drawing.SystemColors.Window;
+ this.MenuStrip.BackColor = System.Drawing.SystemColors.WindowFrame;
this.MenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileToolStripMenuItem,
this.viewToolStripMenuItem});
@@ -160,13 +206,13 @@
// openToolStripMenuItem
//
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
- this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.openToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.openToolStripMenuItem.Text = "Open";
//
// saveToolStripMenuItem
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
- this.saveToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.saveToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.saveToolStripMenuItem.Text = "Save";
//
// viewToolStripMenuItem
@@ -178,29 +224,61 @@
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.viewToolStripMenuItem.Text = "View";
//
+ // playlistsToolStripMenuItem
+ //
+ this.playlistsToolStripMenuItem.Name = "playlistsToolStripMenuItem";
+ this.playlistsToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
+ this.playlistsToolStripMenuItem.Text = "Playlists";
+ this.playlistsToolStripMenuItem.Click += new System.EventHandler(this.playlistsToolStripMenuItem_Click);
+ //
+ // overviewToolStripMenuItem
+ //
+ this.overviewToolStripMenuItem.Name = "overviewToolStripMenuItem";
+ this.overviewToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
+ this.overviewToolStripMenuItem.Text = "Overview";
+ this.overviewToolStripMenuItem.Click += new System.EventHandler(this.overviewToolStripMenuItem_Click);
+ //
// ControlsPanel
//
this.ControlsPanel.BackColor = System.Drawing.SystemColors.WindowFrame;
+ this.ControlsPanel.Controls.Add(this.CurrentSongLabel);
+ this.ControlsPanel.Controls.Add(this.SeperatorLabel);
this.ControlsPanel.Controls.Add(this.LabelTotalTime);
this.ControlsPanel.Controls.Add(this.LabelCurrentTime);
this.ControlsPanel.Controls.Add(this.PositionTrackBar);
- this.ControlsPanel.Controls.Add(this.PositionLabel);
this.ControlsPanel.Controls.Add(this.BufferLabel);
- this.ControlsPanel.Controls.Add(this.PositionBar);
this.ControlsPanel.Controls.Add(this.BufferBar);
this.ControlsPanel.Controls.Add(this.StopButton);
this.ControlsPanel.Controls.Add(this.PauseButton);
this.ControlsPanel.Controls.Add(this.PlayButton);
this.ControlsPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.ControlsPanel.Location = new System.Drawing.Point(0, 343);
+ this.ControlsPanel.Location = new System.Drawing.Point(0, 379);
this.ControlsPanel.Name = "ControlsPanel";
- this.ControlsPanel.Size = new System.Drawing.Size(784, 119);
+ this.ControlsPanel.Size = new System.Drawing.Size(784, 83);
this.ControlsPanel.TabIndex = 4;
//
+ // CurrentSongLabel
+ //
+ this.CurrentSongLabel.AutoSize = true;
+ this.CurrentSongLabel.Location = new System.Drawing.Point(256, 56);
+ this.CurrentSongLabel.Name = "CurrentSongLabel";
+ this.CurrentSongLabel.Size = new System.Drawing.Size(111, 13);
+ this.CurrentSongLabel.TabIndex = 11;
+ this.CurrentSongLabel.Text = "Not playing any songs";
+ //
+ // SeperatorLabel
+ //
+ this.SeperatorLabel.AutoSize = true;
+ this.SeperatorLabel.Location = new System.Drawing.Point(67, 35);
+ this.SeperatorLabel.Name = "SeperatorLabel";
+ this.SeperatorLabel.Size = new System.Drawing.Size(12, 13);
+ this.SeperatorLabel.TabIndex = 10;
+ this.SeperatorLabel.Text = "/";
+ //
// LabelTotalTime
//
this.LabelTotalTime.AutoSize = true;
- this.LabelTotalTime.Location = new System.Drawing.Point(693, 60);
+ this.LabelTotalTime.Location = new System.Drawing.Point(85, 35);
this.LabelTotalTime.Name = "LabelTotalTime";
this.LabelTotalTime.Size = new System.Drawing.Size(49, 13);
this.LabelTotalTime.TabIndex = 9;
@@ -209,7 +287,7 @@
// LabelCurrentTime
//
this.LabelCurrentTime.AutoSize = true;
- this.LabelCurrentTime.Location = new System.Drawing.Point(358, 60);
+ this.LabelCurrentTime.Location = new System.Drawing.Point(12, 35);
this.LabelCurrentTime.Name = "LabelCurrentTime";
this.LabelCurrentTime.Size = new System.Drawing.Size(49, 13);
this.LabelCurrentTime.TabIndex = 8;
@@ -217,48 +295,36 @@
//
// PositionTrackBar
//
+ this.PositionTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.PositionTrackBar.Enabled = false;
- this.PositionTrackBar.Location = new System.Drawing.Point(346, 13);
+ this.PositionTrackBar.Location = new System.Drawing.Point(3, 3);
this.PositionTrackBar.Maximum = 100;
this.PositionTrackBar.Name = "PositionTrackBar";
- this.PositionTrackBar.Size = new System.Drawing.Size(426, 45);
+ this.PositionTrackBar.Size = new System.Drawing.Size(778, 45);
this.PositionTrackBar.TabIndex = 7;
//
- // PositionLabel
- //
- this.PositionLabel.AutoSize = true;
- this.PositionLabel.Location = new System.Drawing.Point(285, 90);
- this.PositionLabel.Name = "PositionLabel";
- this.PositionLabel.Size = new System.Drawing.Size(44, 13);
- this.PositionLabel.TabIndex = 6;
- this.PositionLabel.Text = "Position";
- //
// BufferLabel
//
+ this.BufferLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BufferLabel.AutoSize = true;
- this.BufferLabel.Location = new System.Drawing.Point(285, 60);
+ this.BufferLabel.Location = new System.Drawing.Point(597, 56);
this.BufferLabel.Name = "BufferLabel";
this.BufferLabel.Size = new System.Drawing.Size(35, 13);
this.BufferLabel.TabIndex = 5;
this.BufferLabel.Text = "Buffer";
//
- // PositionBar
- //
- this.PositionBar.Location = new System.Drawing.Point(13, 90);
- this.PositionBar.Name = "PositionBar";
- this.PositionBar.Size = new System.Drawing.Size(265, 23);
- this.PositionBar.TabIndex = 4;
- //
// BufferBar
//
- this.BufferBar.Location = new System.Drawing.Point(13, 60);
+ this.BufferBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.BufferBar.Location = new System.Drawing.Point(638, 51);
this.BufferBar.Name = "BufferBar";
- this.BufferBar.Size = new System.Drawing.Size(265, 23);
+ this.BufferBar.Size = new System.Drawing.Size(134, 23);
this.BufferBar.TabIndex = 3;
//
// StopButton
//
- this.StopButton.Location = new System.Drawing.Point(203, 13);
+ this.StopButton.Location = new System.Drawing.Point(174, 51);
this.StopButton.Name = "StopButton";
this.StopButton.Size = new System.Drawing.Size(75, 23);
this.StopButton.TabIndex = 2;
@@ -268,7 +334,7 @@
//
// PauseButton
//
- this.PauseButton.Location = new System.Drawing.Point(108, 13);
+ this.PauseButton.Location = new System.Drawing.Point(93, 51);
this.PauseButton.Name = "PauseButton";
this.PauseButton.Size = new System.Drawing.Size(75, 23);
this.PauseButton.TabIndex = 1;
@@ -278,7 +344,7 @@
//
// PlayButton
//
- this.PlayButton.Location = new System.Drawing.Point(12, 13);
+ this.PlayButton.Location = new System.Drawing.Point(12, 51);
this.PlayButton.Name = "PlayButton";
this.PlayButton.Size = new System.Drawing.Size(75, 23);
this.PlayButton.TabIndex = 0;
@@ -298,28 +364,15 @@
this.notifyIcon1.Visible = true;
this.notifyIcon1.Click += new System.EventHandler(this.notifyIcon1_Click);
//
- // playlistsToolStripMenuItem
+ // PlaylistListLabel
//
- this.playlistsToolStripMenuItem.Name = "playlistsToolStripMenuItem";
- this.playlistsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.playlistsToolStripMenuItem.Text = "Playlists";
- this.playlistsToolStripMenuItem.Click += new System.EventHandler(this.playlistsToolStripMenuItem_Click);
- //
- // overviewToolStripMenuItem
- //
- this.overviewToolStripMenuItem.Name = "overviewToolStripMenuItem";
- this.overviewToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.overviewToolStripMenuItem.Text = "Overview";
- this.overviewToolStripMenuItem.Click += new System.EventHandler(this.overviewToolStripMenuItem_Click);
- //
- // PlaylistBox
- //
- this.PlaylistBox.FormattingEnabled = true;
- this.PlaylistBox.Location = new System.Drawing.Point(12, 12);
- this.PlaylistBox.Name = "PlaylistBox";
- this.PlaylistBox.Size = new System.Drawing.Size(377, 134);
- this.PlaylistBox.TabIndex = 4;
- this.PlaylistBox.Visible = false;
+ this.PlaylistListLabel.AutoSize = true;
+ this.PlaylistListLabel.Location = new System.Drawing.Point(12, 8);
+ this.PlaylistListLabel.Name = "PlaylistListLabel";
+ this.PlaylistListLabel.Size = new System.Drawing.Size(39, 13);
+ this.PlaylistListLabel.TabIndex = 7;
+ this.PlaylistListLabel.Text = "Playlist";
+ this.PlaylistListLabel.Visible = false;
//
// MainForm
//
@@ -337,6 +390,7 @@
this.Load += new System.EventHandler(this.MainForm_Load);
((System.ComponentModel.ISupportInitialize)(this.SongsTableView)).EndInit();
this.MainPanel.ResumeLayout(false);
+ this.MainPanel.PerformLayout();
this.MenuStrip.ResumeLayout(false);
this.MenuStrip.PerformLayout();
this.ControlsPanel.ResumeLayout(false);
@@ -363,18 +417,22 @@
private System.Windows.Forms.Button PlayButton;
private System.Windows.Forms.Button StopButton;
private System.Windows.Forms.Button PauseButton;
- private System.Windows.Forms.Label PositionLabel;
private System.Windows.Forms.Label BufferLabel;
- private System.Windows.Forms.ProgressBar PositionBar;
private System.Windows.Forms.ProgressBar BufferBar;
private System.Windows.Forms.Timer UpdateTimer;
private System.Windows.Forms.TrackBar PositionTrackBar;
private System.Windows.Forms.Label LabelTotalTime;
private System.Windows.Forms.Label LabelCurrentTime;
private System.Windows.Forms.NotifyIcon notifyIcon1;
+ private System.Windows.Forms.Label CurrentSongLabel;
+ private System.Windows.Forms.Label SeperatorLabel;
+ private System.Windows.Forms.Label AlbumListLabel;
+ private System.Windows.Forms.Label ArtistListLabel;
+ private System.Windows.Forms.Label GenreListLabel;
private System.Windows.Forms.ToolStripMenuItem playlistsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem overviewToolStripMenuItem;
private System.Windows.Forms.ListBox PlaylistBox;
+ private System.Windows.Forms.Label PlaylistListLabel;
}
}
diff --git a/MusicPlayer/MusicPlayer/MainForm.cs b/MusicPlayer/MusicPlayer/MainForm.cs
index 8617bbf..99976a2 100644
--- a/MusicPlayer/MusicPlayer/MainForm.cs
+++ b/MusicPlayer/MusicPlayer/MainForm.cs
@@ -78,13 +78,17 @@ namespace MusicPlayer
PositionTrackBar.Enabled = false;
BufferBar.Value = main.audio.Buffered;
- PositionBar.Value = main.audio.Position;
if(!clicked)
PositionTrackBar.Value = main.audio.Position;
- LabelCurrentTime.Text = main.audio.CurrentTime + "";
- LabelTotalTime.Text = main.audio.TotalTime + "";
+ LabelCurrentTime.Text = Main.SecondsToTimestamp(main.audio.CurrentTime);
+ LabelTotalTime.Text = Main.SecondsToTimestamp(main.audio.TotalTime);
+
+ if(main.audio.CurrentSong == null)
+ CurrentSongLabel.Text = "Not playing any songs";
+ else
+ CurrentSongLabel.Text = "Currently playing: " + main.audio.CurrentSong.Name;
}
private void GenreListBox_SelectedIndexChanged(object sender, EventArgs e)
@@ -114,7 +118,7 @@ namespace MusicPlayer
var drv = SongsTableView.SelectedRows[0].DataBoundItem as DataRowView;
var row = drv.Row as DataRow;
s.ImportRow(row);
- main.audio.Play((s.Rows[0][4] as Song));
+ main.audio.Play((s.Rows[0][5] as Song));
}
}
@@ -138,6 +142,10 @@ namespace MusicPlayer
this.GenreListBox.Visible = true;
this.ArtistListBox.Visible = true;
this.AlbumListView.Visible = true;
+ this.GenreListLabel.Visible = true;
+ this.AlbumListLabel.Visible = true;
+ this.ArtistListLabel.Visible = true;
+ this.PlaylistListLabel.Visible = false;
}
private void playlistsToolStripMenuItem_Click(object sender, EventArgs e)
@@ -146,6 +154,10 @@ namespace MusicPlayer
this.GenreListBox.Visible = false;
this.ArtistListBox.Visible = false;
this.AlbumListView.Visible = false;
+ this.GenreListLabel.Visible = false;
+ this.AlbumListLabel.Visible = false;
+ this.ArtistListLabel.Visible = false;
+ this.PlaylistListLabel.Visible = true;
}
}
}
diff --git a/MusicPlayer/MusicPlayer/MusicPlayer.csproj b/MusicPlayer/MusicPlayer/MusicPlayer.csproj
index ff158a3..0f3f9af 100755
--- a/MusicPlayer/MusicPlayer/MusicPlayer.csproj
+++ b/MusicPlayer/MusicPlayer/MusicPlayer.csproj
@@ -109,6 +109,9 @@
+
+
+