Пример #1
0
        private void buttonDown_Click(object sender, EventArgs e)
        {
            if (SelectedMod == null)
            {
                return;
            }
            if (!SelectedMod.isActiveList)
            {
                return;
            }
            string modFolder = SelectedMod.modFolder;

            for (int i = 0; i < _SmashProjectManager.CurrentProject.ActiveStageMods.Count; ++i)
            {
                if (!_SmashProjectManager.CurrentProject.ActiveStageMods[i].FolderName.Equals(modFolder))
                {
                    continue;
                }
                StageSlotMod mod   = _SmashProjectManager.CurrentProject.ActiveStageMods[i];
                int          index = _SmashProjectManager.CurrentProject.ActiveStageMods.IndexOf(mod);
                _SmashProjectManager.CurrentProject.ActiveStageMods.RemoveAt(index);
                _SmashProjectManager.CurrentProject.ActiveStageMods.Insert(index + 1, mod);
                break;
            }
            RefreshModsLists();
            _GridMods.SelectMod(modFolder);
        }
Пример #2
0
        private void buttonLeft_Click(object sender, EventArgs e)
        {
            if (SelectedMod == null)
            {
                return;
            }
            if (SelectedMod.isActiveList)
            {
                return;
            }

            StageModXML xml = Globals.Utils.OpenStageKamiModFile(SelectedMod.modFolder);

            if (xml == null)
            {
                return;
            }
            int id = xml.IntendedStage;

            for (int i = 0; i < _SmashProjectManager.CurrentProject.ActiveStageMods.Count; ++i)
            {
                if (id == _SmashProjectManager.CurrentProject.ActiveStageMods[i].StageID)
                {
                    MessageBox.Show(String.Format("Cannot activate mod. Stage mod '{0}' is already occupying that stage slot.", _SmashProjectManager.CurrentProject.ActiveStageMods[i].FolderName));
                    return;
                }
            }

            StageSlotMod newActiveMod = new StageSlotMod();

            newActiveMod.FolderName = SelectedMod.modFolder;
            newActiveMod.StageID    = id;
            _SmashProjectManager.CurrentProject.ActiveStageMods.Add(newActiveMod);
            RefreshModsLists();
            _GridMods.SelectMod(newActiveMod.FolderName);
        }