I have attached my code below. I am trying to get the message box to go away after one pop up until another action within the application triggers it.
using (VIModel vi = new VIModel())
{
var VideoFiles = vi.VI_VIDEO_FILES.Where(a => a.SEGMENT_ID == segmentId);
foreach (var vf in VideoFiles)
{
string location = vf.URL;
location = location.Replace('/', '\\');
string[] smain = location.Split('\\');
string unamemain = smain.Last().ToString();
string fileToCopySource = Path.Combine(inputDirectory, location);
string fileToCopyDestination = Path.Combine(outputDirectory, unamemain);
foreach (char c in fileToCopySource)
{
if (fileToCopySource.Contains(c))
{
// notify user that the inputDirectory isn't valid
MessageBox.Show("FOO");
}
}
if (!File.Exists(fileToCopySource))
{
// notify user that file doesn't exist
MessageBox.Show("FOO");
}
//File.Copy(inputDirectory + location, outputDirectory + unamemain, true);
File.Copy(fileToCopySource, fileToCopyDestination, true);
lbConsole.Items.Add("Moved " + location + " from: " + inputDirectory + " to " + fileToCopyDestination);
}
}