Paint.PlaybackToolbox.AddRestartButton C# (CSharp) Méthode

AddRestartButton() private méthode

Adds the restart button.
private AddRestartButton ( ToolboxLayoutDefinitionStandardToolsButtonsButton buttonLayout ) : void
buttonLayout Paint.ToolboxLayout.ToolboxLayoutDefinitionStandardToolsButtonsButton /// Button layout. ///
Résultat void
        private void AddRestartButton(ToolboxLayoutDefinitionStandardToolsButtonsButton buttonLayout)
        {
            var restartButton = new Button(
                this.GraphicsDisplay,
                new ButtonDefinition(buttonLayout, this.Scale, new ImageType[] { ImageType.RestartButton }, null));

            restartButton.ButtonPressed += (sender, e) =>
            {
                // we are restarting so we if we were previosly paused or disabled then reset to playing...
                this.playButton.State = 1;
                this.playButton.Enabled = true;

                this.OnRestartSelected(EventArgs.Empty);
            };

            this.AddTool(restartButton);
        }