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; }
public void SetSegment(Segment segment) { _control.SetSegment(segment); }
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(); }
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); }
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; }
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; }); }
public void UpdateSegment(Segment segment) { _gateway.UpdateSegment(segment); }
public void InsertSegment(Segment segment) { _gateway.InsertSegment(segment); }