public ReceiverSourceList(HelperKinsky aHelperKinsky) { iPendingModelSourceReceiverList = new SortedList <string, ModelSourceReceiver>(); iModelSourceReceiverList = new SortedList <string, ModelSourceReceiver>(); iSourceList = new SourceList(aHelperKinsky.TopologyHouse, delegate(Linn.Topology.Source aSource) { return(aSource.Type == "Receiver"); }); iSourceList.EventSourceAdded += SourceAdded; iSourceList.EventSourceRemoved += SourceRemoved; }
public LocalPlaylistSupport(HelperKinsky aHelper, LocalPlaylistFileNameGenerator aNameGenerator) { // create the options page OptionPage optionPage = new OptionPage("Local Playlists"); iOptionSaveDirectory = new OptionFolderPath("playlistpath", "Local playlist path", "Path where local playlists are saved", Path.Combine(aHelper.DataPath.FullName, "Playlists")); optionPage.Add(iOptionSaveDirectory); aHelper.AddOptionPage(optionPage); // listen for changes to the save directory option iOptionSaveDirectory.EventValueChanged += SaveDirectoryChanged; iCreator = new LocalPlaylistCreator(aNameGenerator); iRootContainer = new LocalPlaylistsRoot(iCreator, iOptionSaveDirectory); }
public SharedPlaylists(HelperKinsky aHelper) { iEventProvider = aHelper.EventServer; iLock = new object(); iStarted = false; iMetadata = new container(); iMetadata.Id = kRootId; iMetadata.Title = "Shared Playlists"; iMetadata.WriteStatus = "PROTECTED"; iMetadata.Restricted = true; iMetadata.Searchable = true; iOpenPlaylistManagers = new SortedList <PlaylistManager, ModelPlaylistManager>(new PlaylistManagerComparer()); iPlaylistManagers = new Dictionary <PlaylistManager, ModelPlaylistManager>(); iManagers = new PlaylistManagers(aHelper.SsdpNotifyProvider); }
public MediaProviderLibrary(HelperKinsky aHelper) { iEventProvider = aHelper.EventServer; iLock = new object(); iStarted = false; iMetadata = new container(); iMetadata.Id = kLibraryId; iMetadata.Title = "Library"; iMetadata.WriteStatus = "PROTECTED"; iMetadata.Restricted = true; iMetadata.Searchable = true; iOptionCloudServers = aHelper.CloudServers; iOptionCloudServers.EventValueChanged += CloudServersChanged; iMediaServers = new SortedList <MediaServer, ModelMediaServer>(new MediaServerComparer()); iLibrary = new Library(aHelper.SsdpNotifyProvider); CloudServersChanged(this, EventArgs.Empty); }
public SaveSupport(HelperKinsky aHelper, SharedPlaylists aSharedPlaylists, OptionBool aOptionSharedPlaylists, LocalPlaylists aLocalPlaylists, OptionBool aOptionLocalPlaylists) { iInvoker = aHelper.Invoker; iOptionSaveLocation = new OptionString("savelocation", "Save Location", "Location to save playlists to", "Local Playlists"); aHelper.AddOption(iOptionSaveLocation); iOptionSaveLocation.EventValueChanged += SaveLocationChanged; iSharedPlaylists = aSharedPlaylists; iSharedPlaylists.EventContentAdded += PlaylistsChanged; iSharedPlaylists.EventContentRemoved += PlaylistsChanged; iSharedPlaylists.EventContentUpdated += PlaylistsChanged; iOptionSharedPlaylists = aOptionSharedPlaylists; iOptionSharedPlaylists.EventValueChanged += PlaylistsChanged; iLocalPlaylists = aLocalPlaylists; iOptionLocalPlaylists = aOptionLocalPlaylists; iOptionLocalPlaylists.EventValueChanged += PlaylistsChanged; PlaylistsChanged(this, EventArgs.Empty); }