Exemple #1
0
        private void addAllPseudoSetlist()
        {
            Setlist setList = new Setlist();

            setList.name = "(All)";
            foreach (Song song in configuration.getSortedSongList())
            {
                setList.songTitles.Add(song.name);
            }
            setList.bind(configuration.songDict, configuration.logicalInputDeviceDict, configuration.soundGenerators, configuration.mappings, configuration.primaryInputDevice);
            configuration.setlists.Insert(0, setList);
        }
Exemple #2
0
        public void refreshAllPseudoSetlist()
        {
            Setlist setList = configuration.setlists.Find(sl => sl.name == "(All)");

            if (setList != null)
            {
                setList.songs.Clear();
                setList.songTitles.Clear();

                foreach (Song song in configuration.getSortedSongList())
                {
                    setList.songTitles.Add(song.name);
                }
                setList.bind(configuration.songDict, configuration.logicalInputDeviceDict, configuration.soundGenerators, configuration.mappings, configuration.primaryInputDevice);
            }
        }
Exemple #3
0
        private void completeSetlistEdit()
        {
            // Gather the changed fields into the temp Setlist object.  (Edits to its Songs will have already been applied...)
            setlistBeingEdited.name = tbSetlistName.Text;

            // Bind the now completed Setlist
            setlistBeingEdited.bind(mapper.configuration.songDict, mapper.configuration.logicalInputDeviceDict, mapper.configuration.soundGenerators, mapper.configuration.mappings, mapper.configuration.primaryInputDevice);

            // Make the changes to the actual model objects
            if (creatingNewSetlist == true)
            {
                mapper.configuration.addSetlist(setlistBeingEdited);
            }
            else
            {
                mapper.configuration.deleteSetlistByName(originalSetlistName);
                mapper.configuration.addSetlist(setlistBeingEdited);

                // TBD: change any UI elements dependent on this setlist.
            }

            // The edit could change what's on the Show tab.  Refresh it.
            if (currentSetlist.name == originalSetlistName)
            {
                currentSetlist = setlistBeingEdited;
                refreshShowControls();
            }

            // Refresh the SetlistEditSelector in case this is a new setlist or its name changed
            refreshSetlistEditSelector();

            // Clean up edit state
            setlistBeingEdited  = null;
            originalSetlistName = "";

            // Hide setlist edit controls
            pnlSetlistEdit.Visible         = false;
            pnlSetlistSongSelector.Visible = false;
            // btnSetlistDel.Enabled = false;
        }