//таймер private void timer1_Tick(object sender, EventArgs e) { label1.Text = TimeSpan.FromSeconds(BassLike.GetPosOfStream(BassLike.Stream)).ToString(); slTime.Value = BassLike.GetPosOfStream(BassLike.Stream); if (mode == 2) { if (BassLike.AutoPlay()) { playlist.SelectedIndex = Vars.trackNum; label1.Text = TimeSpan.FromSeconds(BassLike.GetPosOfStream(BassLike.Stream)).ToString(); label2.Text = TimeSpan.FromSeconds(BassLike.GetTimeOfStream(BassLike.Stream)).ToString(); slTime.Maximum = BassLike.GetTimeOfStream(BassLike.Stream); slTime.Value = BassLike.GetPosOfStream(BassLike.Stream); } if (BassLike.EndPlaylist) { button2_Click(this, new EventArgs()); playlist.SelectedIndex = Vars.trackNum = 0; BassLike.EndPlaylist = false; } } if (mode == 1) { if (BassLike.RandPlay()) { playlist.SelectedIndex = Vars.trackNum; label1.Text = TimeSpan.FromSeconds(BassLike.GetPosOfStream(BassLike.Stream)).ToString(); label2.Text = TimeSpan.FromSeconds(BassLike.GetTimeOfStream(BassLike.Stream)).ToString(); slTime.Maximum = BassLike.GetTimeOfStream(BassLike.Stream); slTime.Value = BassLike.GetPosOfStream(BassLike.Stream); } } if (mode == 3) { if (BassLike.Repeat()) { playlist.SelectedIndex = Vars.trackNum; label1.Text = TimeSpan.FromSeconds(BassLike.GetPosOfStream(BassLike.Stream)).ToString(); label2.Text = TimeSpan.FromSeconds(BassLike.GetTimeOfStream(BassLike.Stream)).ToString(); slTime.Maximum = BassLike.GetTimeOfStream(BassLike.Stream); slTime.Value = BassLike.GetPosOfStream(BassLike.Stream); } } }