Exemplo n.º 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();
        }
Exemplo n.º 2
0
        private void comboProfiles_SelectedIndexChanged(object sender, EventArgs e)
        {
            ExportProfile item = comboProfiles.SelectedItem as ExportProfile;

            if (item == null)
            {
                return;
            }

            _data.ActiveProfile = item;
        }
Exemplo n.º 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);
        }
Exemplo n.º 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();
        }
Exemplo n.º 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();
        }
Exemplo n.º 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);
        }
Exemplo n.º 8
0
 internal void ConfigureExport(ExportProfile profile)
 {
     Export.ControllerExportInfo = profile.Controllers;
     Export.UpdateInterval       = profile.Interval;
 }