Beispiel #1
0
 public ArrangementForm(DLCPackageCreator control, GameVersion gameVersion)
     : this(new Arrangement
     {
         SongFile = new SongFile { File = "" },
         SongXml = new SongXML { File = "" },
         ArrangementType = ArrangementType.Guitar
     }, control, gameVersion)
 {
     EditMode = false;
     Console.WriteLine("Debug");
 }
Beispiel #2
0
 public ArrangementForm(DLCPackageCreator control, GameVersion gameVersion)
     : this(new Arrangement
 {
     SongFile = new SongFile {
         File = ""
     },
     SongXml = new SongXML {
         File = ""
     },
     ArrangementType = ArrangementType.Guitar
 }, control, gameVersion)
 {
 }
Beispiel #3
0
        public ArrangementForm(Arrangement arrangement, DLCPackageCreator control, GameVersion gameVersion)
        {
            InitializeComponent();
            currentGameVersion = gameVersion == GameVersion.RS2012 ? GameVersion.RS2012 : GameVersion.RS2014;

            FillTuningCombo(arrangement.ArrangementType, currentGameVersion);

            foreach (var val in Enum.GetValues(typeof(ArrangementType)))
            {
                arrangementTypeCombo.Items.Add(val);
            }

            // this is a giant EH - careful
            arrangementTypeCombo.SelectedValueChanged += (sender, e) =>
            {
                // Selecting defaults
                var selectedType = ((ArrangementType)((ComboBox)sender).SelectedItem);

                switch (selectedType)
                {
                case ArrangementType.Bass:
                    arrangementNameCombo.Items.Clear();
                    arrangementNameCombo.Items.Add(ArrangementName.Bass);
                    arrangementNameCombo.SelectedItem = ArrangementName.Bass;
                    break;

                case ArrangementType.Vocal:
                    arrangementNameCombo.Items.Clear();
                    arrangementNameCombo.Items.Add(ArrangementName.Vocals);
                    arrangementNameCombo.Items.Add(ArrangementName.JVocals);
                    arrangementNameCombo.SelectedItem = ArrangementName.Vocals;
                    break;

                case ArrangementType.ShowLight:
                    arrangementNameCombo.Items.Clear();
                    arrangementNameCombo.Items.Add(ArrangementName.ShowLights);
                    arrangementNameCombo.SelectedItem = ArrangementName.ShowLights;
                    break;

                default:
                    arrangementNameCombo.Items.Clear();
                    arrangementNameCombo.Items.Add(ArrangementName.Combo);
                    arrangementNameCombo.Items.Add(ArrangementName.Lead);
                    arrangementNameCombo.Items.Add(ArrangementName.Rhythm);
                    arrangementNameCombo.SelectedItem = ArrangementName.Lead;
                    break;
                }

                var selectedArrangementName = (ArrangementName)arrangementNameCombo.SelectedItem;

                // Disabling options that are not meant for Arrangement Types
                // Arrangement Information
                arrangementNameCombo.Enabled = selectedType != ArrangementType.Bass;
                tuningComboBox.Enabled       = (selectedType != ArrangementType.Vocal && selectedType != ArrangementType.ShowLight);
                gbTuningPitch.Enabled        = (selectedType != ArrangementType.Vocal && selectedType != ArrangementType.ShowLight) && currentGameVersion != GameVersion.RS2012;
                gbScrollSpeed.Enabled        = (selectedType != ArrangementType.Vocal && selectedType != ArrangementType.ShowLight);
                Picked.Enabled        = selectedType == ArrangementType.Bass;
                BonusCheckBox.Enabled = gbTuningPitch.Enabled;
                MetronomeCb.Enabled   = gbTuningPitch.Enabled;

                // Gameplay Path
                UpdateRouteMaskPath(selectedType, selectedArrangementName);

                // Tone Selector
                gbTone.Enabled = (selectedType != ArrangementType.Vocal && selectedType != ArrangementType.ShowLight);

                // Arrangement ID
                MasterId.Enabled     = true;
                PersistentId.Enabled = true;

                // Tuning Edit
                tuningEditButton.Enabled = (selectedType != ArrangementType.Vocal && selectedType != ArrangementType.ShowLight);

                // Vocal/ShowLights Edit
                typeEdit.Enabled = (selectedType == ArrangementType.Vocal || selectedType == ArrangementType.ShowLight);

                // Update tuningComboBox
                if ((selectedType != ArrangementType.Vocal && selectedType != ArrangementType.ShowLight))
                {
                    FillTuningCombo(selectedType, currentGameVersion);
                }
            };

            // this EH may cause serious brain damage
            arrangementNameCombo.SelectedValueChanged += (sender, e) =>
            {
                var selectedType            = ((ArrangementType)arrangementTypeCombo.SelectedItem);
                var selectedArrangementName = ((ArrangementName)((ComboBox)sender).SelectedItem);
                UpdateRouteMaskPath(selectedType, selectedArrangementName);
            };

            // this EH may cause serious brain damage
            tuningComboBox.SelectedValueChanged += (sender, e) =>
            {
                // Selecting defaults
                var selectedType   = (ArrangementType)arrangementTypeCombo.SelectedItem;
                var selectedTuning = (TuningDefinition)((ComboBox)sender).SelectedItem;
                tuningEditButton.Enabled = (selectedType != ArrangementType.Vocal && selectedType != ArrangementType.ShowLight) && selectedTuning != null;
            };

            parentControl = control;
            SetupTones(arrangement);
            Arrangement = arrangement; // total update by SET action
            EditMode    = routeMaskNoneRadio.Checked;
        }
