public static GuitarChordStrum CreateStrum(GuitarChord chord, ChordStrum strum)
        {
            GuitarChordStrum ret = null;

            if (!chord.HasStrumMode(strum) && Utility.GetStrumData1(chord.Difficulty).IsNotNull())
            {
                ret       = new GuitarChordStrum(chord, strum.GetModifierType());
                ret.IsNew = true;
                ret.CreateEvents();
            }
            return(ret);
        }
示例#2
0
        public void AddStrum(ChordStrum strum, bool createEvents)
        {
            if (strum != ChordStrum.Normal && !HasStrum)
            {
                if (strum.HasFlag(ChordStrum.High))
                {
                    var gs = new GuitarChordStrum(this, ChordModifierType.ChordStrumHigh);

                    gs.IsNew = true;

                    Modifiers.Add(gs);

                    if (createEvents)
                    {
                        gs.CreateEvents();
                    }
                }
                if (strum.HasFlag(ChordStrum.Mid))
                {
                    var gs = new GuitarChordStrum(this, ChordModifierType.ChordStrumMed);

                    gs.IsNew = true;

                    Modifiers.Add(gs);

                    if (createEvents)
                    {
                        gs.CreateEvents();
                    }
                }
                if (strum.HasFlag(ChordStrum.Low))
                {
                    var gs = new GuitarChordStrum(this, ChordModifierType.ChordStrumLow);

                    gs.IsNew = true;

                    Modifiers.Add(gs);

                    if (createEvents)
                    {
                        gs.CreateEvents();
                    }
                }
            }
        }