Beispiel #1
0
        private void menuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //opens a winform with your history in it
            showHistory showhistory = new showHistory();

            showhistory.Show();
        }
Beispiel #2
0
        private void EzClaps_AddressChanged(object sender, AddressChangedEventArgs e)
        {
            //updates the adress bar based on the url that has been  put in
            this.Invoke(new MethodInvoker(() =>
            {
                txtSearchBar.Text = e.Address;
                //if the the adressbar is updated in one way or another it wil detect it and send the url to the History.txt file
                // causing the history tab to update
                //but if the Private tab is active it won't save your browser history
                if (cbPrivateTab.Checked)
                {
                    return;
                }

                //First checks the location of the history tab then adds the text from the searchbar and adds it in the History.txt
                showHistory showHistory = new showHistory();
                using (StreamWriter History =
                           File.AppendText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) +
                                           @"\EzclapsBrowser\History.txt"))
                {
                    History.WriteLine(txtSearchBar.Text);
                }
            }));
        }