Microsoft.Win32.OpenFileDialog openFileDialog1 = new Microsoft.Win32.OpenFileDialog();
openFileDialog1.Filter = "(*.cup)|*.cup";
if (openFileDialog1.ShowDialog() == true)
{
MessageBox.Show(openFileDialog1.FileName);
}