예제 #1
0
        public NameUpdatePage(SongPage page)
        {
            // Don't show the navigation action bar
            NavigationPage.SetHasNavigationBar(this, false);

            InitializeComponent();
            ParentPage = page;
        }
        public SongSelectPage(SongPage parentPage, string[] songFiles)
        {
            InitializeComponent();

            // Don't show the navigation action bar
            NavigationPage.SetHasNavigationBar(this, false);

            ParentPage = parentPage;
            ObservableCollection <SongFile> files = new ObservableCollection <SongFile>();

            foreach (string s in songFiles)
            {
                files.Add(new SongFile(s));
            }
            this.SongFiles = files;
            BindingContext = this;
        }
예제 #3
0
        public SectionPage(SongPage parentPage, SectionList sections, int sectionIndex)
        {
            // Don't show the navigation action bar
            NavigationPage.SetHasNavigationBar(this, false);

            // Duplicate the passed song
            ParentPage     = parentPage;
            ParentSections = sections;
            SectionIndex   = sectionIndex;
            WorkingSection = Section.DuplicateSection(ParentSections[SectionIndex]);

            // Initialise the page with its XAML and such
            InitializeComponent();
            BindingContext = this;
            pickBeatsPerMeasure.SelectedIndex = WorkingSection.BeatsPerMeasure - 1;
            pickBeatValue.SelectedIndex       = WorkingSection.BeatValue == 4 ? 0 : 1;
            sliderTempo.Value = (WorkingSection.Tempo - 44.0) / 2.56;
            TempoSliderChanged(null, null);
            labelReps.Text = String.Format("Play {0} times", WorkingSection.Repetitions);

            // Validate the section and display it
            CursorPos = 0;
            layoutSectionDisplay.MeasurePerformed += () => UpdateDisplay();
        }