Exemplo n.º 1
0
        public MainWindowViewModel(VideoPlayer videoPlayerIn)
        {
            this.exportQueueViewModel = new ExportQueueViewModel();

            OpenFileCommand               = new OpenFileCommand(this, videoPlayerIn);
            OpenExportQueueCommand        = new OpenExportQueueCommand(this, this.exportQueueViewModel);
            OpenSettingsCommand           = new OpenSettingsCommand(this);
            OpenAboutCommand              = new OpenAboutCommand(this);
            PlayOrPauseCommand            = new PlayOrPauseCommand(this, videoPlayerIn);
            SetSectionStartCommand        = new SetSectionStartCommand(this, videoPlayerIn);
            SetSectionEndCommand          = new SetSectionEndCommand(this, videoPlayerIn);
            BackwardCommand               = new BackwardCommand(this, videoPlayerIn);
            ForwardCommand                = new ForwardCommand(this, videoPlayerIn);
            StepBackwardCommand           = new SeekCommand(this, videoPlayerIn, () => - videoPlayerIn.FrameTime);
            StepForwardCommand            = new SeekCommand(this, videoPlayerIn, () => videoPlayerIn.FrameTime);
            Step1sBackwardCommand         = new SeekCommand(this, videoPlayerIn, () => - TimeSpan.FromSeconds(1));
            Step1sForwardCommand          = new SeekCommand(this, videoPlayerIn, () => TimeSpan.FromSeconds(1));
            PlayFromSelectionStartCommand = new PlayFromSelectionStartCommand(this, videoPlayerIn);
            PlaySelectionCommand          = new PlaySelectionCommand(this, videoPlayerIn);
            PlayUntilSelectionEndCommand  = new PlayUntilSelectionEndCommand(this, videoPlayerIn);
            ExportSelectionCommand        = new ExportSelectionCommand(this);
            NextVideoCommand              = new NextVideoCommand(this, videoPlayerIn);
            AddToQueueCommand             = new AddToQueueCommand(this, this.exportQueueViewModel);

            AudioVolume = ApplicationSettings.AudioVolume;
        }
Exemplo n.º 2
0
        public void DoesDoShowOnExecute()
        {
            var command = new OpenAboutCommand();
            var about   = MockRepository.GenerateMock <IAbout>();

            command.About = about;
            command.Execute();
            about.AssertWasCalled(x => x.DoShow());
        }
Exemplo n.º 3
0
 public MainViewModel()
 {
     DatagridPreviewCommand           = new DatagridPreviewCommand(this);
     PartitionsDatagridPreviewCommand = new PartitionsDatagridPreviewCommand(this);
     OpenCommand           = new OpenCommand(this);
     ExportCommand         = new ExportCommand(this);
     OpenHelpCommand       = new OpenHelpCommand();
     OpenAboutCommand      = new OpenAboutCommand();
     CloseWindowCommand    = new CloseWindowCommand();
     PartitionsViewCommand = new PartitionsViewCommand(this);
 }
Exemplo n.º 4
0
        private void DropDownMenuClickMethod(object obj)
        {
            string command = obj.ToString();

            if (command == Commands[0])
            {
                OpenListCommand.Execute(null);
            }
            else if (command == Commands[1])
            {
                OpenSettingCommand.Execute(null);
            }
            else if (command == Commands[2])
            {
                OpenAboutCommand.Execute(null);
            }
        }