private void button1_Click(object sender, EventArgs e)
        {
            //try
            //{
            FileInfo f = new FileInfo(txtFile.Text);

            switch (f.Extension)
            {
            case ".xed":
                XedDecrypt xd = new XedDecrypt();
                xd.Decrypt(txtFile.Text, txtName.Text);
                break;

            case ".txt":
                XedEncrypt xe = new XedEncrypt();
                xe.Encrypt(txtFile.Text, f.DirectoryName, txtName.Text);
                break;

            default:
                MessageBox.Show("Error: Invalid File Type");
                break;
            }
            //}
            //catch
            //{
            //    MessageBox.Show("Error 2: Invalid File Type");
            //}
        }
        private void button1_Click(object sender, EventArgs e)
        {
            //try
            //{
                FileInfo f = new FileInfo(txtFile.Text);

                switch(f.Extension)
                {
                    case ".xed":
                        XedDecrypt xd = new XedDecrypt();
                        xd.Decrypt(txtFile.Text,txtName.Text);
                        break;
                    case ".txt":
                        XedEncrypt xe = new XedEncrypt();
                        xe.Encrypt(txtFile.Text, f.DirectoryName,txtName.Text);
                        break;
                    default:
                        MessageBox.Show("Error: Invalid File Type");
                        break;
                }
            //}
            //catch
            //{
            //    MessageBox.Show("Error 2: Invalid File Type");
            //}
        }