예제 #1
0
 public DMOMediaPlayerViewModel()
 {
     System.Windows.FrameworkElement.LanguageProperty.OverrideMetadata(typeof(System.Windows.FrameworkElement),
                     new System.Windows.FrameworkPropertyMetadata(
                         System.Windows.Markup.XmlLanguage.GetLanguage(System.Globalization.CultureInfo.CurrentCulture.IetfLanguageTag)));
     ActionCommandRepository.AddActionCommand(new ActionCommand("PausePlay", "_Toggle Pause/Play", "Space"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("JumpBackward", "Jump _Backward", "PageUp"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("JumpForward", "Jump _Forward", "PageDown"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("PreviousMedia", "_Previous Media", "Down"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("NextMedia", "_Next Media", "Up"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("Refresh", "_Refresh", "F5"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("IncreaseTimestep", "_Increase Timestep", "Right"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("DecreaseTimestep", "_Decrease Timestep", "Left"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("IncreaseVolume", "_More Volume", "Add"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("DecreaseVolume", "_Less Volume", "Subtract"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("Close", "_Close", "Escape"));
     Menu = new ActionMainMenu(this);
     Menu.AddComposite("_Commands")
         .AddAction("PausePlay", "CommandTogglePlayPause()")
         .AddAction("JumpBackward", "CommandBackByTimeStep()")
         .AddAction("JumpForward", "CommandForwardByTimeStep()")
         .AddAction("PreviousMedia", "CommandPreviousMedia()")
         .AddAction("NextMedia", "CommandNextMedia()")
         .AddAction("Refresh", "CommandRefreshBindings()")
         .AddAction("IncreaseTimestep", "CommandIncreaseTimeStep()")
         .AddAction("DecreaseTimestep", "CommandDecreaseTimeStep()")
         .AddAction("IncreaseVolume", "CommandIncreaseVolume()")
         .AddAction("DecreaseVolume", "CommandDecreaseVolume()")
         .AddAction("Close", "CommandCloseApplication()");
     Menu.SupplementaryMessageAttachments = "";
     TimeStep = TimeSpan.FromSeconds(timesteps[currentStep]);
 }
예제 #2
0
 public DMOMediaPlayerViewModel()
 {
     System.Windows.FrameworkElement.LanguageProperty.OverrideMetadata(typeof(System.Windows.FrameworkElement),
                                                                       new System.Windows.FrameworkPropertyMetadata(
                                                                           System.Windows.Markup.XmlLanguage.GetLanguage(System.Globalization.CultureInfo.CurrentCulture.IetfLanguageTag)));
     ActionCommandRepository.AddActionCommand(new ActionCommand("PausePlay", "_Toggle Pause/Play", "Space"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("JumpBackward", "Jump _Backward", "PageUp"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("JumpForward", "Jump _Forward", "PageDown"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("PreviousMedia", "_Previous Media", "Down"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("NextMedia", "_Next Media", "Up"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("Refresh", "_Refresh", "F5"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("IncreaseTimestep", "_Increase Timestep", "Right"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("DecreaseTimestep", "_Decrease Timestep", "Left"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("IncreaseVolume", "_More Volume", "Add"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("DecreaseVolume", "_Less Volume", "Subtract"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("Close", "_Close", "Escape"));
     Menu = new ActionMainMenu(this);
     Menu.AddComposite("_Commands")
     .AddAction("PausePlay", "CommandTogglePlayPause()")
     .AddAction("JumpBackward", "CommandBackByTimeStep()")
     .AddAction("JumpForward", "CommandForwardByTimeStep()")
     .AddAction("PreviousMedia", "CommandPreviousMedia()")
     .AddAction("NextMedia", "CommandNextMedia()")
     .AddAction("Refresh", "CommandRefreshBindings()")
     .AddAction("IncreaseTimestep", "CommandIncreaseTimeStep()")
     .AddAction("DecreaseTimestep", "CommandDecreaseTimeStep()")
     .AddAction("IncreaseVolume", "CommandIncreaseVolume()")
     .AddAction("DecreaseVolume", "CommandDecreaseVolume()")
     .AddAction("Close", "CommandCloseApplication()");
     Menu.SupplementaryMessageAttachments = "";
     TimeStep = TimeSpan.FromSeconds(timesteps[currentStep]);
 }
예제 #3
0
 public VideoFileManagerMainWindowViewModel()
     : base(true)
 {
     DisplayName          = "VideoFileManager v1.0 (2012)";
     DriveDetector        = new DriveDetector();
     MainMenu             = new ActionMainMenu(this);
     SeriesGroupLocal     = new SeriesGroupViewModel(SeriesGroupType.Local);
     SeriesGroupReturning = new SeriesGroupViewModel(SeriesGroupType.Returning);
     SeriesGroupEnded     = new SeriesGroupViewModel(SeriesGroupType.Ended);
     SeriesGroupTransfer  = new SeriesGroupViewModel(SeriesGroupType.Transfer);
     ActionCommandRepository.AddActionCommand(new ActionCommand("Execute", "_Execute", "F6"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("CleanUp", "_Clean Up", "F5"));
     MainMenu.AddComposite("_Operation")
     .AddAction("Execute", "CommandExecute()")
     .AddAction("CleanUp", "CommandCleanUpEmptyFolders()");
     ActionCommandRepository.AddActionCommand(new ActionCommand("Ended", "Series _ended", "Ctrl+E"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("Finale", "Season _finale", "Ctrl+S"));
     ActionCommandRepository.AddActionCommand(new ActionCommand("Reset", "_Keep files", "Ctrl+Z"));
 }