Example #1
0
        public void GotoSection(StyleSections section, bool instant)
        {
            MIDIMarker oldMarker = CurrentMarker;

            CurrentMarker         = GetMarkerOnSection(section);
            CurrentMarker.Section = section;
            StyleSections nextSection = GetNextSection(CurrentMarker);

            NextMarker         = GetMarkerOnSection(nextSection);
            NextMarker.Section = nextSection;
            if (CurrentMarker == null)
            {
                isPlaying = false;
            }
            else
            {
                isPlaying = true;
                Tracks[0].CurrentEventIndex = CurrentMarker.StartIndex;
                currentSongPosition         = Tracks[0].MidiEvents[CurrentMarker.StartIndex].absTime;
            }
            if (oldMarker != CurrentMarker)
            {
                AllNotesOff();
                OnSectionChangeEvent();
            }
        }
Example #2
0
        protected StylerButton GetButtonBySection(StyleSections currentSection)
        {
            int resId;

            switch (currentSection)
            {
            case StyleSections.IntroA: resId = Resource.Id.IntroA; break;

            case StyleSections.IntroB: resId = Resource.Id.IntroB; break;

            case StyleSections.IntroC: resId = Resource.Id.IntroC; break;

            case StyleSections.IntroD: resId = Resource.Id.IntroD; break;    // false section


            case StyleSections.MainA: resId = Resource.Id.MainA; break;

            case StyleSections.MainB: resId = Resource.Id.MainB; break;

            case StyleSections.MainC: resId = Resource.Id.MainC; break;

            case StyleSections.MainD: resId = Resource.Id.MainD; break;

            case StyleSections.FillInAA: resId = Resource.Id.FillA; break;

            case StyleSections.FillInAB: resId = Resource.Id.FillB; break;

            case StyleSections.FillInBA: resId = Resource.Id.FillA; break;

            case StyleSections.FillInBB: resId = Resource.Id.FillB; break;

            case StyleSections.FillInCC: resId = Resource.Id.FillC; break;

            case StyleSections.FillInDD: resId = Resource.Id.FillD; break;

            case StyleSections.EndingA: resId = Resource.Id.EndingA; break;

            case StyleSections.EndingB: resId = Resource.Id.EndingB; break;

            case StyleSections.EndingC: resId = Resource.Id.EndingC; break;

            case StyleSections.EndingD: resId = Resource.Id.EndingD; break;     // false section

            default: return(null);
            }
            return((StylerButton)fragmentView.FindViewById(resId));
        }
Example #3
0
        public static string GetSectionName(StyleSections styleSection)
        {
            switch (styleSection)
            {
            case StyleSections.Init: return("Init");

            case StyleSections.IntroA: return("Intro A");

            case StyleSections.IntroB: return("Intro B");

            case StyleSections.IntroC: return("Intro C");

            case StyleSections.MainA: return("Main A");

            case StyleSections.MainB: return("Main B");

            case StyleSections.MainC: return("Main C");

            case StyleSections.MainD: return("Main D");

            case StyleSections.FillInAA: return("Fill In AA");

            case StyleSections.FillInBB: return("Fill In BB");

            case StyleSections.FillInCC: return("Fill In CC");

            case StyleSections.FillInDD: return("Fill In DD");

            case StyleSections.FillInBA: return("Fill In BA");

            case StyleSections.FillInAB: return("Fill In AB");

            case StyleSections.EndingA: return("Ending A");

            case StyleSections.EndingB: return("Ending B");

            case StyleSections.EndingC: return("Ending C");

            default: return(null);
            }
        }
Example #4
0
        public void SetButtonMode(StyleSections currentSection, StyleSections nextSection)
        {
            StylerButtonMode xMode;

            foreach (StyleSections section in System.Enum.GetValues(typeof(StyleSections)))
            {
                if (section == currentSection)
                {
                    xMode = StylerButtonMode.SbActive;
                }
                else
                if (section == nextSection)
                {
                    xMode = StylerButtonMode.sbFlash;
                }
                else
                {
                    xMode = StylerButtonMode.sbEnabled;
                }
                GetButtonBySection(section)?.SetMode(xMode);
            }
        }
Example #5
0
 protected MIDIMarker GetMarkerOnSection(StyleSections section)
 {
     //TODO  Убрать бред...наф... полностью
     return(Tracks[0].MidiMarkers.Where(j => j.Name == Common.GetSectionName(section)).FirstOrDefault());
 }