public bool ProcessFile(string Vixen2File)
{
var result = false;
this.Show();
this.Text = "Importing " + Path.GetFileName(Vixen2File);
parsedV2Sequence = new Vixen2SequenceData(Vixen2File);
// make a channel mapping, and present that to the user. Not editable at the moment.
mappings = new List<ChannelMapping>();
foreach (ElementNode element in VixenSystem.Nodes.GetLeafNodes()) {
if (mappings.Count >= parsedV2Sequence.ElementCount)
break;
string newName = "Channel " + (mappings.Count + 1).ToString();
mappings.Add(new ChannelMapping(newName, element));
}
// pad out the mappings with null elements; we want to be able to not map some stuff (later on)
while (mappings.Count < parsedV2Sequence.ElementCount) {
string newName = "Channel " + (mappings.Count + 1).ToString();
mappings.Add(new ChannelMapping(newName, null));
}
initializeProgressBar();
// show the user the mapping form
Vixen2xSequenceImporterChannelMapper mappingForm = new Vixen2xSequenceImporterChannelMapper(mappings);
mappingForm.ShowDialog();
createTimedSequence();
importSequenceData(mappings);
result = true;
Close();
return result;
}