Exemplo n.º 1
0
        private void BtnBackSegmentDetails_OnClick(object sender, RoutedEventArgs e)
        {
            gridLoops.Visibility = Visibility.Hidden;
            gridLoopDetails.Visibility = Visibility.Visible;
            gridLoopPlayback.Visibility = Visibility.Hidden;
            gridSegmentDetails.Visibility = Visibility.Hidden;

            _currentSegment.MarkerId = Guid.Empty;
            if (chkSegmentLinkToMarker.IsChecked.Value && comboSegmentMarker.SelectedIndex >= 0)
                _currentSegment.MarkerId = _segmentMarkers[comboSegmentMarker.SelectedIndex].MarkerId;

            OnUpdateSegmentDetails(_currentSegment);
            _currentSegment = null;
        }
Exemplo n.º 2
0
 public void SetSegment(Segment segment)
 {
     _control.SetSegment(segment);
 }
Exemplo n.º 3
0
        public void SetSegment(Segment segment)
        {
            if (_loop == null)
                return;

            var localSegment = _loop.Segments.FirstOrDefault(x => x.SegmentId == segment.SegmentId);
            if (localSegment == null)
                return;

            localSegment.Position = segment.Position;
            localSegment.PositionBytes = segment.PositionBytes;
            localSegment.PositionSamples = segment.PositionSamples;

            OnInvalidateVisual();
        }
Exemplo n.º 4
0
        public void RefreshSegmentDetails(Segment segment, long audioFileLength)
        {
            //Console.WriteLine("RefreshSegmentDetails - position: {0}", segment.Position);
            _currentSegment = segment;
            Dispatcher.BeginInvoke(DispatcherPriority.Render, new Action(() =>
            {
                //waveFormScrollView.SetSegment(segment);

                chkSegmentLinkToMarker.IsChecked = segment.MarkerId != Guid.Empty;
                comboSegmentMarker.Visibility = segment.MarkerId == Guid.Empty ? Visibility.Hidden : Visibility.Visible;
                int index = _segmentMarkers.FindIndex(x => x.MarkerId == segment.MarkerId);
                if (index >= 0)
                    comboSegmentMarker.SelectedIndex = index;

                float positionPercentage = (float)segment.PositionBytes / (float)audioFileLength;
                trackSegmentPosition.ValueWithoutEvent = (int)(positionPercentage * 10);

                lblSegmentPosition.Content = segment.Position;
            }));
        }
Exemplo n.º 5
0
 public void SetSegment(Segment segment)
 {
     WaveFormView.SetSegment(segment);
 }
Exemplo n.º 6
0
        partial void actionBackSegmentDetails(NSObject sender)
        {
            viewLoopDetails.Hidden = false;
            ShowSegmentDetails(false);
            viewLoops.Hidden = true;

            _currentSegment.MarkerId = Guid.Empty;
            if(chkSegmentLinkToMarker.Value && comboSegmentMarker.IndexOfSelectedItem >= 0)
                _currentSegment.MarkerId = _segmentMarkers[comboSegmentMarker.IndexOfSelectedItem].MarkerId;

            OnUpdateSegmentDetails(_currentSegment);
            _currentSegment = null;
        }
Exemplo n.º 7
0
        public void RefreshSegmentDetails(Segment segment, long audioFileLength)
        {
            //Console.WriteLine("RefreshSegmentDetails - position: {0}", segment.Position);
            _currentSegment = segment;
            InvokeOnMainThread(delegate {
                waveFormScrollView.SetSegment(segment);

                chkSegmentLinkToMarker.Value = segment.MarkerId != Guid.Empty;
                comboSegmentMarker.Hidden = segment.MarkerId == Guid.Empty;
                int index = _segmentMarkers.FindIndex(x => x.MarkerId == segment.MarkerId);
                if(index >= 0)
                    comboSegmentMarker.SelectItem(index);

                float positionPercentage = (float)segment.PositionBytes / (float)audioFileLength;
                trackBarSegmentPosition.ValueWithoutEvent = (int)(positionPercentage * 10);

                lblSegmentPositionValue.StringValue = segment.Position;
            });
        }
Exemplo n.º 8
0
 public void UpdateSegment(Segment segment)
 {
     _gateway.UpdateSegment(segment);
 }
Exemplo n.º 9
0
 public void InsertSegment(Segment segment)
 {
     _gateway.InsertSegment(segment);
 }