Beispiel #4
0
        public ArrangementForm(Arrangement arrangement, DLCPackageCreator control, GameVersion gameVersion) // , string projectDir = "")
        {
            InitializeComponent();

            _gameVersion = gameVersion == GameVersion.RS2012 ? GameVersion.RS2012 : GameVersion.RS2014;
            _parentControl = control;
            _fixLowBass = ConfigRepository.Instance().GetBoolean("creator_fixlowbass");

            foreach (var val in Enum.GetValues(typeof(ArrangementType)))
                cmbArrangementType.Items.Add(val);

            #region Event Handlers

            // this is a giant freak'n EH - CAREFUL
            cmbArrangementType.SelectedValueChanged += (sender, e) =>
                {
                    // Selecting defaults
                    var selectedType = ((ArrangementType)((ComboBox)sender).SelectedItem);

                    switch (selectedType)
                    {
                        case ArrangementType.Bass:
                            cmbArrangementName.Items.Clear();
                            cmbArrangementName.Items.Add(ArrangementName.Bass);
                            cmbArrangementName.SelectedItem = ArrangementName.Bass;
                            break;
                        case ArrangementType.Vocal:
                            cmbArrangementName.Items.Clear();
                            cmbArrangementName.Items.Add(ArrangementName.Vocals);
                            cmbArrangementName.Items.Add(ArrangementName.JVocals);
                            cmbArrangementName.SelectedItem = ArrangementName.Vocals;
                            break;
                        case ArrangementType.ShowLight:
                            cmbArrangementName.Items.Clear();
                            cmbArrangementName.Items.Add(ArrangementName.ShowLights);
                            cmbArrangementName.SelectedItem = ArrangementName.ShowLights;
                            break;
                        default:
                            cmbArrangementName.Items.Clear();
                            cmbArrangementName.Items.Add(ArrangementName.Combo);
                            cmbArrangementName.Items.Add(ArrangementName.Lead);
                            cmbArrangementName.Items.Add(ArrangementName.Rhythm);
                            cmbArrangementName.SelectedItem = ArrangementName.Lead;
                            break;
                    }

                    var selectedArrangementName = (ArrangementName)cmbArrangementName.SelectedItem;
                    var guitarebass = selectedType != ArrangementType.Vocal && selectedType != ArrangementType.ShowLight;
                    // Disabling options that are not meant for Arrangement Types
                    // Arrangement Information
                    chkBassPicked.Enabled = selectedType == ArrangementType.Bass;
                    cmbArrangementName.Enabled = selectedType != ArrangementType.Bass;
                    cmbTuningName.Enabled = guitarebass;
                    gbScrollSpeed.Enabled = guitarebass;
                    gbTuningPitch.Enabled = guitarebass && _gameVersion != GameVersion.RS2012;
                    chkBonusArrangement.Enabled = gbTuningPitch.Enabled;
                    chkMetronome.Enabled = gbTuningPitch.Enabled;
                    //ltFixCb.Enabled = gbTuningPitch.Enabled;

                    // Gameplay Path
                    UpdateRouteMaskPath(selectedType, selectedArrangementName);

                    // Tone Selector
                    gbTone.Enabled = guitarebass;

                    // Arrangement ID
                    txtMasterId.Enabled = true;
                    txtPersistentId.Enabled = true;

                    // Tuning Edit
                    btnEditTuning.Enabled = guitarebass;

                    // Vocal/ShowLights Edit
                    btnEditType.Enabled = !guitarebass;

                    // Update tuningComboBox
                    FillTuningCombo(_gameVersion);

                }; //END EH arrangementTypeCombo.SelectedValueChanged

            // this EH may cause serious brain damage
            cmbArrangementName.SelectedValueChanged += (sender, e) =>
                {
                    var selectedType = ((ArrangementType)cmbArrangementType.SelectedItem);
                    var selectedArrangementName = ((ArrangementName)((ComboBox)sender).SelectedItem);
                    UpdateRouteMaskPath(selectedType, selectedArrangementName);
                };

            // this EH may cause serious brain damage
            cmbTuningName.SelectedValueChanged += (sender, e) =>
                {
                    // Selecting defaults
                    var selectedType = (ArrangementType)cmbArrangementType.SelectedItem;
                    var selectedTuning = (TuningDefinition)((ComboBox)sender).SelectedItem;
                    btnEditTuning.Enabled = (selectedType != ArrangementType.Vocal && selectedType != ArrangementType.ShowLight) && selectedTuning != null;
                };

            #endregion

            SetupTones(arrangement);
            Arrangement = arrangement; // update form using SET action
        }
