Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public ApplicationOptions(IHelper aHelper)
        {
            iLastBoxSelected = new OptionString("lastboxselected", "Last Box Selected", "Store last device selected by the user", "");
            aHelper.AddOption(iLastBoxSelected);

            iViewDetails = new OptionBool("viewdetails", "View Details", "Show device list in detail rather than by Icons", false);
            aHelper.AddOption(iViewDetails);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        public Preferences(Helper aHelper)
        {
            iOptionPagePrivacy = new OptionPagePrivacy(aHelper);
            aHelper.AddOptionPage(iOptionPagePrivacy);

            iOptionReceiverList        = new OptionString("linn.songcaster", "Media player list", "List of media players that have ever been seen", new MediaPlayerConfiguration().Save());
            iOptionSelectedReceiverUdn = new OptionString("songcast.selectedreceiverudn", "Selected Receiver UDN", "The UDN of the currently selected Songcast receiver", string.Empty);
            iOptionSubnetAddress       = new OptionUint("songcaster.subnet", "Subnet", "Subnet to songcast over", 0);
            iOptionMulticast           = new OptionBool("songcast.usemulticast", "Multicast", "Send audio over multicast rather than unicast", false);
            iOptionChannel             = new OptionUint("songcaster.channel", "Channel", "Multcast channel to send audio over", 0);
            iOptionUseMusicLatency     = new OptionBool("songcast.usemusiclatency", "Use Music Latency", "Send audio using the music latency rather than video latency", true);
            iOptionMusicLatencyMs      = new OptionUint("songcast.musiclatencyms", "Music Latency (ms)", "Songcast music latency", kDefaultMusicLatencyMs);
            iOptionVideoLatencyMs      = new OptionUint("songcast.videolatencyms", "Video Latency (ms)", "Songcast video latency", kDefaultVideoLatencyMs);
            iOptionRotaryVolumeControl = new OptionBool("songcast.rotaryvolumecontrol", "Rotary volume control", "Whether to use rotary or rocker volume control", true);

            aHelper.AddOption(iOptionReceiverList);
            aHelper.AddOption(iOptionSelectedReceiverUdn);
            aHelper.AddOption(iOptionSubnetAddress);
            aHelper.AddOption(iOptionMulticast);
            aHelper.AddOption(iOptionChannel);
            aHelper.AddOption(iOptionUseMusicLatency);
            aHelper.AddOption(iOptionMusicLatencyMs);
            aHelper.AddOption(iOptionVideoLatencyMs);
            aHelper.AddOption(iOptionRotaryVolumeControl);

            if (iOptionChannel.Native == 0)
            {
                // channel has not been set - assign a random value
                Random r       = new Random();
                int    byte1   = r.Next(254) + 1; // in range [1,254]
                int    byte2   = r.Next(254) + 1; // in range [1,254]
                int    channel = byte1 << 8 | byte2;
                iOptionChannel.Native = (uint)channel;
            }
            iTrackerAccount = kTrackerAccountDev;
            if (aHelper.BuildType == EBuildType.Release)
            {
                iTrackerAccount = kTrackerAccountRelease;
            }
            else if (aHelper.BuildType == EBuildType.Beta)
            {
                iTrackerAccount = kTrackerAccountBeta;
            }
        }
Exemplo n.º 5
0
        public Preferences(Helper aHelper)
        {
            iOptionPagePrivacy = new OptionPagePrivacy(aHelper);
            aHelper.AddOptionPage(iOptionPagePrivacy);

            iOptionFirmwareBeta       = new OptionBool("konfig.firmwarebeta", "Participate in firmware beta programme", "Include beta firmware when checking for available updates", false);
            iOptionNetwork            = new OptionUint("konfig.network", "Network", "Network to use", 0);
            iOptionSelectedProductUdn = new OptionString("konfig.selectedproductudn", "Selected product UDN", "UDN of the product to automatically select for configuration", string.Empty);
            iOptionSendDsCrashData    = new OptionBool("konfig.senddscrashdata", "Send DS crash data to Linn", "Automatically send DS crash data to Linn", false);

            aHelper.AddOption(iOptionFirmwareBeta);
            aHelper.AddOption(iOptionNetwork);
            aHelper.AddOption(iOptionSelectedProductUdn);
            aHelper.AddOption(iOptionSendDsCrashData);
            iTrackerAccount = kTrackerAccountDev;
            if (aHelper.BuildType == EBuildType.Release)
            {
                iTrackerAccount = kTrackerAccountRelease;
            }
            else if (aHelper.BuildType == EBuildType.Beta)
            {
                iTrackerAccount = kTrackerAccountBeta;
            }
        }
Exemplo n.º 6
0
        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);
        }