コード例 #1
0
ファイル: Window1.xaml.cs プロジェクト: Ttxman/NanoTrans
 private void waveform1_ParagraphDoubleClick(object sender, WaveForm.MyTranscriptionElementEventArgs e)
 {
     VirtualizingListBox.ActiveTransctiption = e.Value;
     CommandAssignSpeaker.Execute((TranscriptionParagraph)e.Value, null);
     VirtualizingListBox.SpeakerChanged();
 }
コード例 #2
0
ファイル: Window1.xaml.cs プロジェクト: Ttxman/NanoTrans
 private void waveform1_ParagraphClick(object sender, WaveForm.MyTranscriptionElementEventArgs e)
 {
     VirtualizingListBox.ActiveTransctiption = e.Value;
     waveform1.SelectionBegin = e.Value.Begin;
     waveform1.SelectionEnd = e.Value.End;
     Dispatcher.Invoke(() => VirtualizingListBox.ActiveElement.SetCaretOffset(0), DispatcherPriority.ContextIdle);
 }
コード例 #3
0
ファイル: Window1.xaml.cs プロジェクト: Ttxman/NanoTrans
        private void waveform1_CaretPostionChangedByUser(object sender, WaveForm.TimeSpanEventArgs e)
        {
            if (Playing)
            {
                Playing = false;

            }

            if (!(waveform1.SelectionBegin <= e.Value && waveform1.SelectionEnd >= e.Value))
            {
                waveform1.SelectionBegin = new TimeSpan(-1);
                waveform1.SelectionEnd = new TimeSpan(-1);
            }

            PlaybackBufferIndex = (int)waveform1.CaretPosition.TotalMilliseconds;
            List<TranscriptionParagraph> pl = Transcription.ReturnElementsAtTime(waveform1.CaretPosition);

            _setCaret = true;
            var list = _transcription.ReturnElementsAtTime(e.Value);
            if (list != null && list.Count > 0)
            {
                if (VirtualizingListBox.ActiveTransctiption != list[0])
                    VirtualizingListBox.ActiveTransctiption = list[0];

            }
            _setCaret = false;
            SelectTextBetweenTimeOffsets(e.Value);
        }
コード例 #4
0
ファイル: Window1.xaml.cs プロジェクト: Ttxman/NanoTrans
        private void waveform1_CaretPostionChanged(object sender, WaveForm.TimeSpanEventArgs e)
        {
            if (!Playing)
            {
                PlaybackBufferIndex = (int)e.Value.TotalMilliseconds;
                oldms = TimeSpan.Zero;

                if (!(waveform1.SelectionBegin <= e.Value && waveform1.SelectionEnd >= e.Value))
                {
                    waveform1.SelectionBegin = new TimeSpan(-1);
                    waveform1.SelectionEnd = new TimeSpan(-1);
                }
            }

            if (VirtualizingListBox.ActiveTransctiption == null || VirtualizingListBox.ActiveTransctiption.Begin > e.Value || VirtualizingListBox.ActiveTransctiption.End < e.Value)
            {
                var list = _transcription.ReturnElementsAtTime(e.Value);
                if (list != null && list.Count > 0)
                {
                    if (VirtualizingListBox.ActiveTransctiption != list[0])
                    {
                        VirtualizingListBox.ActiveTransctiption = list[0];
                        phoneticTranscription.ValueElement = list[0];

                    }
                }
            }
        }
コード例 #5
0
ファイル: Window1.xaml.cs プロジェクト: Ttxman/NanoTrans
        private void waveform1_SliderPositionChanged(object sender, WaveForm.TimeSpanEventArgs e)
        {
            if (!Playing)
            {
                TimeSpan ts = e.Value;
                PlaybackBufferIndex = (int)ts.TotalMilliseconds;
                if (videoAvailable) meVideo.Position = ts;

                if (!(waveform1.SelectionBegin <= e.Value && waveform1.SelectionEnd >= e.Value))
                {
                    waveform1.SelectionBegin = new TimeSpan(-1);
                    waveform1.SelectionEnd = new TimeSpan(-1);
                }

            }
        }
コード例 #6
0
 private void waveform1_ParagraphClick(object sender, WaveForm.MyTranscriptionElementEventArgs e)
 {
     VirtualizingListBox.ActiveTransctiption = e.Value;
     waveform1.SelectionBegin = e.Value.Begin;
     waveform1.SelectionEnd = e.Value.End;
 }