At.FF.Krems.FullscreenBrowser.GeckoBrowser.CloseBrowser C# (CSharp) Method

CloseBrowser() public method

Closes the browser.
public CloseBrowser ( bool onlyIfIsAlternativeWindow = false ) : void
onlyIfIsAlternativeWindow bool if set to true [only if is alternative window].
return void
        public void CloseBrowser(bool onlyIfIsAlternativeWindow = false)
        {
            if (!this.Visible || (onlyIfIsAlternativeWindow && !this.config.IsAlternativeWindow))
            {
                return;
            }

            if (this.InvokeRequired)
            {
                this.BeginInvoke(new Action(() => this.CloseBrowser(onlyIfIsAlternativeWindow)));
                return;
            }

            this.Hide();
        }