void Sync() { try { int index = listSubtitles.SelectedIndices[0]; double d = 0; double.TryParse(responseTime.Text, out d); d = d / 1000.0; if (start) { listSubtitles.Items[index].SubItems[2].Text = Subtitle.MillisecondsToString(wmp.Ctlcontrols.currentPosition + d); listSubtitles.Items[index].Selected = false; listSubtitles.Items[index + 1].Selected = true; } else { listSubtitles.Items[index].SubItems[1].Text = Subtitle.MillisecondsToString(wmp.Ctlcontrols.currentPosition + d); } start = !start; listSubtitles.EnsureVisible(index + 2); } catch { } }
private void btnGetEnd_Click(object sender, EventArgs e) { textEnd.Text = Subtitle.MillisecondsToString(wmp.Ctlcontrols.currentPosition); }
private void endToolStripMenuItem_Click(object sender, EventArgs e) { int time = (int)(wmp.Ctlcontrols.currentPosition * 1000); this.textSRT.SelectedText = Subtitle.MillisecondsToString(time); }