/// <summary>Starts playing</summary> public void Play() { if (isPlaying) { return; } isPlaying = true; maxTime = chartFile.Length + 1000; timer.Start(CurrentTime); StartPlaying?.Invoke(this, new EventArgs()); }
public void Play(IEnumerable <string> list, string current) { Files = list.ToList(); NowPlaying = current; if (current != null) { StartPlaying?.Invoke(this, new PlayingEventArgs(NowPlaying)); } else { PlayNext(); } }
public void PlayNext() { if (Files != null && Files.Count() > 0) { int Pos = random.Next(Files.Count); if (Files[Pos] == NowPlaying) { Pos = random.Next(Files.Count); } NowPlaying = Files[Pos]; StartPlaying?.Invoke(this, new PlayingEventArgs(NowPlaying)); } }
public override int GetHashCode() { int hash = 1; if (PlayerId.Length != 0) { hash ^= PlayerId.GetHashCode(); } if (DisplayName.Length != 0) { hash ^= DisplayName.GetHashCode(); } if (PlayerIdHash != 0) { hash ^= PlayerIdHash.GetHashCode(); } if (ShortPlayerId.Length != 0) { hash ^= ShortPlayerId.GetHashCode(); } if (FirebaseUid.Length != 0) { hash ^= FirebaseUid.GetHashCode(); } if (Email.Length != 0) { hash ^= Email.GetHashCode(); } if (LoginToken.Length != 0) { hash ^= LoginToken.GetHashCode(); } if (StartPlaying.Length != 0) { hash ^= StartPlaying.GetHashCode(); } if (LastUpdated.Length != 0) { hash ^= LastUpdated.GetHashCode(); } hash ^= repeatedInner_.GetHashCode(); return(hash); }
public static void CallStartPlaying() { StartPlaying?.Invoke(); }