Beispiel #5
0
        public ArrangementForm(Arrangement arrangement, DLCPackageCreator control, GameVersion gameVersion)
        {
            InitializeComponent();
            currentGameVersion = gameVersion;
            FillTuningCombo();

            foreach (var val in Enum.GetValues(typeof(ArrangementType)))
            {
                arrangementTypeCombo.Items.Add(val);
            }

            arrangementTypeCombo.SelectedValueChanged += (sender, e) => {
                // Selecting defaults
                var selectedType = ((ArrangementType)((ComboBox)sender).SelectedItem);

                switch (selectedType)
                {
                case ArrangementType.Bass:
                    arrangementNameCombo.Items.Clear();
                    arrangementNameCombo.Items.Add(ArrangementName.Bass);
                    arrangementNameCombo.SelectedItem = ArrangementName.Bass;
                    break;

                case ArrangementType.Vocal:
                    arrangementNameCombo.Items.Clear();
                    arrangementNameCombo.Items.Add(ArrangementName.Vocals);
                    arrangementNameCombo.SelectedItem = ArrangementName.Vocals;
                    break;

                default:
                    arrangementNameCombo.Items.Clear();
                    arrangementNameCombo.Items.Add(ArrangementName.Combo);
                    arrangementNameCombo.Items.Add(ArrangementName.Lead);
                    arrangementNameCombo.Items.Add(ArrangementName.Rhythm);
                    arrangementNameCombo.SelectedItem = arrangement.Name;
                    break;
                }

                var selectedArrangementName = ((ArrangementName)((ComboBox)arrangementNameCombo).SelectedItem);

                // Disabling options that are not meant for Arrangement Types
                // Arrangement Information
                arrangementNameCombo.Enabled = selectedType == ArrangementType.Guitar;
                tuningComboBox.Enabled       = selectedType != ArrangementType.Vocal;
                gbTuningPitch.Enabled        = selectedType != ArrangementType.Vocal && currentGameVersion == GameVersion.RS2014;
                gbScrollSpeed.Enabled        = selectedType != ArrangementType.Vocal;
                Picked.Enabled        = selectedType == ArrangementType.Bass;
                Picked.Checked        = selectedType == ArrangementType.Bass ? false : true;
                BonusCheckBox.Enabled = selectedType != ArrangementType.Vocal && currentGameVersion == GameVersion.RS2014;
                UpdateCentOffset();

                // Gameplay Path
                UpdateRouteMaskPath(selectedType, selectedArrangementName);

                // Tone Selector
                gbTone.Enabled = selectedType != ArrangementType.Vocal;

                // Arrangement ID
                MasterId.Enabled     = selectedType != ArrangementType.Vocal;
                PersistentId.Enabled = selectedType != ArrangementType.Vocal;

                // Tuning Edit
                tuningEditButton.Enabled = selectedType != ArrangementType.Vocal;
            };

            arrangementNameCombo.SelectedValueChanged += (sender, e) =>
            {
                var selectedType            = ((ArrangementType)((ComboBox)arrangementTypeCombo).SelectedItem);
                var selectedArrangementName = ((ArrangementName)((ComboBox)sender).SelectedItem);

                UpdateRouteMaskPath(selectedType, selectedArrangementName);
            };

            tuningComboBox.SelectedValueChanged += (sender, e) => {
                // Selecting defaults
                var selectedType   = ((ArrangementType)((ComboBox)arrangementTypeCombo).SelectedItem);
                var selectedTuning = ((TuningDefinition)((ComboBox)sender).SelectedItem);
                tuningEditButton.Enabled = selectedType != ArrangementType.Vocal && selectedTuning != null;
            };

            var scrollSpeed = arrangement.ScrollSpeed;

            if (scrollSpeed == 0)
            {
                scrollSpeed = Convert.ToInt32(ConfigRepository.Instance().GetDecimal("creator_scrollspeed") * 10);
            }
            scrollSpeedTrackBar.Value = scrollSpeed;
            UpdateScrollSpeedDisplay();
            parentControl = control;

            //Tones setup
            SetupTones(arrangement);

            Arrangement = arrangement;
        }
