コード例 #1
0
 private void PlayerZoomOutTimelime_CanExecuteRequested(XamlUICommand sender, CanExecuteRequestedEventArgs args)
 {
     args.CanExecute =
         IsLoaded &&
         _player.Source != null &&
         _player.Source is MediaSource source &&
         source.IsOpen &&
         source.State == MediaSourceState.Opened;
 }
コード例 #2
0
 private void PlayerRateNormal_CanExecuteRequested(XamlUICommand sender, CanExecuteRequestedEventArgs args)
 {
     args.CanExecute =
         IsLoaded &&
         _player.Source != null &&
         _player.Source is MediaSource source &&
         source.IsOpen &&
         source.State == MediaSourceState.Opened &&
         _player.PlaybackSession.PlaybackState == MediaPlaybackState.Playing;
 }
コード例 #3
0
 private void PlayerPreviousFrame_CanExecuteRequested(XamlUICommand sender, CanExecuteRequestedEventArgs args)
 {
     args.CanExecute =
         IsLoaded &&
         _player.Source != null &&
         _player.Source is MediaSource source &&
         source.IsOpen &&
         source.State == MediaSourceState.Opened &&
         _player.PlaybackSession.PlaybackState == MediaPlaybackState.Paused &&
         _player.PlaybackSession.Position >= Slider.FrameDuration;
 }
コード例 #4
0
 private void PlayerNextMarker_CanExecuteRequested(XamlUICommand sender, CanExecuteRequestedEventArgs args)
 {
     args.CanExecute =
         IsLoaded &&
         _player.Source != null &&
         _player.Source is MediaSource source &&
         source.IsOpen &&
         source.State == MediaSourceState.Opened &&
         (_player.PlaybackSession.PlaybackState == MediaPlaybackState.Playing ||
          _player.PlaybackSession.PlaybackState == MediaPlaybackState.Paused) &&
         NextMarkerFromCurrentPosition() != null;
 }
コード例 #5
0
 private void PlayerNewClip_CanExecuteRequested(XamlUICommand sender, CanExecuteRequestedEventArgs args)
 {
     args.CanExecute =
         IsLoaded &&
         _player.Source != null &&
         _player.Source is MediaSource source &&
         source.IsOpen &&
         source.State == MediaSourceState.Opened &&
         Slider.SelectionStart != null &&
         Slider.SelectionStart != Slider.SelectionEnd &&
         (_player.PlaybackSession.PlaybackState == MediaPlaybackState.Playing ||
          _player.PlaybackSession.PlaybackState == MediaPlaybackState.Paused);
 }
コード例 #6
0
 private void ProjectSaveAs_CanExecuteRequested(XamlUICommand sender,
                                                CanExecuteRequestedEventArgs args)
 {
     args.CanExecute = ActiveProject != null &&
                       (ActiveProject.StorageFile != null || ActiveProject.HasUnsavedChanges);
 }
コード例 #7
0
 private void CanCopyRequested(XamlUICommand sender, CanExecuteRequestedEventArgs args)
 => args.CanExecute = _holder?.CanCopy ?? false;
コード例 #8
0
 private void ProjectOpen_CanExecuteRequested(XamlUICommand sender,
                                              CanExecuteRequestedEventArgs args)
 {
     args.CanExecute = true;
 }
コード例 #9
0
 private void ProjectSave_CanExecuteRequested(XamlUICommand sender,
                                              CanExecuteRequestedEventArgs args)
 {
     args.CanExecute = ActiveProject?.HasUnsavedChanges == true;
 }
コード例 #10
0
 private void MediaLibraryRemoveMarker_CanExecuteRequested(XamlUICommand sender,
                                                           CanExecuteRequestedEventArgs args)
 {
     args.CanExecute = _descriptorContext != null;
 }
コード例 #11
0
 private void MediaLibraryRenameItem_CanExecuteRequested(XamlUICommand sender,
                                                         CanExecuteRequestedEventArgs args)
 {
     args.CanExecute = ActiveNode?.Depth > 0;
 }
コード例 #12
0
 private void MediaLibraryRemoveAll_CanExecuteRequested(XamlUICommand sender,
                                                        CanExecuteRequestedEventArgs args)
 {
     args.CanExecute = ActiveProject?.MediaLibrary.Children.Count > 0;
 }
コード例 #13
0
 private void MediaLibraryRemoveSelected_CanExecuteRequested(XamlUICommand sender,
                                                             CanExecuteRequestedEventArgs args)
 {
     args.CanExecute = TreeViewMediaLibrary.SelectedNodes.Count > 0;
 }
コード例 #14
0
 private void MediaLibraryImportFolder_CanExecuteRequested(XamlUICommand sender,
                                                           CanExecuteRequestedEventArgs args)
 {
     args.CanExecute = ActiveNode is MediaTreeFolder;
 }