private void RefreshInfo(object sender, EventArgs e) { if (CurrentSong is not null) { var format1 = ""; var format2 = ""; switch (CurrentPlayback.State) { case PlaybackState.Nothing: format1 = Row1.FormatNothing; format2 = Row2.FormatNothing; break; case PlaybackState.Paused: format1 = Row1.FormatPaused; format2 = Row2.FormatPaused; break; case PlaybackState.Playing: format1 = Row1.FormatPlaying; format2 = Row2.FormatPlaying; break; } Row1.Text = Format(format1, CurrentSong, CurrentPlayback, CurrentPlayer); Row2.Text = Format(format2, CurrentSong, CurrentPlayback, CurrentPlayer); ResetAnimRow1?.Invoke(this, e); ResetAnimRow2?.Invoke(this, e); } //if (PlayerPlayback.State == PlaybackState.Playing) //{ // if (PlayerPlayback.Elapsed < CurrentSong.Length) // { // PlayerPlayback.Elapsed += 1; // } // else // { // Log.Warning("Elapsed time exceeded song length"); // } //} }
void OnResetAnimRow1(object sender, RefreshEventArgs e) { ResetAnimRow1?.Invoke(this, e); }