private void ParseV2SequenceData()
        {
            parsedV2Sequence = new Vixen2SequenceData(vixen2ImportFile);

            if (!String.IsNullOrEmpty(parsedV2Sequence.ProfilePath))
            {
                vixen2ProfileTextBox.Text         = string.Format(@"{0}\{1}.pro", parsedV2Sequence.ProfilePath, parsedV2Sequence.ProfileName);
                vixen2ToVixen3MappingListBox.Text = parsedV2Sequence.ProfileName;
            }
            else
            {
                vixen2ProfileTextBox.Text = parsedV2Sequence.ProfileName;
            }
        }
        public Vixen3SequenceCreator(Vixen2SequenceData v2Sequence, List <ChannelMapping> list)
        {
            parsedV2Sequence = v2Sequence;
            mappings         = list;

            conversionProgressBar = new CoversionProgressForm();
            conversionProgressBar.Show();

            conversionProgressBar.SetupProgressBar(0, sizeof(patternType) * parsedV2Sequence.ElementCount);

            conversionProgressBar.StatusLineLabel = string.Empty;

            createTimedSequence();
            importSequenceData();

            conversionProgressBar.Close();
        }
        public Vixen3SequenceCreator(Vixen2SequenceData v2Sequence, List<ChannelMapping> list)
        {
            parsedV2Sequence = v2Sequence;
            mappings = list;

            conversionProgressBar = new CoversionProgressForm();
            conversionProgressBar.Show();

            conversionProgressBar.SetupProgressBar(0, sizeof (patternType)*parsedV2Sequence.ElementCount);

            conversionProgressBar.StatusLineLabel = string.Empty;

            createTimedSequence();
            importSequenceData();

            conversionProgressBar.Close();
        }
Exemple #4
0
        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);
        }
        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;
        }
        private void ParseV2SequenceData()
        {
            parsedV2Sequence = new Vixen2SequenceData(vixen2ImportFile);

            if (!String.IsNullOrEmpty(parsedV2Sequence.ProfilePath)) {
                vixen2ProfileTextBox.Text = string.Format(@"{0}\{1}.pro", parsedV2Sequence.ProfilePath, parsedV2Sequence.ProfileName);
                vixen2ToVixen3MappingListBox.Text = parsedV2Sequence.ProfileName;
            }
            else {
                vixen2ProfileTextBox.Text = parsedV2Sequence.ProfileName;
            }
        }