PowerArgs.Cli.NotificationButton.OnAddedToVisualTree C# (CSharp) Method

OnAddedToVisualTree() private method

private OnAddedToVisualTree ( ) : void
return void
        private void OnAddedToVisualTree()
        {
            launcher.SynchronizeForLifetime(nameof(Bounds), () => { this.Size = launcher.Size; }, this.LifetimeManager);
            manager.ProgressOperationStatusChanged.SubscribeForLifetime((op) =>
            {
                if(op.State == OperationState.Completed)
                {
                    launcher.Foreground = ConsoleColor.Green;
                    if(resetTimer != null)
                    {
                        Application.ClearTimeout(resetTimer);
                        resetTimer = null;
                    }
                    resetTimer = Application.SetTimeout(ResetLaundherFG, TimeSpan.FromSeconds(5));
                }
            }, this.LifetimeManager);
        }