public void OnDone(DoneEventArgs e) { if (Done != null) { Done(this, e); } }
void plex_Done(object sender, DoneEventArgs e) { if (e.IsEndPlaying) { tbMain_ButtonClick(tbMain, new ToolBarButtonClickEventArgs(tbbStop)); wfv.Position = 0; } else { int position = (int)plex.GetPosition(Alvas.Audio.TimeFormat.Milliseconds); wfv.Position = position; } }
void plex_Done(object sender, DoneEventArgs e) { if (e.IsEndPlaying) { Stop(); wfv.Position = 0; } else { int position = (int)plex.GetPosition(Alvas.Audio.TimeFormat.Milliseconds); wfv.Position = position; } }
private void playerEx_Done(object sender, DoneEventArgs e) { byte[] data = e.Data; long pos = playEx.GetPosition(TimeFormat.Milliseconds); OnChangePosition(pos); short[] buffer = AudioCompressionManager.RecalculateData(playEx.Format, e.Data, vum.ClientRectangle.Width); vum.Data = buffer; //------------ if (e.IsEndPlaying && playEx.State != DeviceState.Closed) { playEx.ClosePlayer(); } //------------ }
public string Run() { DoneEventArgs[] args = new DoneEventArgs[1]; DoneEventHandler handler = (obj, a) => { args[0] = a; }; DoneEvent += handler; try { Display.Show(this); while (args[0] == null) Display.Iterate(); } finally { DoneEvent -= handler; } Display.Hide(this); return args[0].Text; }
private void playerEx_Done(object sender, DoneEventArgs e) { byte[] data = e.Data; long pos = playEx.GetPosition(TimeFormat.Milliseconds); OnChangePosition(pos); if (vum != null) { short[] buffer = AudioCompressionManager.RecalculateData(playEx.Format, e.Data, vum.ClientRectangle.Width); vum.Data = buffer; } //------------ if (e.IsEndPlaying && playEx.State != DeviceState.Closed) { playEx.ClosePlayer(); } //------------ }