public void Play() { if (playing) return; playing = true; Image = pauseImg; PlayNextEventArgs args = new PlayNextEventArgs (); if (PlayNextEvent != null) PlayNextEvent (this, args); if (args.StopTimer) { Pause (); return; } timeoutid = GLib.Timeout.Add (timeout, new GLib. TimeoutHandler (on_timeout)); }
private bool on_timeout() { if (!playing) return false; PlayNextEventArgs args = new PlayNextEventArgs (); if (PlayNextEvent != null) PlayNextEvent (this, args); if (args.StopTimer) { Pause (); return false; } return true; }
private void on_play_next_event(object o, PlayNextEventArgs args) { handle_next (); if (boardWidget.Session.CurrentComment != null) args.StopTimer = true; if (!boardWidget.Session.HasNext ()) { playButton.Pause (); } }