Ejemplo n.º 1
0
        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
            {
            }
        }
Ejemplo n.º 2
0
 private void btnGetEnd_Click(object sender, EventArgs e)
 {
     textEnd.Text = Subtitle.MillisecondsToString(wmp.Ctlcontrols.currentPosition);
 }
Ejemplo n.º 3
0
        private void endToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int time = (int)(wmp.Ctlcontrols.currentPosition * 1000);

            this.textSRT.SelectedText = Subtitle.MillisecondsToString(time);
        }