- March 11, 2012
- 73
- 17
- 45
- Home Country
-
United States of America
Hello, I am trying to make a progress bar work within my TV Management program, I gotten the XML file together and declared it within the C# code, but haven't gotten the actual code to work properly. I keep getting the error that "Value is not in the Mediaportal Library"
string[] files = Directory.GetFiles(Read);
int count = files.Length;
int current = 1;
progressBar1.Value = 1;
foreach (string file in files)
{
var fileName = Path.GetFileName(file);
var destFile = Path.Combine(ReadDest, fileName);
current++;
progressBar1.Value = current / count * 30 + 70;
File.Copy(file, destFile, true);
string[] files = Directory.GetFiles(Read);
int count = files.Length;
int current = 1;
progressBar1.Value = 1;
foreach (string file in files)
{
var fileName = Path.GetFileName(file);
var destFile = Path.Combine(ReadDest, fileName);
current++;
progressBar1.Value = current / count * 30 + 70;
File.Copy(file, destFile, true);