All pastes #403079 Raw Edit

Stuff

public text v1 · immutable
·published 2007-03-20 04:36 UTC
rendered paste body
        private void btn_Install_Click(object sender, EventArgs e)
        {
            bool error;
            if (txt_Browse.Text == "")
            {
                MessageBox.Show("Please choose your Browser Plugin Dir");
                error = true;
                
            }
            if (txt_Plugin.Text == "")
            {
                MessageBox.Show("Please Select A Browser");
                error = true;
            }
           
            // Install Code
            if(error == false)
            {
                try
                {
                    File.Copy(txt_Plugin.Text, txt_Browse.Text);
                }

                catch (System.IO.FileNotFoundException)
                {
                    MessageBox.Show("Unable to locate Key File");
                }
                catch (System.IO.DirectoryNotFoundException)
                {
                    MessageBox.Show("Unable to locate Directory");
                }
            }
            else if (error == true)
            {
                error = false;
            }
        }