public LocalPlaylists(IHelper aHelper, bool aAddOptionPage) { iLock = new object(); iOptionSaveDirectory = new OptionFolderPath("playlistpath", "Local playlist path", "Path where local playlists are saved", Path.Combine(aHelper.DataPath.FullName, "Playlists")); if (aAddOptionPage) { // create the options page OptionPage optionPage = new OptionPage("Local Playlists"); optionPage.Add(iOptionSaveDirectory); aHelper.AddOptionPage(optionPage); } else { aHelper.AddOption(iOptionSaveDirectory); } // listen for changes to the save directory option iOptionSaveDirectory.EventValueChanged += SaveDirectoryChanged; // initialise as being in its error state iPlaylists = null; iWrapped = new LocalPlaylistsRootError(kRootId); iWrapped.EventContentUpdated += ContentUpdated; iWrapped.EventContentAdded += ContentAdded; iWrapped.EventContentRemoved += ContentRemoved; Refresh(); }
public HelperKinsky(string[] aArgs, IInvoker aInvoker) : base(aArgs) { iInvoker = aInvoker; iEventServer = new EventServerUpnp(); iListenerNotify = new SsdpListenerMulticast(); IModelFactory factory = new ModelFactory(); iTopologyHouse = new Linn.Topology.House(iListenerNotify, iEventServer, factory); iSenders = new ModelSenders(iListenerNotify, iEventServer); iHouse = new House(iTopologyHouse, iInvoker, iSenders); OptionPage optionPage = new OptionPage("Startup Room"); iOptionStartupRoom = new OptionStartupRoom(iHouse); optionPage.Add(iOptionStartupRoom); AddOptionPage(optionPage); //optionPage = new OptionPage("Cloud Servers"); iOptionCloudServers = new OptionListUri("cloudservers", "Server locations", "List of locations for cloud media servers", new List <Uri>()); //optionPage.Add(iOptionCloudServers); //AddOptionPage(optionPage); iOptionLastSelectedRoom = new OptionString("lastroom", "Last Selected Room", "The last room selected", string.Empty); AddOption(iOptionLastSelectedRoom); iOptionLastLocation = new OptionBreadcrumbTrail("lastlocation", "Last Location", "The last location visited by the browser", BreadcrumbTrail.Default); AddOption(iOptionLastLocation); iBookmarkManager = new BookmarkManager(Path.Combine(DataPath.FullName, "Bookmarks.xml")); Stack.SetStack(this); }
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 HelperKinsky(string[] aArgs, IInvoker aInvoker) : base(aArgs) { iInvoker = aInvoker; iEventServer = new EventServerUpnp(); iListenerNotify = new SsdpListenerMulticast(); IModelFactory factory = new ModelFactory(); iTopologyHouse = new Linn.Topology.House(iListenerNotify, iEventServer, factory); iSenders = new ModelSenders(iListenerNotify, iEventServer); iHouse = new House(iTopologyHouse, iInvoker, iSenders); OptionPage optionPage = new OptionPage("Startup Room"); iOptionStartupRoom = new OptionStartupRoom(iHouse); optionPage.Add(iOptionStartupRoom); AddOptionPage(optionPage); //optionPage = new OptionPage("Cloud Servers"); iOptionCloudServers = new OptionListUri("cloudservers", "Server locations", "List of locations for cloud media servers", new List <Uri>()); //optionPage.Add(iOptionCloudServers); //AddOptionPage(optionPage); iOptionInstallId = new OptionString("installid", "InstallId", "Unique installation identifer", Guid.NewGuid().ToString()); AddOption(iOptionInstallId); iOptionLastNotificationVersion = new OptionUint("lastnotificationversion", "LastNotificationVersion", "last version of notification feed viewed", 0); AddOption(iOptionLastNotificationVersion); iOptionLastAcknowledgedNotificationVersion = new OptionUint("lastacknowledgednotificationversion", "LastAcknowledgedNotificationVersion", "last version of notification feed acknowledged", 0); AddOption(iOptionLastAcknowledgedNotificationVersion); iOptionLastNotificationDate = new OptionDateTime("lastnotificationdate", "LastNotificationDate", "last date notification feed viewed", DateTime.MinValue); AddOption(iOptionLastNotificationDate); iOptionLastSelectedRoom = new OptionString("lastroom", "Last Selected Room", "The last room selected", string.Empty); AddOption(iOptionLastSelectedRoom); iOptionLastLocation = new OptionBreadcrumbTrail("lastlocation", "Last Location", "The last location visited by the browser", BreadcrumbTrail.Default); AddOption(iOptionLastLocation); iBookmarkManager = new BookmarkManager(Path.Combine(DataPath.FullName, "Bookmarks.xml")); Stack.SetStack(this); }
public MediaProviderFolder(string aDataPath, IContentDirectorySupportV2 aSupport) { iSupport = aSupport; iMutex = new Mutex(false); iFolders = new List <string>(); string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName); iMetadata = new container(); iMetadata.Id = kRootId; iMetadata.Title = Name; iMetadata.WriteStatus = "PROTECTED"; iMetadata.Restricted = false; iMetadata.Searchable = true; iMetadata.AlbumArtUri.Add(iSupport.VirtualFileSystem.Uri(Path.Combine(path, "Folder.png"))); iPage = new OptionPage("Folders"); iOption = new OptionListFolderPath("folders", "Folders", "Folders to be included"); iPage.Add(iOption); iOption.EventValueChanged += FoldersChanged; }
internal void InitialiseStack() { OptionPage generalOptionsPage = new OptionPage("General"); iHideCursorOption = new OptionBool("hidecursor", "Hide Cursor", "Hide Cursor", false); generalOptionsPage.Add(iHideCursorOption); iRotaryControlsOption = new OptionBool("rotarycontrol", "Use rotary controls", "Use rotary controls", true); generalOptionsPage.Add(iRotaryControlsOption); iShowToolTipsOption = new OptionBool("tooltips", "Show tooltips", "Show tooltips", true); generalOptionsPage.Add(iShowToolTipsOption); iShowExtendedTrackInfoOption = new OptionBool("trackinfo", "Extended track info", "Show extended track information", true); generalOptionsPage.Add(iShowExtendedTrackInfoOption); iGroupPlaylistOption = new OptionBool("groupplaylist", "Group playlist items by album", "Allows grouping of items within the playlist window", false); generalOptionsPage.Add(iGroupPlaylistOption); iTransparentOption = new OptionBool("customwindow", "Transparent window (requires restart)", "Toggles custom window", true); generalOptionsPage.Add(iTransparentOption); iSoftwareRenderingOption = new OptionBool("softwarerendering", "Force software rendering (requires restart)", "Disables hardware rendering for troublesome display cards", false); generalOptionsPage.Add(iSoftwareRenderingOption); iHelper.AddOptionPage(generalOptionsPage); iOptionPageUpdates = new OptionPageUpdates(iHelper); iHelper.AddOptionPage(iOptionPageUpdates); OptionPage fontsOptionPage = new OptionPage("Fonts"); iFontsOption = new OptionEnum("fontsize", "Font size", "Font size"); iFontsOption.AddDefault(kFontOptionNormal); iFontsOption.Add(kFontOptionLarge); fontsOptionPage.Add(iFontsOption); iHideCursorOption.EventValueChanged += OnOptionChanged; iRotaryControlsOption.EventValueChanged += OnOptionChanged; iShowToolTipsOption.EventValueChanged += OnOptionChanged; iShowExtendedTrackInfoOption.EventValueChanged += OnOptionChanged; iFontsOption.EventValueChanged += OnOptionChanged; iTransparentOption.EventValueChanged += OnOptionChanged; iOptionPageUpdates.EventBetaVersionsChanged += OnUpdatesChanged; iOptionPageUpdates.EventAutoUpdateChanged += OnUpdatesChanged; iHelper.AddOptionPage(fontsOptionPage); iViewMaster = new ViewMaster(); iHttpServer = new HttpServer(HttpServer.kPortKinskyDesktop); iHttpClient = new HttpClient(); iLibrary = new MediaProviderLibrary(iHelper); iSharedPlaylists = new SharedPlaylists(iHelper); iLocalPlaylists = new LocalPlaylists(iHelper, true); iSupport = new MediaProviderSupport(iHttpServer); PluginManager pluginManager = new PluginManager(iHelper, iHttpClient, iSupport); iLocator = new ContentDirectoryLocator(pluginManager, new AppRestartHandler()); OptionBool optionSharedPlaylists = iLocator.Add(SharedPlaylists.kRootId, iSharedPlaylists); OptionBool optionLocalPlaylists = iLocator.Add(LocalPlaylists.kRootId, iLocalPlaylists); iLocator.Add(MediaProviderLibrary.kLibraryId, iLibrary); iHelper.AddOptionPage(iLocator.OptionPage); iSaveSupport = new SaveSupport(iHelper, iSharedPlaylists, optionSharedPlaylists, iLocalPlaylists, optionLocalPlaylists); iViewSaveSupport = new ViewSaveSupport(RequestLocalPlaylistFilename, iSaveSupport); iPlaySupport = new PlaySupport(); iHelper.ProcessOptionsFileAndCommandLine(); SetUpdateTypes(); }