private void timer1_Tick(object sender, EventArgs e) { label1.Text = TimeSpan.FromSeconds(Bass1.GetPosOfStream(Bass1.Stream)).ToString(); slTime.Value = Bass1.GetPosOfStream(Bass1.Stream); if (temp == 1 && rand_temp == 0) { if (Bass1.PlauAgainTrack()) { playlist.SelectedIndex = main.CurrentTrackNumber; label1.Text = TimeSpan.FromSeconds(Bass1.GetPosOfStream(Bass1.Stream)).ToString(); label2.Text = TimeSpan.FromSeconds(Bass1.GetTimeOfStream(Bass1.Stream)).ToString(); slTime.Maximum = Bass1.GetTimeOfStream(Bass1.Stream); slTime.Value = Bass1.GetPosOfStream(Bass1.Stream); } } else { if (temp == 0 && rand_temp == 1) { if (Bass1.PlauRandomTrack()) { playlist.SelectedIndex = main.CurrentTrackNumber; label1.Text = TimeSpan.FromSeconds(Bass1.GetPosOfStream(Bass1.Stream)).ToString(); label2.Text = TimeSpan.FromSeconds(Bass1.GetTimeOfStream(Bass1.Stream)).ToString(); slTime.Maximum = Bass1.GetTimeOfStream(Bass1.Stream); slTime.Value = Bass1.GetPosOfStream(Bass1.Stream); } } else { if (Bass1.ToNextTrack()) { playlist.SelectedIndex = main.CurrentTrackNumber; label1.Text = TimeSpan.FromSeconds(Bass1.GetPosOfStream(Bass1.Stream)).ToString(); label2.Text = TimeSpan.FromSeconds(Bass1.GetTimeOfStream(Bass1.Stream)).ToString(); slTime.Maximum = Bass1.GetTimeOfStream(Bass1.Stream); slTime.Value = Bass1.GetPosOfStream(Bass1.Stream); } if (Bass1.EndPlaylist) { btmSTOP_Click(this, new EventArgs()); playlist.SelectedIndex = main.CurrentTrackNumber = 0; Bass1.EndPlaylist = false; } } } string current = main.Files[playlist.SelectedIndex]; TagModel TM = new TagModel(current); Artist.Text = TM.Artist; Name_file.Text = TM.Title; }