Exemplo n.º 1
0
        public void ConnectTo(TVInfo info)
        {
            iRemote.SetConnectCallback(this.connectOk, this.connectFail, this.disc, this.authentic, this.authenticFail, this.authenticDeny, this.authenticFull);
            iRemote.SetPacketParser(this.packetCb);

            this.curTv = info;

            HttpDownloader.SetTvIp(info.Ip);

            iRemote.Connect(ref this.curTv, 0xd6d8, new StringBuilder("Mobile Simulator"));
        }
Exemplo n.º 2
0
        public override Task <object[]> StartQueryMetadata(string text, out CancellationToken token)
        {
            VerifyAccess();

            if (this.queryCancellationToken != null)
            {
                this.queryCancellationToken.Cancel();
            }
            this.queryCancellationToken = new CancellationTokenSource();
            token = this.queryCancellationToken.Token;

            return(TVInfo.StartQueryMetadata(text, token).ContinueWith(t => (object[])t.Result, token));
        }
Exemplo n.º 3
0
        void _iRemote_addTVEvent(TVInfo info)
        {
            ((SamsungTVSetup)GetSetupControl()).TVAdded(ref info);

            if (info.ToString() == IPAddress)
            {
                MAC = Auto3DHelpers.RequestMACAddress(IPAddress);

                if (iRemote.ToString() != info.ToString())
                {
                    _iRemote.ConnectTo(info);
                }
            }
        }
Exemplo n.º 4
0
        public void TvDeletedCallback(ref TVInfo info)
        {
            foreach (TVInfo info2 in this.tvs)
            {
                if (info2.Mac == info.Mac)
                {
                    this.tvs.Remove(info2);
                    break;
                }
            }

            TVInfo localCopy = info;

            MediaPortal.ProcessPlugins.Auto3D.Devices.Auto3DHelpers.GetMainForm().Invoke((System.Windows.Forms.MethodInvoker) delegate
            {
                if (removeTVEvent != null)
                {
                    removeTVEvent(localCopy);
                }
            });
        }
Exemplo n.º 5
0
        public override void SelectMetadata(object metadata)
        {
            TVDBSeries series = metadata as TVDBSeries;

            if (series != null)
            {
                if (this.metaCancellationToken != null)
                {
                    this.metaCancellationToken.Cancel();
                }
                this.metaCancellationToken = new CancellationTokenSource();
                CancellationToken token = this.metaCancellationToken.Token;

                TVInfo.StartQueryMetadataDetails(series.SeriesId, token).ContinueWith(
                    t => Dispatcher.BeginInvoke(UpdateFullMetadata, t, token), token);
            }
            else
            {
                this.seriesMetadata = null;
                Backdrop            = stockBackdrop;
            }
        }
Exemplo n.º 6
0
        public void TvAddedCallback(ref TVInfo info)
        {
            foreach (TVInfo info2 in this.tvs)
            {
                if (info2.Mac == info.Mac)
                {
                    return; // is already in list
                }
            }

            TVInfo localCopy = info;

            this.tvs.Add(localCopy);

            MediaPortal.ProcessPlugins.Auto3D.Devices.Auto3DHelpers.GetMainForm().Invoke((System.Windows.Forms.MethodInvoker) delegate
            {
                if (addTVEvent != null)
                {
                    addTVEvent(localCopy);
                }
            });
        }
Exemplo n.º 7
0
 void iRemote_removeTVEvent(TVInfo info)
 {
     ((SamsungTVSetup)GetSetupControl()).TVRemoved(ref info);
 }
Exemplo n.º 8
0
 public static extern void Connect(ref TVInfo info, int port, StringBuilder DeviceName);