Example #1
0
        private RenderSceneCommand GetRenderSceneCommand(SceneDto scene)
        {
            var correlationId = Guid.NewGuid();
            var fileInfo      = GetSceneBitmapFileInfo(correlationId);
            var command       = new RenderSceneCommand
            {
                Scene         = scene,
                CorrelationId = correlationId,
                FilePath      = fileInfo.PhysicalPath
            };

            return(command);
        }
Example #2
0
        //// ===========================================================================================================
        //// Constructors
        //// ===========================================================================================================

        public MainWindowViewModel()
        {
            Scenes = new SceneList();
            Scenes.SelectedSceneChanged += OnSelectedSceneChanged;

            _startCommand = new RenderSceneCommand();
            _startCommand.RenderProgressChanged += OnStartCommandRenderProgressChanged;
            _startCommand.PropertyChanged       += OnStartCommandPropertyChanged;

            RenderProcessViewModel = new LongRunningProcessProgressViewModel(_startCommand)
            {
                StartButtonText = "Render"
            };

            // Set the selected index last so that all of the event handlers will run.
            Scenes.SelectedIndex = Scenes.Count > 0 ? Scenes.Count - 1 : -1;
        }