Disable Trackbar. Add Genre
This commit is contained in:
@@ -25,7 +25,7 @@ namespace MusicPlayer
|
||||
audio = new AudioHandler();
|
||||
table = new SongsTable();
|
||||
form.SongsTableView.DataSource = table;
|
||||
form.SongsTableView.Columns[3].Visible = false;
|
||||
form.SongsTableView.Columns[4].Visible = false;
|
||||
Populate();
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -210,6 +210,7 @@
|
||||
//
|
||||
// PositionTrackBar
|
||||
//
|
||||
this.PositionTrackBar.Enabled = false;
|
||||
this.PositionTrackBar.Location = new System.Drawing.Point(346, 13);
|
||||
this.PositionTrackBar.Maximum = 100;
|
||||
this.PositionTrackBar.Name = "PositionTrackBar";
|
||||
|
||||
@@ -72,6 +72,11 @@ namespace MusicPlayer
|
||||
|
||||
private void UpdateTimer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (main.audio.BState == AudioHandler.BufferState.DONE)
|
||||
PositionTrackBar.Enabled = true;
|
||||
else
|
||||
PositionTrackBar.Enabled = false;
|
||||
|
||||
BufferBar.Value = main.audio.Buffered;
|
||||
PositionBar.Value = main.audio.Position;
|
||||
|
||||
@@ -106,8 +111,7 @@ namespace MusicPlayer
|
||||
var drv = SongsTableView.SelectedRows[0].DataBoundItem as DataRowView;
|
||||
var row = drv.Row as DataRow;
|
||||
s.ImportRow(row);
|
||||
System.Console.WriteLine((s.Rows[0][3] as Song).SongID);
|
||||
main.audio.Play((s.Rows[0][3] as Song));
|
||||
main.audio.Play((s.Rows[0][4] as Song));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,12 +15,13 @@ namespace MusicPlayer
|
||||
this.Columns.Add("Naam", typeof(string));
|
||||
this.Columns.Add("Album", typeof(string));
|
||||
this.Columns.Add("Artiest", typeof(string));
|
||||
this.Columns.Add("Genre", typeof(string));
|
||||
this.Columns.Add("song", typeof(Song));
|
||||
}
|
||||
|
||||
public void Add(Song s)
|
||||
{
|
||||
this.Rows.Add(s.Name, s.Album, s.Artist, s);
|
||||
this.Rows.Add(s.Name, s.Album, s.Artist, s.Genre, s);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user