示例#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;
        }
示例#2
0
 public void SetSegment(Segment segment)
 {
     _control.SetSegment(segment);
 }
示例#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();
        }
示例#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;
            }));
        }
 public void SetSegment(Segment segment)
 {
     WaveFormView.SetSegment(segment);
 }
示例#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;
        }
示例#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;
            });
        }
示例#8
0
 public void UpdateSegment(Segment segment)
 {
     _gateway.UpdateSegment(segment);
 }
示例#9
0
 public void InsertSegment(Segment segment)
 {
     _gateway.InsertSegment(segment);
 }