コード例 #1
0
        public ModConfiguratorV1_0_0_0(ManagedMod arg)
        {
            InitializeComponent();
            DataContext = arg;


            SetBody(new TextBlock()
            {
                Text = arg.Description
            });

            ModNameTextBlock.Text = SporeMods.Core.Settings.GetLanguageString(2, "ModInstallerHeader").Replace("%MODNAME%", arg.DisplayName);
        }
コード例 #2
0
        private void comboBoxModArchivePreset_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (isUpdatingSidePanel)
            {
                return;
            }
            foreach (int index in editedIndices)
            {
                ManagedMod editedMod = Mods[index];
                switch (this.comboBoxModArchivePreset.SelectedIndex)
                {
                case 0:     // Please select
                case 1:     // Auto-detect
                    editedMod.Format      = ManagedMod.ArchiveFormat.Auto;
                    editedMod.Compression = ManagedMod.ArchiveCompression.Auto;
                    break;

                case 2:     // General
                    editedMod.Format      = ManagedMod.ArchiveFormat.General;
                    editedMod.Compression = ManagedMod.ArchiveCompression.Compressed;
                    break;

                case 3:     // Textures
                    editedMod.Format      = ManagedMod.ArchiveFormat.Textures;
                    editedMod.Compression = ManagedMod.ArchiveCompression.Compressed;
                    break;

                case 4:     // Audio
                    editedMod.Format      = ManagedMod.ArchiveFormat.General;
                    editedMod.Compression = ManagedMod.ArchiveCompression.Uncompressed;
                    break;
                }
                if (editedMod.Frozen &&
                    (editedMod.Format != editedMod.CurrentFormat ||
                     editedMod.Compression != editedMod.CurrentCompression))
                {
                    ModActions.Unfreeze(editedMod);
                }
            }
            if (!editingBulk)
            {
                UpdateSidePanel();
            }
            UpdateModList();
            UpdateStatusStrip();
            UpdateWarningLabel();
            UpdateSidePanelControls();
            Mods.Save();
        }
コード例 #3
0
        /*
         * Properties changed:
         */


        private void comboBoxModInstallAs_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (isUpdatingSidePanel)
            {
                return;
            }
            foreach (int index in editedIndices)
            {
                ManagedMod editedMod = Mods[index];
                switch (this.comboBoxModInstallAs.SelectedIndex)
                {
                case 0:     // Bundled *.ba2 archive
                    editedMod.Method = ManagedMod.DeploymentMethod.BundledBA2;
                    break;

                case 1:     // Separate *.ba2 archive
                    editedMod.Method = ManagedMod.DeploymentMethod.SeparateBA2;
                    break;

                case 2:     // Loose files
                    editedMod.Method = ManagedMod.DeploymentMethod.LooseFiles;
                    break;
                }
                if (editedMod.Frozen && (editedMod.Method != ManagedMod.DeploymentMethod.SeparateBA2 &&
                                         editedMod.PreviousMethod == ManagedMod.DeploymentMethod.SeparateBA2))
                {
                    ModActions.Unfreeze(editedMod);
                }
            }
            if (!editingBulk)
            {
                UpdateSidePanel();
            }
            UpdateModList();
            UpdateStatusStrip();
            UpdateWarningLabel();
            UpdateSidePanelControls();
            Mods.Save();
        }
コード例 #4
0
 public ModProgressChangedEventArgs(ManagedMod mod, double change)
 {
     Mod    = mod;
     Change = change;
 }