Ejemplo n.º 1
0
        public static WCFPlayerWindowInformation2 ToWCF(PlayerWindowInformation2 info)
        {
            ScreenInformation[]   keys   = info.Configuration.Keys.ToArray();
            ItemConfiguration[][] values = new ItemConfiguration[keys.Length][];

            WCFScreenInformation[]   newKeys   = new WCFScreenInformation[keys.Length];
            WCFItemConfiguration[][] newValues = new WCFItemConfiguration[keys.Length][];

            int index = 0;

            foreach (var key in keys)
            {
                values[index] = info.Configuration[key].ToArray();

                newKeys[index] = ToWCF(key);

                newValues[index++] = ToWCF(values[index]).ToArray();
            }

            WCFPlayerWindowInformation2 res = new WCFPlayerWindowInformation2()
            {
                Displays = newKeys, Components = newValues
            };

            return(res);
        }
Ejemplo n.º 2
0
        public static ItemConfiguration ToNET(WCFItemConfiguration item)
        {
            if (item is WCFFooterConfiguration)
            {
                var footer = item as WCFFooterConfiguration;

                List <string> textos = new List <string>();

                foreach (var text in footer.TextList)
                {
                    textos.Add(text);
                }

                return(new MarkeeConfiguration()
                {
                    Direction = ToNET(footer.Direction),
                    FinalResolution = ToNET(footer.FinalResolution),
                    Font = ToNET(footer.Font),
                    BackColor = ToNET(footer.FooterBackColor),
                    TextColor = ToNET(footer.FooterTextColor),
                    Location = ToNET(footer.Location),
                    Resolution = ToNET(footer.Resolution),
                    Size = ToNET(footer.Size),
                    Speed = footer.Speed,
                    Text = textos,
                    TransparentBackground = footer.TransparentBackground
                });
            }
            else if (item is WCFTVConfiguration)
            {
                var tvConfig = item as WCFTVConfiguration;

                return(new TVConfiguration
                {
                    Frequency = tvConfig.Frequency,
                    TunerDevicePath = tvConfig.TunerDevicePath,
                    FinalResolution = ToNET(tvConfig.FinalResolution),
                    Location = ToNET(tvConfig.Location),
                    Resolution = ToNET(tvConfig.Resolution),
                    Size = ToNET(tvConfig.Size)
                });
            }
            else
            {
                return(null);
            }
        }