コード例 #1
0
ファイル: PresetsSteps.cs プロジェクト: Inner-room/VrPlayer
        public void WhenIPressSaveFromThePresetMenu()
        {
            var configMock = new Mock<IApplicationConfig>();
            var presetManager = new PresetsManager(configMock.Object, _stateMock.Object, _pluginManagerMock.Object);
            var viewModel = new MenuViewModel(_stateMock.Object, _pluginManagerMock.Object, configMock.Object, presetManager);

            viewModel.SaveMediaPresetCommand.Execute(_tempPresetFilePath);
        }
コード例 #2
0
ファイル: PresetsSteps.cs プロジェクト: Inner-room/VrPlayer
        public void WhenILoadTheFileUsingThePresetMenu(string filePath)
        {
            var sphereProjectionPlugin = new SpherePlugin();
            var projections = new List<IPlugin<IProjection>> { sphereProjectionPlugin };
            _pluginManagerMock.Setup(mock => mock.Projections).Returns(projections);
            _stateMock = new Mock<IApplicationState>();
            _stateMock.SetupAllProperties();
            var configMock = new Mock<IApplicationConfig>();
            var presetManager = new PresetsManager(configMock.Object, _stateMock.Object, _pluginManagerMock.Object);
            var viewModel = new MenuViewModel(_stateMock.Object, _pluginManagerMock.Object, configMock.Object, presetManager);

            viewModel.LoadMediaPresetCommand.Execute(filePath);
        }
コード例 #3
0
ファイル: Menu.xaml.cs プロジェクト: Inner-room/VrPlayer
 public Menu()
 {
     InitializeComponent();
     try
     {
         _viewModel = ((App)Application.Current).ViewModelFactory.CreateMenuViewModel();
         DataContext = _viewModel;
     }
     catch (Exception exc)
     {
         Logger.Instance.Error("Error while initilizing Menu view.", exc);
     }
 }