示例#1
0
 private void buttonSetSyncPoint_Click(object sender, EventArgs e)
 {
     if (subtitleListView2.Visible)
     {
         SetSyncPointViaOthersubtitle();
     }
     else
     {
         if (SubtitleListview1.SelectedItems.Count == 1 && _subtitle != null)
         {
             using (var getTime = new SetSyncPoint())
             {
                 int index = SubtitleListview1.SelectedItems[0].Index;
                 getTime.Initialize(_subtitle, _subtitleFileName, index, _videoFileName, _audioTrackNumber);
                 if (getTime.ShowDialog(this) == DialogResult.OK)
                 {
                     if (_synchronizationPoints.ContainsKey(index))
                     {
                         _synchronizationPoints[index] = getTime.SynchronizationPoint;
                     }
                     else
                     {
                         _synchronizationPoints.Add(index, getTime.SynchronizationPoint);
                     }
                     RefreshSynchronizationPointsUI();
                     _videoFileName = getTime.VideoFileName;
                 }
                 Activate();
                 _videoFileName = getTime.VideoFileName;
             }
         }
     }
     SetSyncFactorLabel();
 }
示例#2
0
 private void buttonSetSyncPoint_Click(object sender, EventArgs e)
 {
     if (subtitleListView2.Visible)
     {
         SetSyncPointViaOthersubtitle();
     }
     else
     {
         if (SubtitleListview1.SelectedItems.Count == 1 && _subtitle != null)
         {
             using (var getTime = new SetSyncPoint())
             {
                 int index = SubtitleListview1.SelectedItems[0].Index;
                 getTime.Initialize(_subtitle, _subtitleFileName, index, _videoFileName, _audioTrackNumber);
                 if (getTime.ShowDialog(this) == DialogResult.OK)
                 {
                     if (_synchronizationPoints.ContainsKey(index))
                         _synchronizationPoints[index] = getTime.SynchronizationPoint;
                     else
                         _synchronizationPoints.Add(index, getTime.SynchronizationPoint);
                     RefreshSynchronizationPointsUI();
                     _videoFileName = getTime.VideoFileName;
                 }
                 Activate();
                 _videoFileName = getTime.VideoFileName;
             }
         }
     }
     SetSyncFactorLabel();
 }