Paint.PaintApp.CreatePictureStateManager C# (CSharp) Method

CreatePictureStateManager() private method

Creates the picture state manager.
private CreatePictureStateManager ( ) : void
return void
        private void CreatePictureStateManager()
        {
            bool newImage = true;

            if (File.Exists(this.filenameResolver.MasterImageInfoFilename) == true)
            {
                // existing image so we load the rendertargetlist from disk
                this.pictureIOManager.LoadData(this.GraphicsDeviceManager.GraphicsDevice, this.SpriteBatch, this.undoRedoRenderTargets, this.BackgroundColor);
                newImage = false;
            }

            this.pictureStateManager = new PictureStateManager(this.filenameResolver, this.pictureIOManager, this, this.ImageStateData);
            this.pictureStateManager.RedoEnabledChanged += (sender, e) =>
            {
                this.paintToolBox.RedoEnabled = this.pictureStateManager.RedoEnabled;
            };

            this.pictureStateManager.UndoEnabledChanged += (sender, e) =>
            {
                this.paintToolBox.UndoEnabled = this.pictureStateManager.UndoEnabled;
            };

            this.pictureStateManager.InitialisePictureState(newImage);
        }