Beispiel #6
0
        public ArrangementForm(Arrangement arrangement, DLCPackageCreator control, GameVersion gameVersion)
        {
            InitializeComponent();
            currentGameVersion = gameVersion;
            FillTuningCombo();

            foreach (var val in Enum.GetValues(typeof(ArrangementType)))
            {
                arrangementTypeCombo.Items.Add(val);
            }

            arrangementTypeCombo.SelectedValueChanged += (sender, e) => {
                // Selecting defaults
                var selectedType = ((ArrangementType)((ComboBox)sender).SelectedItem);

                switch (selectedType)
                {
                case ArrangementType.Bass:
                    arrangementNameCombo.Items.Clear();
                    arrangementNameCombo.Items.Add(ArrangementName.Bass);
                    arrangementNameCombo.SelectedItem = ArrangementName.Bass;
                    break;

                case ArrangementType.Vocal:
                    arrangementNameCombo.Items.Clear();
                    arrangementNameCombo.Items.Add(ArrangementName.Vocals);
                    arrangementNameCombo.Items.Add(ArrangementName.JVocals);
                    arrangementNameCombo.SelectedItem = ArrangementName.Vocals;
                    break;

                default:
                    arrangementNameCombo.Items.Clear();
                    arrangementNameCombo.Items.Add(ArrangementName.Combo);
                    arrangementNameCombo.Items.Add(ArrangementName.Lead);
                    arrangementNameCombo.Items.Add(ArrangementName.Rhythm);
                    arrangementNameCombo.SelectedItem = ArrangementName.Lead;
                    break;
                }

                var selectedArrangementName = (ArrangementName)arrangementNameCombo.SelectedItem;

                // Disabling options that are not meant for Arrangement Types
                // Arrangement Information
                arrangementNameCombo.Enabled = selectedType != ArrangementType.Bass;
                tuningComboBox.Enabled       = selectedType != ArrangementType.Vocal;
                gbTuningPitch.Enabled        = selectedType != ArrangementType.Vocal && currentGameVersion == GameVersion.RS2014;
                gbScrollSpeed.Enabled        = selectedType != ArrangementType.Vocal;
                Picked.Enabled        = selectedType == ArrangementType.Bass;
                BonusCheckBox.Enabled = gbTuningPitch.Enabled;
                MetronomeCb.Enabled   = gbTuningPitch.Enabled;
                UpdateCentOffset();

                // Gameplay Path
                UpdateRouteMaskPath(selectedType, selectedArrangementName);

                // Tone Selector
                gbTone.Enabled = selectedType != ArrangementType.Vocal;

                // Arrangement ID
                MasterId.Enabled     = selectedType != ArrangementType.Vocal;
                PersistentId.Enabled = selectedType != ArrangementType.Vocal;

                // Tuning Edit
                tuningEditButton.Enabled = selectedType != ArrangementType.Vocal;

                // Vocal Edit
                vocalEdit.Enabled = selectedType == ArrangementType.Vocal;
            };

            arrangementNameCombo.SelectedValueChanged += (sender, e) =>
            {
                var selectedType            = ((ArrangementType)arrangementTypeCombo.SelectedItem);
                var selectedArrangementName = ((ArrangementName)((ComboBox)sender).SelectedItem);

                UpdateRouteMaskPath(selectedType, selectedArrangementName);
            };

            tuningComboBox.SelectedValueChanged += (sender, e) => {
                // Selecting defaults
                var selectedType   = (ArrangementType)arrangementTypeCombo.SelectedItem;
                var selectedTuning = (TuningDefinition)((ComboBox)sender).SelectedItem;
                tuningEditButton.Enabled = selectedType != ArrangementType.Vocal && selectedTuning != null;
            };

            parentControl = control;

            //Tones setup
            SetupTones(arrangement);

            Arrangement = arrangement;
            EditMode    = routeMaskNoneRadio.Checked;
        }