BExplorer.Shell.FileOperationDialog.LoadTimer_Tick C# (CSharp) Method

LoadTimer_Tick() private method

private LoadTimer_Tick ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void LoadTimer_Tick(object sender, EventArgs e)
        {
            Dispatcher.Invoke(DispatcherPriority.Normal,
                    (Action)(() =>
                    {
                        if (!this.IsShown)
                        {
                            (sender as DispatcherTimer).Stop();
                            if (Contents.Any(c => c.Visibility == Visibility.Visible))
                            {
                                this.ShowActivated = this.OwnedWindows.Count <= 0;

                                /*
                                Why was this duplicate code here
                                if (this.OwnedWindows.Count > 0)
									this.ShowActivated = false;
								else
									this.ShowActivated = true;
                                */

                                this.Show();
                            }
                            else
                            {
                                this.Close();
                            }
                        }
                    }));
        }