At.FF.Krems.FullscreenBrowser.ScreenRefresher.ShowScreenRefresher C# (CSharp) Method

ShowScreenRefresher() public method

Shows the screen refresher.
public ShowScreenRefresher ( ) : void
return void
        public void ShowScreenRefresher()
        {
            Task.Factory.StartNew(
                () =>
                {
                    if (!this.IsVisible)
                    {
                        this.Dispatcher.Invoke(this.Show);
                    }

                    const string ThreadName = "ScreenRefresherAnimationThread";
                    if (string.IsNullOrWhiteSpace(Thread.CurrentThread.Name) || Thread.CurrentThread.Name != ThreadName)
                    {
                        Thread.CurrentThread.Name = ThreadName;
                    }

                    this.Dispatcher.BeginInvoke(new Action(this.eventHook.Start));
                    this.StartAnimation(this.cycleColors.First());
                },
                CancellationToken.None,
                TaskCreationOptions.LongRunning,
                TaskScheduler.Default);
        }