Example #1
0
        /// <summary>
        /// Used to set the search bar text to the URI of the website.
        /// </summary>
        private void browser_AddressChanged(object sender, AddressChangedEventArgs args)
        {
            //Invokes on UI thread
            mainTabPage.InvokeOnUiThreadIfRequired(() =>
            {
                //Sets the search bar to the address of the web browser.
                OnDocumentURLChange?.Invoke(browser, new DocumentURLChange {
                    DocumentURL = args.Address
                });

                //Activating the History Command
                AddHistoryEntry(args.Address, HistoryValueType.URL);
            });

            Image iconIco = Favicon.GetFromUrl(args.Address).Icon;

            //Gets the tmp Path to store all of the icons.
            string tmpPath = Path.GetTempPath() + @"MoonByte\" + ResourceInformation.ApplicationName + @"\";

            mainTabPage.ChangeTabIcon(iconIco);
        }