示例#1
0
        private void buttonDeleteProfile_Click(object sender, EventArgs e)
        {
            ExportProfile item = comboProfiles.SelectedItem as ExportProfile;

            if (item == null)
            {
                return;
            }

            var messageBox = new MessageBoxForm("Are you sure you want to delete this profile?",
                                                @"Delete a Profile", MessageBoxButtons.OKCancel, SystemIcons.Warning);

            messageBox.ShowDialog();

            if (messageBox.DialogResult == DialogResult.OK)
            {
                _profiles.Remove(item);
                if (comboProfiles.Items.Count > 0)
                {
                    comboProfiles.SelectedIndex = 0;
                    _data.ActiveProfile         = comboProfiles.SelectedItem as ExportProfile;
                }
                else
                {
                    _data.ActiveProfile = null;
                }
            }

            _WizardStageChanged();
        }
示例#2
0
        private void comboProfiles_SelectedIndexChanged(object sender, EventArgs e)
        {
            ExportProfile item = comboProfiles.SelectedItem as ExportProfile;

            if (item == null)
            {
                return;
            }

            _data.ActiveProfile = item;
        }
示例#3
0
        public object Clone()
        {
            var data = new ExportProfile()
            {
                Name              = Name,
                Id                = Id,
                SequenceFiles     = SequenceFiles.ToList(),
                Controllers       = Controllers.Select(x => x.Clone() as Controller).ToList(),
                Format            = Format,
                Interval          = Interval,
                OutputFolder      = OutputFolder,
                IncludeAudio      = IncludeAudio,
                RenameAudio       = RenameAudio,
                AudioOutputFolder = AudioOutputFolder
            };

            return(data);
        }
示例#4
0
        private void buttonAddProfile_Click(object sender, EventArgs e)
        {
            var response = GetProfileName("New Profile");

            if (!response.Item1)
            {
                return;
            }

            ExportProfile item = _data.CreateDefaultProfile();

            item.Name = response.Item2;
            _profiles.Add(item);
            _data.ActiveProfile         = item;
            comboProfiles.SelectedIndex = comboProfiles.Items.Count - 1;

            _WizardStageChanged();
        }
示例#5
0
        private void PopulateProfiles()
        {
            int profileCount = _data.Profiles.Count;

            if (profileCount == 0)
            {
                ExportProfile profile = _data.CreateDefaultProfile();
                _data.Profiles.Add(profile);
            }

            _profiles = new BindingList <ExportProfile>(_data.Profiles);

            comboProfiles.DataSource = new BindingSource {
                DataSource = _profiles
            };
            comboProfiles.SelectedIndex = 0;

            _WizardStageChanged();
        }
        private void comboProfiles_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (_initializing)
            {
                return;
            }
            ExportProfile item = comboProfiles.SelectedItem as ExportProfile;

            if (item == null)
            {
                return;
            }

            if (radioSelectExisting.Checked)
            {
                _data.ActiveProfile = item.Clone() as ExportProfile;
            }

            _WizardStageChanged();
        }
示例#7
0
        public object Clone()
        {
            var data = new ExportProfile()
            {
                Name               = Name,
                Id                 = Id,
                SequenceFiles      = SequenceFiles.ToList(),
                Controllers        = Controllers.Select(x => x.Clone() as Controller).ToList(),
                Format             = Format,
                Interval           = Interval,
                OutputFolder       = OutputFolder,
                IncludeAudio       = IncludeAudio,
                RenameAudio        = RenameAudio,
                AudioOutputFolder  = AudioOutputFolder,
                FalconOutputFolder = FalconOutputFolder,
                CreateUniverseFile = CreateUniverseFile,
                BackupUniverseFile = BackupUniverseFile,
                EnableCompression  = EnableCompression
            };

            return(data);
        }
示例#8
0
 internal void ConfigureExport(ExportProfile profile)
 {
     Export.ControllerExportInfo = profile.Controllers;
     Export.UpdateInterval       = profile.Interval;
 }